mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2025-01-18 04:40:47 +00:00
freeze dataclasses
This commit is contained in:
parent
01d5d9801c
commit
7ede9b1ef3
@ -1,15 +1,16 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class KindMap:
|
||||
id_: str
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.id_
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class X32KindMap(KindMap):
|
||||
id_: str
|
||||
num_dca: int = 8
|
||||
num_strip: int = 32
|
||||
num_bus: int = 16
|
||||
@ -19,28 +20,25 @@ class X32KindMap(KindMap):
|
||||
num_headamp: int = 127
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class XR18KindMap(KindMap):
|
||||
# note ch 17-18 defined as aux return
|
||||
id_: str
|
||||
num_dca: int = 4
|
||||
num_strip: int = 16
|
||||
num_bus: int = 6
|
||||
num_fx: int = 4
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class XR16KindMap(KindMap):
|
||||
id_: str
|
||||
num_dca: int = 4
|
||||
num_strip: int = 16
|
||||
num_bus: int = 4
|
||||
num_fx: int = 4
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class XR12KindMap(KindMap):
|
||||
id_: str
|
||||
num_dca: int = 4
|
||||
num_strip: int = 12
|
||||
num_bus: int = 2
|
||||
@ -60,4 +58,4 @@ def get(kind_id):
|
||||
return _kinds[kind_id]
|
||||
|
||||
|
||||
all = list(kind for kind in _kinds.values())
|
||||
all = list(_kinds.values())
|
||||
|
Loading…
Reference in New Issue
Block a user