tslumd.sender
¶
-
tslumd.sender.
Client
¶ A network client as a tuple of
(address, port)
alias of Tuple[str, int]
-
class
tslumd.sender.
UmdSender
(*args, **kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
Send UMD Messages
Messages are sent immediately when a change is made to any of the
Tally
objects intallies
. These can be added by using theadd_tally()
method.Alternatively, the
set_tally_color()
andset_tally_text()
methods may be used.- Parameters
clients – Intitial value for
clients
-
tallies
: Dict[int, tslumd.tallyobj.Tally]¶ Mapping of
Tally
objects using theindex
as keysNote
This should not be altered directly. Use
add_tally()
instead
-
loop
: asyncio.base_events.BaseEventLoop¶ The
asyncio.BaseEventLoop
associated with the instance
-
async
send_scontrol
(screen: int, data: bytes)[source]¶ Send an
SCONTROL
messageNew in version 0.0.2.
-
async
send_broadcast_scontrol
(data: bytes)[source]¶ Send a
broadcast
SCONTROL
message- Parameters
data – The data to send in the
scontrol
field
New in version 0.0.2.
-
add_tally
(index_: int, **kwargs) → tslumd.tallyobj.Tally[source]¶ Create a
Tally
object and add it totallies
- Parameters
index – The tally
index
**kwargs – Keyword arguments passed to create the tally instance
- Raises
KeyError – If the given
index_
already exists
-
set_tally_color
(index_: int, tally_type: tslumd.common.TallyType, color: tslumd.common.TallyColor)[source]¶ Set the tally color for the given index and tally type
- Parameters
index – The tally
index
tally_type – A member of
TallyType
specifying the tally lamp within the displaycolor – The member of
TallyColor
to set
-
set_tally_text
(index_: int, text: str)[source]¶ Set the tally text for the given index
- Parameters
index – The tally
index
text – The
text
to set
-
async
send_tally_control
(index_: int, data: bytes)[source]¶ Send
control
data for the given tally index- Parameters
index – The tally
index
control – The control data to send
New in version 0.0.2.