diff --git a/xair_api/kinds.py b/xair_api/kinds.py index dc00991..2bb693d 100644 --- a/xair_api/kinds.py +++ b/xair_api/kinds.py @@ -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())