backends package¶
vidhubcontrol.backends.base module¶
-
class
vidhubcontrol.backends.base.BackendBase(**kwargs)[source]¶ Bases:
pydispatch.dispatch.DispatcherBase class for communicating with devices
-
connected¶ A flag indicating the connection status.
pydispatch.properties.PropertyType: bool
- Events:
- on_preset_added: This
Eventis emitted - when a new
Presethas been added. - on_preset_stored: This
Eventis emitted - when an existing
Presethas been recorded (updated). - on_preset_active: This
Eventis emitted - when an existing
Presethas determined that its stored routing information is currently active on the switcher.
- on_preset_added: This
-
-
class
vidhubcontrol.backends.base.Preset(**kwargs)[source]¶ Bases:
pydispatch.dispatch.DispatcherStores and recalls routing information
-
name¶ The name of the preset. This is a
pydispatch.Property
-
crosspoints¶ The crosspoints that this preset has stored. This is a
DictPropertyType: dict
-
active¶ A flag indicating whether all of the crosspoints stored in this preset are currently active on the switcher. This is a
pydispatch.PropertyType: bool
- Events:
- on_preset_stored: Dispatched after the preset stores its state.
-
-
class
vidhubcontrol.backends.base.SmartScopeMonitor(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.base.SmartViewMonitorA single instance of a monitor within a SmartScope device
-
class
vidhubcontrol.backends.base.SmartViewBackendBase(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.base.BackendBaseBase class for SmartView devices
-
inverted¶ Trueif the device has been mounted in an inverted configuration (to optimize viewing angle).Type: bool
-
monitors¶ A
listcontaining instances ofSmartViewMonitororSmartScopeMonitor, depending on device type.Type: list
-
Events¶ - on_monitor_property_change: Dispatched when any
Propertyvalue changes. The event signature for callbacks is(smartview_device, property_name, value, **kwargs)containing a keyword argument “monitor” containing theSmartViewMonitorinstance.
-
coroutine
set_monitor_property(monitor, name, value)[source]¶ Set a property value for the given
SmartViewMonitorinstanceParameters: - monitor – The
SmartViewMonitorinstance to set - name (str) – Property name
- value – The new value to set
This method is a coroutine.
- monitor – The
-
-
class
vidhubcontrol.backends.base.SmartViewMonitor(**kwargs)[source]¶ Bases:
pydispatch.dispatch.DispatcherA single instance of a monitor within a SmartView device
-
widescreen_sd¶ Aspect ratio setting for SD format. Choices can be:
True(stretching enabled),False(pillar-box), orNone(auto-detect).
-
identify¶ If set to
True, the monitor’s border will be white for a brief duration to physically locate the device.Type: bool
-
-
class
vidhubcontrol.backends.base.VidhubBackendBase(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.base.BackendBaseBase class for Videohub devices
-
crosspoints¶ This represents the currently active routing of the switcher. Each element in the
listrepresents an output (the zero-based index of thelist) with its selected index as the value (also zero-based). This is apydispatch.properties.ListPropertyand can be observed using thebind()method.Type: list
-
output_labels¶ A
listcontaining the names of each output as reported by the switcher This is apydispatch.properties.ListPropertyand can be observed using thebind()method.Type: list
-
input_labels¶ A
listcontaining the names of each input as reported by the switcher This is apydispatch.properties.ListPropertyand can be observed using thebind()method.Type: list
-
crosspoint_control¶ This is similar to
crosspointsbut if modified from outside code, the crosspoint changes will be set on the device (no method calls required).pydispatch.properties.ListPropertyType: list
-
output_label_control¶ This is similar to :attr:~VidhubBackendBase.output_labels` but if modified from outside code, the label changes will be written to the device (no method calls required).
pydispatch.properties.ListPropertyType: list
-
input_label_control¶ This is similar to :attr:~VidhubBackendBase.input_labels` but if modified from outside code, the label changes will be written to the device (no method calls required).
pydispatch.properties.ListPropertyType: list
-
presets¶ The currently available (stored)
listofPresetinstancespydispatch.properties.ListPropertyType: list
-
coroutine
add_preset(name=None)[source]¶ Adds a new
PresetinstanceThis method is used internally and should not normally be called outside of this module. Instead, see
store_preset()
-
coroutine
set_crosspoint(out_idx, in_idx)[source]¶ Set a single crosspoint on the switcher
Parameters:
-
coroutine
set_crosspoints(*args)[source]¶ Set multiple crosspoints in one method call
This is useful for setting many routing changes as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of output/input pairs to set. These should be given as tuplesof(out_idx, in_idx)as defined inset_crosspoint(). They can be discontinuous and unordered.
-
coroutine
set_input_labels(*args)[source]¶ Set multiple input labels in one method call
This is useful for setting many labels as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of input/label pairs to set. These should be given as tuplesof(in_idx, label)as defined inset_input_label(). They can be discontinuous and unordered.
-
coroutine
set_output_labels(*args)[source]¶ Set multiple output labels in one method call
This is useful for setting many labels as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of output/label pairs to set. These should be given as tuplesof(out_idx, label)as defined inset_output_label(). They can be discontinuous and unordered.
-
coroutine
store_preset(outputs_to_store=None, name=None, index=None, clear_current=True)[source]¶ Store the current switcher state to a
PresetParameters: - outputs_to_store (optional) – An iterable of the output numbers
(zero-based) that should be saved in the preset. If given, only
these outputs will be recorded and when recalled, any output
not in this argument will be unchanged. If not given or
None, all outputs will be recorded. - name (optional) – The name to be given to the preset. If not provided
or
Nonethe preset will be given a name based off of its index. - index (optional) – The index for the preset. If given and the preset
exists in the
presetslist, that preset will be updated. If there is no preset found with the index, a new one will be created. If not given orNone, the next available index will be used and a new preset will be created. - clear_current (bool) – If
True, any previously existing data will be removed from the preset (if it exists). IfFalse, the data (if existing) will be merged with the current switcher state. Default isTrue
Returns: The
Presetinstance that was created or updatedThis method is a
coroutine- outputs_to_store (optional) – An iterable of the output numbers
(zero-based) that should be saved in the preset. If given, only
these outputs will be recorded and when recalled, any output
not in this argument will be unchanged. If not given or
-
vidhubcontrol.backends.telnet module¶
-
class
vidhubcontrol.backends.telnet.SmartScopeTelnetBackend(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.telnet.SmartViewTelnetBackendBase,vidhubcontrol.backends.base.SmartScopeBackendBase
-
class
vidhubcontrol.backends.telnet.SmartViewTelnetBackend(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.telnet.SmartViewTelnetBackendBase,vidhubcontrol.backends.base.SmartViewBackendBase
-
class
vidhubcontrol.backends.telnet.TelnetBackend(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.telnet.TelnetBackendBase,vidhubcontrol.backends.base.VidhubBackendBaseBase class for backends implementing telnet
-
coroutine
set_crosspoint(out_idx, in_idx)[source]¶ Set a single crosspoint on the switcher
Parameters:
-
coroutine
set_crosspoints(*args)[source]¶ Set multiple crosspoints in one method call
This is useful for setting many routing changes as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of output/input pairs to set. These should be given as tuplesof(out_idx, in_idx)as defined inset_crosspoint(). They can be discontinuous and unordered.
-
coroutine
set_input_labels(*args)[source]¶ Set multiple input labels in one method call
This is useful for setting many labels as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of input/label pairs to set. These should be given as tuplesof(in_idx, label)as defined inset_input_label(). They can be discontinuous and unordered.
-
coroutine
set_output_labels(*args)[source]¶ Set multiple output labels in one method call
This is useful for setting many labels as it reduces the number of commands sent to the switcher.
Parameters: *args – Any number of output/label pairs to set. These should be given as tuplesof(out_idx, label)as defined inset_output_label(). They can be discontinuous and unordered.
-
coroutine