Switch¶
-
class
MonitorControl.
Switch
(name, inputs={}, output_names=[], stype=None, state=0, active=True)¶ Bases:
MonitorControl.Device
Three basic switch types are recognized: “1xN”, “Nx1” and “2x2”. The latter is a transfer switch, which is just a convenient way of handling two parallel 2x1 switches.
- Public attributes::
inkeys - sorted list of input names (for Nx1 and 2x2) outkeys - sorted list of output names (for 1xN and 2x2) outname - output port name for Nx1 switch parent - states - a list of str possible switch configurations state - actual configuration stype - 1xN, Nx1 or 2x2
- Public attributes inherited from Device::
inputs logger outputs
Methods Summary
base
()String representing the class instance type
Sets the attribute ‘state’
set_state
(state)This sets the signal path resulting from the switch state.
Methods Documentation
-
base
()¶ String representing the class instance type
-
get_state
()¶ Sets the attribute ‘state’
-
set_state
(state)¶ This sets the signal path resulting from the switch state.
Actual control of the switch must be done with methods _set_state() and _get_state() which must be provided by a sub-class.