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, **kwargs)

SDP Subarray Leaf node is to monitor the SDP Subarray and issue control actions during an observation.

Abort()

Abort command. Not yet implememnted.

AssignResources(argin)

Assigns resources to given SDP subarray.

class AssignResourcesCommand(*args, **kwargs)

A class for SdpSubarayLeafNode’s AssignResources() 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)

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:A tuple containing a return code and a string message indicating status.

The message is for information purpose only.

Return type:(ResultCode, str)
Raises:Exception if command execution throws any type of exception ValueError if input argument json string contains invalid value. DevFailed if the command execution is not successful.
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
Raises:Exception if command execution throws any type of exception
Configure(argin)

Invokes Configure on SdpSubarrayLeafNode.

class ConfigureCommand(*args, **kwargs)

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
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:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
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 Exception if command execution throws any type of exception
EndSB()

This command invokes EndSB command on SDP subarray to end the current Scheduling block.

class EndSBCommand(*args, **kwargs)

A class for SdpSubarrayLeafNode’s EndSB() 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 EndSB command on SDP subarray to end the current Scheduling block.

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:DevFailed if the command execution is not successful. Exception if command execution throws any type of exception.
EndScan()

Invokes EndScan on SdpSubarrayLeafNode.

class EndScanCommand(*args, **kwargs)

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:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful. Exception if command execution throws any type of exception.
class InitCommand(*args, **kwargs)

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)
ReleaseAllResources()

Invokes ReleaseAllResources command on SdpSubarrayLeafNode.

class ReleaseAllResourcesCommand(*args, **kwargs)

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:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful. Exception if command execution throws any type of exception.
Scan(argin)

Invoke Scan command to SDP subarray.

class ScanCommand(*args, **kwargs)

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:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful. Exception if command execution throws any type of exception.
SdpSubarrayFQDN

Used by autodoc_mock_imports.

activeProcessingBlocks

Used by autodoc_mock_imports.

activityMessage

Used by autodoc_mock_imports.

always_executed_hook()

Internal construct of TANGO.

cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns. Checks whether the 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

Raises:

Exception if command execution throws any type of exception.

delete_device()

Internal construct of TANGO.

init_command_objects()

Initialises the command handlers for commands supported by this device.

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_EndSB_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.

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_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.

receiveAddresses

Used by autodoc_mock_imports.

sdpSubarrayHealthState

Used by autodoc_mock_imports.

sdpSubarrayObsState

Used by autodoc_mock_imports.

throw_exception(except_msg_list, read_actvity_msg)
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