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, making AMBER a combination of RED and GREEN

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 of rh_tally, txt_tally and lh_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

Right-hand tally

txt_tally = 2

Text tally

lh_tally = 4

Left-hand tally

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 and all_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

class tslumd.common.MessageType(value)[source]

Bases: enum.Enum

Message type

New in version 0.0.2.

display = 1

A message containing tally display information

control = 2

A message containing control data

tslumd.common.TallyKey

A tuple of (screen_index, tally_index) to uniquely identify a single Tally within its Screen

alias of Tuple[int, int]