backends package¶
vidhubcontrol.backends.base module¶
-
class
vidhubcontrol.backends.base.
BackendBase
(**kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
Base class for communicating with devices
-
connected
¶ A flag indicating the connection status.
pydispatch.properties.Property
Type: bool
- Events:
- on_preset_added: This
Event
is emitted - when a new
Preset
has been added. - on_preset_stored: This
Event
is emitted - when an existing
Preset
has been recorded (updated). - on_preset_active: This
Event
is emitted - when an existing
Preset
has 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.Dispatcher
Stores 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
DictProperty
Type: dict
-
active
¶ A flag indicating whether all of the crosspoints stored in this preset are currently active on the switcher. This is a
pydispatch.Property
Type: bool
- Events:
- on_preset_stored: Dispatched after the preset stores its state.
-
-
class
vidhubcontrol.backends.base.
SmartScopeMonitor
(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.base.SmartViewMonitor
A single instance of a monitor within a SmartScope device
-
class
vidhubcontrol.backends.base.
SmartViewBackendBase
(**kwargs)[source]¶ Bases:
vidhubcontrol.backends.base.BackendBase
Base class for SmartView devices
-
inverted
¶ True
if the device has been mounted in an inverted configuration (to optimize viewing angle).Type: bool
-
monitors
¶ A
list
containing instances ofSmartViewMonitor
orSmartScopeMonitor
, depending on device type.Type: list
-
Events
¶ - on_monitor_property_change: Dispatched when any
Property
value changes. The event signature for callbacks is(smartview_device, property_name, value, **kwargs)
containing a keyword argument “monitor” containing theSmartViewMonitor
instance.
-
coroutine
set_monitor_property
(monitor, name, value)[source]¶ Set a property value for the given
SmartViewMonitor
instanceParameters: - monitor – The
SmartViewMonitor
instance 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.Dispatcher
A 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.BackendBase
Base class for Videohub devices
-
crosspoints
¶ This represents the currently active routing of the switcher. Each element in the
list
represents an output (the zero-based index of thelist
) with its selected index as the value (also zero-based). This is apydispatch.properties.ListProperty
and can be observed using thebind()
method.Type: list
-
output_labels
¶ A
list
containing the names of each output as reported by the switcher This is apydispatch.properties.ListProperty
and can be observed using thebind()
method.Type: list
-
input_labels
¶ A
list
containing the names of each input as reported by the switcher This is apydispatch.properties.ListProperty
and can be observed using thebind()
method.Type: list
-
crosspoint_control
¶ This is similar to
crosspoints
but if modified from outside code, the crosspoint changes will be set on the device (no method calls required).pydispatch.properties.ListProperty
Type: 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.ListProperty
Type: 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.ListProperty
Type: list
-
presets
¶ The currently available (stored)
list
ofPreset
instancespydispatch.properties.ListProperty
Type: list
-
coroutine
add_preset
(name=None)[source]¶ Adds a new
Preset
instanceThis 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 tuples
of(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 tuples
of(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 tuples
of(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
Preset
Parameters: - 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
None
the 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
presets
list, 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
Preset
instance 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.VidhubBackendBase
Base 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 tuples
of(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 tuples
of(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 tuples
of(out_idx, label)
as defined inset_output_label()
. They can be discontinuous and unordered.
-
coroutine