Device¶
-
class
MonitorControl.
Device
(name, inputs=None, output_names=None, active=True, hardware=False)¶ Bases:
object
Superclass for anything that receives, processes and outputs a signal.
Signals are handled by Port instances. Inputs and outputs are channels. There may be internal channels connecting inputs and outputs.
- Public Attributes::
name - pols = unique(pols) identifier str active - bool is True if device is available data - dict for any kind of data for the device inputs - dict of input Port instances outputs - dict of output Port instances
Port Naming Convention
The input and output names must be sortable so that outputs correspond to the appropriate input. For example, if the inputs are X1 and X2 and the outputs are A, B, C, D, then A, B must be associated with X1 and C, D to X2. Further A is similar to C and B is similar to D. (This is because the order in which dict key,value pairs are specified is not preserved.)
The dict ‘inputs’ should have all the input port names, even ones not used. Just assign those the value None.
‘output_names’ should be a list of lists, where the inner lists are the output names of each of the channels.
FITS Header Data
Wherever possible, a FITS keyword will adhere to the standard usage. Local keywords, not used in the wider community, are in lowercase.
Methods Summary
base
()String representing the class instance type
has_key
(key)keys
()Updates the signals passing out of a device.
Methods Documentation
-
base
()¶ String representing the class instance type
-
has_key
(key)¶
-
keys
()¶
-
update_signals
()¶ Updates the signals passing out of a device.
If a device updates it signals, the down-stream devices must update their signals also. Since the destinations are Port objects, the updating must be done by the parent of the Port.
Note that this promulgates updates via the top-level Device outputs. It does not update the child Device objects.