tslumd.receiver

class tslumd.receiver.UmdReceiver(*args, **kwargs)[source]

Bases: pydispatch.dispatch.Dispatcher

Receiver for UMD messages

Parameters
  • hostaddr (str) – The local host address to bind the server to. Defaults to DEFAULT_HOST

  • hostport (int) – The port to listen on. Defaults to DEFAULT_PORT

Events
DEFAULT_HOST: str = '0.0.0.0'

The default host address to listen on

DEFAULT_PORT: int = 65000

The default host port to listen on

tallies: Dict[int, tslumd.tallyobj.Tally]

Mapping of Tally objects using the index as keys

loop: asyncio.base_events.BaseEventLoop

The asyncio.BaseEventLoop associated with the instance

running: bool

True if the client / server are running

property hostaddrstr   [read-only]

The local host address to bind the server to

property hostportint   [read-only]

The port to listen on

async open()[source]

Open the server

async close()[source]

Close the server

async set_bind_address(hostaddr: str, hostport: int)[source]

Set the hostaddr and hostport and restart the server

async set_hostaddr(hostaddr: str)[source]

Set the hostaddr and restart the server

async set_hostport(hostport: int)[source]

Set the hostport and restart the server

parse_incoming(data: bytes, addr: Tuple[str, int])[source]

Parse data received by the server

update_display(rx_display: tslumd.messages.Display)[source]

Update or create a Tally from data received by the server