class tslumd.messages.Display(index: int, rh_tally: tslumd.common.TallyColor = <TallyColor.OFF: 0>, txt_tally: tslumd.common.TallyColor = <TallyColor.OFF: 0>, lh_tally: tslumd.common.TallyColor = <TallyColor.OFF: 0>, brightness: int = 3, text: str = '')[source]

Bases: object

A single tally “display”

index: int

The display index

rh_tally: tslumd.common.TallyColor = 0

Right hand tally indicator

txt_tally: tslumd.common.TallyColor = 0

Text tally indicator

lh_tally: tslumd.common.TallyColor = 0

Left hand tally indicator

brightness: int = 3

Display brightness (from 0 to 3)

text: str = ''

Text to display

classmethod from_dmsg(flags: tslumd.messages.Flags, dmsg: bytes)Tuple[tslumd.messages.Display, bytes][source]

Construct an instance from a DMSG portion of received message.

Any remaining message data after the relevant DMSG is returned along with the instance.

to_dmsg(flags: tslumd.messages.Flags)bytes[source]

Build dmsg bytes to be included in a message (called from Message.build_message())

classmethod from_tally(tally: tslumd.tallyobj.Tally)tslumd.messages.Display[source]

Create a Display from the given Tally

class tslumd.messages.Message(version: int = 0, flags: int = <Flags.NO_FLAGS: 0>, screen: int = 0, displays: List[tslumd.messages.Display] = <factory>, scontrol: bytes = b'')[source]

Bases: object

A single UMDv5 message packet

version: int = 0

Protocol minor version

flags: int = 0

The message Flags field

screen: int = 0

Screen index

displays: List[tslumd.messages.Display]

A list of Display instances

scontrol: bytes = b''

SCONTROL data (if present). Not currently implemented

classmethod parse(msg: bytes)Tuple[tslumd.messages.Message, bytes][source]

Parse incoming message data to create a Message instance.

Any remaining message data after parsing is returned along with the instance.


Build a message packet from data in this instance