2022-04-05 20:05:55 +01:00
|
|
|
from dataclasses import dataclass
|
|
|
|
|
2022-05-01 03:46:44 +01:00
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
@dataclass(frozen=True)
|
2022-11-07 11:08:56 +00:00
|
|
|
class KindMap:
|
2025-01-15 10:21:22 +00:00
|
|
|
id_: str
|
|
|
|
|
2022-11-07 11:08:56 +00:00
|
|
|
def __str__(self) -> str:
|
|
|
|
return self.id_
|
|
|
|
|
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
@dataclass(frozen=True)
|
2022-11-07 11:08:56 +00:00
|
|
|
class X32KindMap(KindMap):
|
2022-05-01 03:46:44 +01:00
|
|
|
num_dca: int = 8
|
|
|
|
num_strip: int = 32
|
|
|
|
num_bus: int = 16
|
|
|
|
num_fx: int = 8
|
2022-11-07 11:08:56 +00:00
|
|
|
num_auxrtn: int = 8
|
|
|
|
num_matrix: int = 6
|
2025-01-03 10:19:06 +00:00
|
|
|
num_headamp: int = 127
|
2022-08-07 23:55:51 +01:00
|
|
|
|
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
@dataclass(frozen=True)
|
2022-11-07 17:27:41 +00:00
|
|
|
class XR18KindMap(KindMap):
|
|
|
|
# note ch 17-18 defined as aux return
|
2022-04-05 20:05:55 +01:00
|
|
|
num_dca: int = 4
|
|
|
|
num_strip: int = 16
|
|
|
|
num_bus: int = 6
|
|
|
|
num_fx: int = 4
|
|
|
|
|
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
@dataclass(frozen=True)
|
2022-08-07 23:55:51 +01:00
|
|
|
class XR16KindMap(KindMap):
|
2022-05-01 03:46:44 +01:00
|
|
|
num_dca: int = 4
|
|
|
|
num_strip: int = 16
|
|
|
|
num_bus: int = 4
|
|
|
|
num_fx: int = 4
|
|
|
|
|
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
@dataclass(frozen=True)
|
2022-08-07 23:55:51 +01:00
|
|
|
class XR12KindMap(KindMap):
|
2022-05-01 03:46:44 +01:00
|
|
|
num_dca: int = 4
|
|
|
|
num_strip: int = 12
|
|
|
|
num_bus: int = 2
|
|
|
|
num_fx: int = 4
|
|
|
|
|
|
|
|
|
2022-04-05 20:05:55 +01:00
|
|
|
_kinds = {
|
2025-01-15 10:54:52 +00:00
|
|
|
'X32': X32KindMap(id_='X32'),
|
|
|
|
'MR18': XR18KindMap(id_='MR18'),
|
|
|
|
'XR18': XR18KindMap(id_='XR18'),
|
|
|
|
'XR16': XR16KindMap(id_='XR16'),
|
|
|
|
'XR12': XR12KindMap(id_='XR12'),
|
2022-04-05 20:05:55 +01:00
|
|
|
}
|
|
|
|
|
2022-05-01 03:46:44 +01:00
|
|
|
|
|
|
|
def get(kind_id):
|
|
|
|
return _kinds[kind_id]
|
|
|
|
|
|
|
|
|
2025-01-15 10:21:22 +00:00
|
|
|
all = list(_kinds.values())
|