CSP Sub-element ObsDevice¶
CspSubElementObsDevice
General observing device for SKA CSP Subelement.
Tango Device Class¶
-
class
ska_tango_base.
CspSubElementObsDevice
(*args: Any, **kwargs: Any)[source]¶ General observing device for SKA CSP Subelement.
Properties:
- Device Property
- DeviceID
Identification number of the observing device.
Type:’DevUShort’
-
DeviceID
= tango.server.device_property(dtype=DevUShort, default_value=1)¶
-
scanID
= tango.server.attribute(dtype=DevULong64, label=scanID, doc=The scan identification number to be inserted in the output products.)¶ Device attribute.
-
configurationID
= tango.server.attribute(dtype=DevString, label=configurationID, doc=The configuration ID specified into the JSON configuration.)¶ Device attribute.
-
deviceID
= tango.server.attribute(dtype=DevUShort, label=deviceID, doc=The observing device ID.)¶ Device attribute.
-
lastScanConfiguration
= tango.server.attribute(dtype=DevString, label=lastScanConfiguration, doc=The last valid scan configuration.)¶ Device attribute.
-
sdpDestinationAddresses
= tango.server.attribute(dtype=DevString, label=sdpDestinationAddresses, doc=JSON formatted string Report the list of all the SDP addresses provided by SDP to receive the output products. Specifies the Mac, IP, Port for each resource: CBF: visibility channels PSS ? Pss pipelines PST ? PSTBeam Not used by al CSP Sub-element observing device (for ex. Mid CBF VCCs))¶ Device attribute.
-
sdpLinkCapacity
= tango.server.attribute(dtype=DevFloat, label=sdpLinkCapacity, doc=The SDP link capavity in GB/s.)¶ Device attribute.
-
sdpLinkActive
= tango.server.attribute(dtype=('DevBoolean',), max_dim_x=100, label=sdpLinkActive, doc=Flag reporting if the SDP link is active. True: active False:down)¶ Device attribute.
-
healthFailureMessage
= tango.server.attribute(dtype=DevString, label=healthFailureMessage, doc=Message providing info about device health failure.)¶ Device attribute.
-
class
InitCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevice’s init_device() “command”.
Create a new InitCommand
- Parameters
target (object) – the object that this command acts upon; for example, the SKASubarray device for which this class implements the command
state_model (
DeviceStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
()[source]¶ Stateless hook for device initialisation.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
delete_device
()[source]¶ Hook to delete resources allocated in init_device.
This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device destructor and by the device Init command.
-
class
ConfigureScanCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s ConfigureScan command.
Constructor for ConfigureScanCommand
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
(argin)[source]¶ Stateless hook for ConfigureScan() command functionality.
- Parameters
argin (str) – The configuration as JSON formatted string
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
- Raises
CommandError
if the configuration data validation fails.
-
validate_input
(argin)[source]¶ Validate the configuration parameters against allowed values, as needed.
- Parameters
argin ('DevString') – The JSON formatted string with configuration for the device.
- Returns
A tuple containing a return code and a string message.
- Return type
(ResultCode, str)
-
class
ScanCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s Scan command.
Constructor for ScanCommand
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
(argin)[source]¶ Stateless hook for Scan() command functionality.
- Parameters
argin (str) – The scan ID.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
validate_input
(argin)[source]¶ Validate the command input argument.
- Parameters
argin (string) – the scan id
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
class
EndScanCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s EndScan command.
Constructor for EndScanCommand
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
()[source]¶ Stateless hook for EndScan() command functionality.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
class
GoToIdleCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s GoToIdle command.
Constructor for GoToIdle Command.
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
()[source]¶ Stateless hook for GoToIdle() command functionality.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
class
ObsResetCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s ObsReset command.
Constructor for ObsReset Command.
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
()[source]¶ Stateless hook for ObsReset() command functionality.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
class
AbortCommand
(target, state_model, logger=None)[source]¶ A class for the CspSubElementObsDevices’s Abort command.
Constructor for Abort Command.
- Parameters
target (object) – the object that this command acts upon; for example, the CspSubElementObsDevice device for which this class implements the command
state_model (
CspSubElementObsStateModel
) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
()[source]¶ Stateless hook for Abort() command functionality.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
ConfigureScan
(argin)[source]¶ Configure the observing device parameters for the current scan.
- Parameters
argin ('DevString') – JSON formatted string with the scan configuration.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
Scan
(argin)[source]¶ Start an observing scan.
- Parameters
argin ('DevString') – A string with the scan ID
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
EndScan
()[source]¶ End a running scan.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
GoToIdle
()[source]¶ Transit the device from READY to IDLE obsState.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
ObsReset
()[source]¶ Reset the observing device from a FAULT/ABORTED obsState to IDLE.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
Abort
()[source]¶ Abort the current observing process and move the device to ABORTED obsState.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
Instance attributes¶
Here it is reported the list of the instance attributes.
scan_id
: the identification number of the scan.
The scan ID is passed as argument of the Scan command.
The attribute value is reported via TANGO attribute scanID._sdp_addresses
: a python dictionary with the SDP destination addresses for the output products.
Depending on the sub-element (CBF, PSS, PST) this attribute can specify more than one destination address, as for example in CBF sub-element.
The SDP destination addresses are specified at configuration. An SDP address specifies the MAC address, IP address and port of the endpoint.
Below an example of how SDP addresses are specified in a Mid CBF configuration:{ ... "outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]], "outputMac": [[0, "06-00-00-00-00-01"]], "outputPort": [[0, 9000, 1], [8184, 9000, 1]] ... }
The value of this attribute is reported via the TANGO sdpDestionationAddresses attribute.
Note
Not all the Sub-element observing devices are connected to the SDP (for example Mid VCCs).
_sdp_links_active
: a python list of boolean. Each list element reports the network connectivity of the corresponding link to SDP._sdp_links_capacity
: this attribute records the capacity in GB/s of the SDP link._config_id
: it stores the unique identificator associated to a JSON scan configuration.
The value of this attribute is reported via the TANGO attriute configID._last_scan_configuration
: this attribute stores the last configuration successully programmed.
The value is reported via the TANGO attribute lastScanConfiguration._health_failure_msg
: The value is reported via the TANGO attribute healthFailureMesssage.