SDP Subarray Leaf Node
SDP Subarray Leaf node is to monitor the SDP Subarray and issue control actions during an observation. It also acts as a SDP contact point for Subarray Node for observation execution.
- class tmcprototype.sdpsubarrayleafnode.src.sdpsubarrayleafnode.sdp_subarray_leaf_node.SdpSubarrayLeafNode(*args: Any, **kwargs: Any)
SDP Subarray Leaf node is to monitor the SDP Subarray and issue control actions during an observation.
- class AbortCommand(*args: Any, **kwargs: Any)
A class for sdpSubarrayLeafNode’s Abort() command.
- abort_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the abort command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- do()
Command to abort the current operation being done on the SDP subarray.
- Returns
None
- Raises
DevFailed if error occurs while invoking command on CSPSubarray.
- class AssignResourcesCommand(*args: Any, **kwargs: Any)
A class for SdpSubarayLeafNode’s AssignResources() command.
- AssignResources_ended(event)
This is the callback method of AssignResources command of the SDP Subarray. It checks whether the AssignResources command on SDP subarray is successful.
- Parameters
argin – event: response from SDP Subarray for the invoked assign resource command.
- Returns
None
- check_allowed()
Checks whether this command is allowed to be run in current device state.
- Returns
True if this command is allowed to be run in current device state.
- Return type
boolean
- Raises
Exception if command execution throws any type of exception.
- do(argin)
Assigns resources to given SDP subarray. This command is provided as a noop placeholder from SDP subarray. Eventually this will likely take a JSON string specifying the resource request.
- Parameters
argin – The string in JSON format. The JSON contains following values:
- SBI ID and maximum length of the SBI:
Mandatory JSON object consisting of
- SBI ID :
String
- max_length:
Float
- Scan types:
Consist of Scan type id name
- scan_type:
DevVarStringArray
- Processing blocks:
Mandatory JSON object consisting of
- processing_blocks:
DevVarStringArray
- Example:
{“id”:”sbi-mvp01-20200325-00001”,”max_length”:100.0,”scan_types”:[{“id”:”science_A”, “coordinate_system”:”ICRS”,”ra”:”02:42:40.771”,”dec”:”-00:00:47.84”,”channels”:[{“count” :744,”start”:0,”stride”:2,”freq_min”:0.35e9,”freq_max”:0.368e9,”link_map”:[[0,0],[200,1], [744,2],[944,3]]},{“count”:744,”start”:2000,”stride”:1,”freq_min”:0.36e9,”freq_max”:0.368e9, “link_map”:[[2000,4],[2200,5]]}]},{“id”:”calibration_B”,”coordinate_system”:”ICRS”,”ra”: “12:29:06.699”,”dec”:”02:03:08.598”,”channels”:[{“count”:744,”start”:0,”stride”:2, “freq_min”:0.35e9,”freq_max”:0.368e9,”link_map”:[[0,0],[200,1],[744,2],[944,3]]},{“count”:744, “start”:2000,”stride”:1,”freq_min”:0.36e9,”freq_max”:0.368e9,”link_map”:[[2000,4],[2200,5]]}]}] ,”processing_blocks”:[{“id”:”pb-mvp01-20200325-00001”,”workflow”:{“type”:”realtime”,”id”: “vis_receive”,”version”:”0.1.0”},”parameters”:{}},{“id”:”pb-mvp01-20200325-00002”,”workflow”: {“type”:”realtime”,”id”:”test_realtime”,”version”:”0.1.0”},”parameters”:{}},{“id”: “pb-mvp01-20200325-00003”,”workflow”:{“type”:”batch”,”id”:”ical”,”version”:”0.1.0”},”parameters” :{},”dependencies”:[{“pb_id”:”pb-mvp01-20200325-00001”,”type”:[“visibilities”]}]},{“id”: “pb-mvp01-20200325-00004”,”workflow”:{“type”:”batch”,”id”:”dpreb”,”version”:”0.1.0”},”parameters” :{},”dependencies”:[{“pb_id”:”pb-mvp01-20200325-00003”,”type”:[“calibration”]}]}]}
Note: Enter input without spaces
- Returns
None
- Raises
ValueError if input argument json string contains invalid value. DevFailed if the command execution is not successful.
- class ConfigureCommand(*args: Any, **kwargs: Any)
A class for SdpSubarrayLeafNode’s Configure() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
Exception if command execution throws any type of exception
- configure_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the configure command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- do(argin)
Configures the SDP Subarray device by providing the SDP PB configuration needed to execute the receive workflow
- Parameters
argin – The string in JSON format. The JSON contains following values:
Example:
{ “scan_type”: “science_A” }
- Returns
None
- Raises
ValueError if input argument json string contains invalid value. KeyError if input argument json string contains invalid key. DevFailed if the command execution is not successful
- class EndCommand(*args: Any, **kwargs: Any)
A class for SdpSubarrayLeafNode’s End() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state.
- Returns
True if this command is allowed to be run in current device state.
- Return type
boolean
- Raises
Exception if command execution throws any type of exception.
- do()
This command invokes End command on SDP subarray to end the current Scheduling block.
- Returns
None
- Raises
DevFailed if the command execution is not successful.
- end_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the end command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class EndScanCommand(*args: Any, **kwargs: Any)
A class for SdpSubarrayLeafNode’s EndScan() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
Exception if command execution throws any type of exception.
- do()
It invokes EndScan command on SdpSubarray. This command is allowed when SdpSubarray is in SCANNING state.
- Parameters
argin – None
- Returns
None
- Raises
DevFailed if the command execution is not successful.
- endscan_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the endscan command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class InitCommand(*args: Any, **kwargs: Any)
A class for the TMC SdpSubarrayLeafNode’s init_device() method.
- do()
Initializes the attributes and properties of the SdpSubarrayLeafNode.
- 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(*args: Any, **kwargs: Any)
A class for SdpSubarrayLeafNode’s ObsResetCommand() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- do()
Command to reset the SDP subarray and bring it to its RESETTING state.
- Parameters
argin – None
- Returns
None
- Raises
DevFailed if error occurs while invoking command on SDPSubarray.
- obsreset_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the ObsResetCommand has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class OffCommand(*args: Any, **kwargs: Any)
A class for SDP master’s Off() command.
- do()
Sets the OperatingState to Off.
- Parameters
argin – None.
- Returns
A tuple containing a return code and a string message indicating status.
The message is for information purpose only.
- Return type
(ResultCode, str)
- off_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the off command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class OnCommand(*args: Any, **kwargs: Any)
A class for SDP Subarray’s On() command.
- do()
- Parameters
argin – None.
- Returns
A tuple containing a return code and a string message indicating status.
The message is for information purpose only.
- Return type
(ResultCode, str)
- on_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the On command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class ReleaseAllResourcesCommand(*args: Any, **kwargs: Any)
A class for SdpSubarayLeafNode’s ReleaseAllResources() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
Exception if command execution throws any type of exception
- do()
Releases all the resources of given SDPSubarrayLeafNode. It accepts the subarray id, releaseALL flag and receptorIDList in JSON string format.
- Parameters
argin – None.
- Returns
None
- Raises
DevFailed if the command execution is not successful.
- releaseallresources_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the releaseallresources command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class RestartCommand(*args: Any, **kwargs: Any)
A class for sdpSubarrayLeafNode’s Restart() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- do()
Command to restart the SDP subarray and bring it to its ON state.
- Returns
None
- Raises
DevFailed if error occurs while invoking command on SDPSubarray.
- restart_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the restart command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
This class is used to pass data to the callback method in asynchronous callback model for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- class ScanCommand(*args: Any, **kwargs: Any)
A class for SdpSubarrayLeafNode’s Scan() command.
- check_allowed()
Checks whether this command is allowed to be run in current device state.
- Returns
True if this command is allowed to be run in current device state.
- Return type
boolean
- Raises
Exception if command execution throws any type of exception.
- do(argin)
Invoke Scan command to SDP subarray.
- Parameters
argin – The string in JSON format. The JSON contains following values:
Example: {“id”:1}
Note: Enter input as without spaces:{“id”:1}
- Returns
None
- Raises
DevFailed if the command execution is not successful.
- scan_cmd_ended_cb(event)
Callback function immediately executed when the asynchronous invoked command returns. Checks whether the scan command has been successfully invoked on SDP Subarray.
- Parameters
event – A CmdDoneEvent object.
- This class is used to pass data to the callback method in asynchronous callback model
for command execution.
- Type
CmdDoneEvent object
- It has the following members:
device : (DeviceProxy) The DeviceProxy object on which the call was executed.
cmd_name : (str) The command name
argout_raw : (DeviceData) The command argout
argout : The command argout
err : (bool) A boolean flag set to true if the command failed. False otherwise
errors : (sequence<DevError>) The error stack
ext
- Returns
none
- always_executed_hook()
Internal construct of TANGO.
- delete_device()
Internal construct of TANGO.
- init_command_objects()
Initialises the command handlers for commands supported by this device.
- is_Abort_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- is_AssignResources_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- is_Configure_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- is_EndScan_allowed()
Checks whether this command is allowed to be run in current device state. :return: True if this command is allowed to be run in current device state. :rtype: boolean
- is_End_allowed()
Checks whether this command is allowed to be run in current device state.
- Returns
True if this command is allowed to be run in current device state.
- Return type
boolean
- is_ObsReset_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- is_ReleaseAllResources_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- is_Restart_allowed()
Checks whether this command is allowed to be run in current device state
- Returns
True if this command is allowed to be run in current device state
- Return type
boolean
- Raises
DevFailed if this command is not allowed to be run in current device state
- is_Scan_allowed()
Checks whether this command is allowed to be run in current device state.
- Returns
True if this command is allowed to be run in current device state.
- Return type
boolean
- read_activeProcessingBlocks()
Internal construct of TANGO. Returns Active Processing Blocks.activeProcessingBlocks is a forwarded attribute from SDP Subarray which depicts the active Processing Blocks in the SDP Subarray
- read_activityMessage()
Internal construct of TANGO. Returns Activity Messages. activityMessage is a String providing information about the current activity in SDP Subarray Leaf Node
- read_receiveAddresses()
Internal construct of TANGO. Returns the Receive Addresses. receiveAddresses is a forwarded attribute from SDP Master which depicts State of the SDP.
- validate_obs_state()
- write_activityMessage(value)
Internal construct of TANGO. Sets the Activity Message. activityMessage is a String providing information about the current activity in SDP Subarray Leaf Node.
- write_receiveAddresses(value)
Internal construct of TANGO. Sets the Receive Addresses. receiveAddresses is a forwarded attribute from SDP Master which depicts State of the SDP.
- tmcprototype.sdpsubarrayleafnode.src.sdpsubarrayleafnode.sdp_subarray_leaf_node.main(args=None, **kwargs)
Runs the SdpSubarrayLeafNode
- Parameters
args – Arguments internal to TANGO
kwargs – Arguments internal to TANGO
- Returns
SdpSubarrayLeafNode TANGO object