tslumd.common
¶
- class tslumd.common.TallyColor(value)[source]¶
Bases:
enum.IntFlag
Color enum for tally indicators
Since this is an
IntFlag
, its members can be combined using bitwise operators, makingAMBER
a combination ofRED
andGREEN
This allows merging one color with another
>>> from tslumd import TallyColor >>> TallyColor.RED <TallyColor.RED: 1> >>> TallyColor.GREEN <TallyColor.GREEN: 2> >>> TallyColor.AMBER <TallyColor.AMBER: 3> >>> TallyColor.RED | TallyColor.GREEN <TallyColor.AMBER: 3>
Changed in version 0.0.4: Bitwise operators
- OFF = 0¶
Off
- RED = 1¶
Red
- GREEN = 2¶
Green
- AMBER = 3¶
Amber
- class tslumd.common.TallyType(value)[source]¶
Bases:
enum.IntFlag
Enum for the three tally display types in the UMD protocol
Since this is an
IntFlag
, its members can be combined using bitwise operators. The members can then be iterated over to retrieve the individual “concrete” values ofrh_tally
,txt_tally
andlh_tally
>>> from tslumd import TallyType >>> list(TallyType.rh_tally) [<TallyType.rh_tally: 1>] >>> list(TallyType.rh_tally | TallyType.txt_tally) [<TallyType.rh_tally: 1>, <TallyType.txt_tally: 2>] >>> list(TallyType.all_tally) [<TallyType.rh_tally: 1>, <TallyType.txt_tally: 2>, <TallyType.lh_tally: 4>]
Changed in version 0.0.4: Added support for bitwise operators and member iteration
- no_tally = 0¶
No-op
- rh_tally = 1¶
- txt_tally = 2¶
- lh_tally = 4¶
- all_tally = 7¶
Combination of all tally types
New in version 0.0.4.
- classmethod all() → Iterable[tslumd.common.TallyType][source]¶
Iterate over all members, excluding
no_tally
andall_tally
New in version 0.0.4.
- class tslumd.common.TallyState(value)[source]¶
Bases:
enum.IntFlag
An enumeration.
- OFF = 0¶
Off
- PREVIEW = 1¶
Preview
- PROGRAM = 2¶
Program