jvconnected.interfaces.tslumd
jvconnected.interfaces.tslumd.umd_io
- class jvconnected.interfaces.tslumd.umd_io.UmdIo(*args, **kwargs)[source]
Bases:
InterfaceMain UMD interface
- DictProperty device_maps: Dict[int, DeviceMapping]
A
dictofDeviceMappingdefinitions stored with theirdevice_indexas keysdevice_mapsis apydispatch.DictPropertyobject.
- DictProperty mapped_devices: Dict[int, MappedDevice]
A
dictofMappedDevicestored with thedevice_indexof theirmapas keysmapped_devicesis apydispatch.DictPropertyobject.
- Event on_tally_added(tally: Tally)[source]
Fired when a
tslumd.tallyobj.Tallyinstance is added totallieson_tally_addedis apydispatch.Eventobject.
- Event on_tally_updated(tally: Tally)[source]
Fired when any
tslumd.tallyobj.Tallyinstance has been updatedon_tally_updatedis apydispatch.Eventobject.
- 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.hostaddrhostaddris apydispatch.Propertyobject.
- Property hostport: int = 65000
Alias for
tslumd.receiver.UmdReceiver.hostporthostportis apydispatch.Propertyobject.
- 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.EngineThis 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
hostaddrandhostportand restart the server
- async add_device_mapping(device_map: DeviceMapping)[source]
Add a
DeviceMappingdefinition todevice_mapsand update theconfig.An instance of
MappedDeviceis also created and associated with itsDeviceif found in theengine.
- async remove_device_mapping(device_index: int)[source]
Remove a
DeviceMappingand its associatedMappedDeviceby 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:
objectMap to a single
tally typewithin a specifictslumd.tallyobj.Tallyby 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:
objectMap the preview and program tallies from UMD to a
jvconnected.device.DeviceThis only defines the mapping, the functionality itself is carried out by
MappedDevice.- device_index: int
The
device_indexto associate with this mapping
- class jvconnected.interfaces.tslumd.mapper.MappedDevice(umd_io: jvconnected.interfaces.tslumd.umd_io.UmdIo, map: DeviceMapping)[source]
Bases:
objectLink between
Tallyobjects and ajvconnected.device.Device- umd_io: jvconnected.interfaces.tslumd.umd_io.UmdIo
UmdIoinstance
- map: DeviceMapping
Mapping definitions for the device
- device: Optional[jvconnected.device.Device]
The device instance
- program_tally: Optional[TallyMap]
The
Tallymapped tojvconnected.device.TallyParams.program
- preview_tally: Optional[TallyMap]
The
Tallymapped tojvconnected.device.TallyParams.preview
- tally_state: TallyState
The current state
- async set_device(device: Optional[jvconnected.device.Device])[source]
Set the
deviceand update its tally state
- get_tallies() bool[source]
Attempt to find the
Tallyobjects in theumd_io- Returns
Trueif an update is needed(a tally object either changed or was found)
- Return type
- update_tally_state(*args, **kwargs)[source]
Update the
tally_stateusing bothprogram_tallyandpreview_tally. Since they are mutually exclusive in the device, priority is given toprogram_tally.- Returns
Trueif 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