jvconnected.interfaces.tslumd
jvconnected.interfaces.tslumd.umd_io
- class jvconnected.interfaces.tslumd.umd_io.UmdIo(*args, **kwargs)[source]
Bases:
Interface
Main UMD interface
- DictProperty device_maps: Dict[int, DeviceMapping]
A
dict
ofDeviceMapping
definitions stored with theirdevice_index
as keysdevice_maps
is apydispatch.DictProperty
object.
- DictProperty mapped_devices: Dict[int, MappedDevice]
A
dict
ofMappedDevice
stored with thedevice_index
of theirmap
as keysmapped_devices
is apydispatch.DictProperty
object.
- Event on_tally_added(tally: Tally)[source]
Fired when a
tslumd.tallyobj.Tally
instance is added totallies
on_tally_added
is apydispatch.Event
object.
- Event on_tally_updated(tally: Tally)[source]
Fired when any
tslumd.tallyobj.Tally
instance has been updatedon_tally_updated
is apydispatch.Event
object.
- interface_name: ClassVar[str] = 'tslumd'
Unique name for the interface. Must be defined by subclasses
- Property hostaddr: str = '0.0.0.0'
Alias for
tslumd.receiver.UmdReceiver.hostaddr
hostaddr
is apydispatch.Property
object.
- Property hostport: int = 65000
Alias for
tslumd.receiver.UmdReceiver.hostport
hostport
is apydispatch.Property
object.
- property tallies: Dict[int, Tally]
Alias for
tslumd.receiver.UmdReceiver.tallies
- async set_engine(engine: jvconnected.engine.Engine)[source]
Attach the interface to a running instance of
jvconnected.engine.Engine
This will be called automatically by the engine if the class is in the
jvconnected.interfaces.registry
.If the engine is running, the interface will start (using the
open()
method). Otherwise it will automatically start when the engine does.
- async set_bind_address(hostaddr: str, hostport: int)[source]
Set the
hostaddr
andhostport
and restart the server
- async add_device_mapping(device_map: DeviceMapping)[source]
Add a
DeviceMapping
definition todevice_maps
and update theconfig
.An instance of
MappedDevice
is also created and associated with itsDevice
if found in theengine
.
- async remove_device_mapping(device_index: int)[source]
Remove a
DeviceMapping
and its associatedMappedDevice
by the given device index
jvconnected.interfaces.tslumd.mapper
- class jvconnected.interfaces.tslumd.mapper.TallyMap(screen_index: int = 0, tally_index: int = 0, tally_type: TallyType = TallyType.no_tally)[source]
Bases:
object
Map to a single
tally type
within a specifictslumd.tallyobj.Tally
by its index
- class jvconnected.interfaces.tslumd.mapper.DeviceMapping(device_index: int, program: ~jvconnected.interfaces.tslumd.mapper.TallyMap = <factory>, preview: ~jvconnected.interfaces.tslumd.mapper.TallyMap = <factory>)[source]
Bases:
object
Map the preview and program tallies from UMD to a
jvconnected.device.Device
This only defines the mapping, the functionality itself is carried out by
MappedDevice
.- device_index: int
The
device_index
to associate with this mapping
- class jvconnected.interfaces.tslumd.mapper.MappedDevice(umd_io: jvconnected.interfaces.tslumd.umd_io.UmdIo, map: DeviceMapping)[source]
Bases:
object
Link between
Tally
objects and ajvconnected.device.Device
- umd_io: jvconnected.interfaces.tslumd.umd_io.UmdIo
UmdIo
instance
- map: DeviceMapping
Mapping definitions for the device
- device: Optional[jvconnected.device.Device]
The device instance
- program_tally: Optional[TallyMap]
The
Tally
mapped tojvconnected.device.TallyParams.program
- preview_tally: Optional[TallyMap]
The
Tally
mapped tojvconnected.device.TallyParams.preview
- tally_state: TallyState
The current state
- async set_device(device: Optional[jvconnected.device.Device])[source]
Set the
device
and update its tally state
- get_tallies() bool [source]
Attempt to find the
Tally
objects in theumd_io
- Returns
True
if an update is needed(a tally object either changed or was found)
- Return type
- update_tally_state(*args, **kwargs)[source]
Update the
tally_state
using bothprogram_tally
andpreview_tally
. Since they are mutually exclusive in the device, priority is given toprogram_tally
.- Returns
True
if the state changed- Return type
- async update_device_tally(*args, **kwargs)[source]
Update the tally state (using
update_tally_state()
) and send changes to thedevice