Central Node

class tmcprototype.centralnode.src.centralnode.central_node.CentralNode(*args, **kwargs)

Central Node is a coordinator of the complete M&C system.

Device Properties

CentralAlarmHandler:
 Device name of CentralAlarmHandler
TMAlarmHandler:Device name of TMAlarmHandler
TMMidSubarrayNodes:
 List of TM Mid Subarray Node devices
NumDishes:Number of Dishes
DishLeafNodePrefix:
 Device name prefix for Dish Leaf Node
CspMasterLeafNodeFQDN:
 FQDN of CSP Master Leaf Node.
SdpMasterLeafNodeFQDN:
 FQDN of SDP Master Leaf Node.

Device Attributes

TelescopeHealthState:
 Health state of Telescope
Subarray1HealthState:
 Health state of Subarray1
Subarray2HealthState:
 Health state of Subarray2
Subarray3HealthState:
 Health state of Subarray3
ActivityMessage:
 String providing information about the current activity in Central Node.
class tmcprototype.centralnode.src.centralnode.assign_resources_command.AssignResources(*args, **kwargs)

A class for CentralNode’s AssignResources() command.

Assigns resources to given subarray. It accepts the subarray id, receptor id list and SDP block in JSON string format. Upon successful execution, the ‘receptorIDList’ attribute of the given subarray is populated with the given receptors.Also checking for duplicate allocation of resources is done. If already allocated it will throw error message regarding the prior existence of resource.

do(argin)

Method to invoke AssignResources command on Subarray.

Parameters:argin

The string in JSON format. The JSON contains following values:

subarrayID:
DevShort. Mandatory.
dish:
Mandatory JSON object consisting of
receptorIDList:
DevVarStringArray The individual string should contain dish numbers in string format with preceding zeroes upto 3 digits. E.g. 0001, 0002.
sdp:
Mandatory JSON object consisting of
id:
DevString The SBI id.
max_length:
DevDouble Maximum length of the SBI in seconds.
scan_types:
array of the blocks each consisting following parameters id:
DevString The scan id.
coordinate_system:
DevString
ra:
DevString
Dec:
DevString
processing_blocks:
array of the blocks each consisting following parameters id:
DevString The Processing Block id.
workflow:
type:
DevString
id:
DevString
version:
DevString
parameters:
{}
Example:
{“subarrayID”:1,”dish”:{“receptorIDList”:[“0001”,”0002”]},”sdp”:{“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: From Jive, enter above input string without any space.

Returns:A tuple containing a return code and a string in JSON format on successful assignment of given resources. The JSON string contains following values:
dish:
Mandatory JSON object consisting of
receptorIDList_success:
DevVarStringArray Contains ids of the receptors which are successfully allocated. Empty on unsuccessful allocation.
Example:
{ “dish”: { “receptorIDList_success”: [“0001”, “0002”] } }

Note: Enter input without spaces as:{“dish”:{“receptorIDList_success”:[“0001”,”0002”]}}

Return type:None
Raises:DevFailed when the API fails to allocate resources.
class tmcprototype.centralnode.src.centralnode.release_resources_command.ReleaseResources(*args, **kwargs)

A class for CentralNode’s ReleaseResources() command.

Release all the resources assigned to the given Subarray. It accepts the subarray id, releaseALL flag and receptorIDList in JSON string format. When the releaseALL flag is True, ReleaseAllResources command is invoked on the respective SubarrayNode. In this case, the receptorIDList tag is empty as all the resources of the Subarray are to be released. When releaseALL is False, ReleaseResources will be invoked on the SubarrayNode and the resources provided in receptorIDList tag, are to be released from the Subarray. The selective release of the resources when releaseALL Flag is False is not yet supported.

do(argin)

Method to invoke ReleaseResources command on Subarray.

Parameters:argin

The string in JSON format. The JSON contains following values:

subarrayID:
DevShort. Mandatory.
releaseALL:
Boolean(True or False). Mandatory. True when all the resources to be released from Subarray.
receptorIDList:
DevVarStringArray. Empty when releaseALL tag is True.
Example:
{
“subarrayID”: 1, “releaseALL”: true, “receptorIDList”: []

}

Note: From Jive, enter input as: {“subarrayID”:1,”releaseALL”:true,”receptorIDList”:[]} without any space.

Returns:A tuple containing a return code and a string in josn format on successful release of all the resources. The JSON string contains following values:
releaseALL:
Boolean(True or False). If True, all the resources are successfully released from the Subarray.
receptorIDList:
DevVarStringArray. If releaseALL is True, receptorIDList is empty. Else list returns resources (device names) that are noe released from the subarray.
Example:
argout = {
”ReleaseAll” : True, “receptorIDList” : []

}

rtype:

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 or command invocation on SubarrayNode is not successful

class tmcprototype.centralnode.src.centralnode.stand_by_telescope_command.StandByTelescope(*args, **kwargs)

A class for CentralNode’s StandByTelescope() command.

Sets the CentralNode into OFF state. Invokes the respective command on lower level nodes. Invokes command on DishLeaf node, SDPMasterLeaf node, CSPMasterLeaf node and Subarray Node.

do()

Method to invoke Off command on Lower level devices.

Param:None
Returns:A tuple containing a return code and a string message indicating status. The message is for information
Return type:(ResultCode, str)
class tmcprototype.centralnode.src.centralnode.start_up_telescope_command.StartUpTelescope(*args, **kwargs)

A class for CentralNode’s StartupCommand() command.

Setting the startup state to TRUE enables the telescope to accept subarray commands as per the subarray model. Set the CentralNode into ON state. Invokes ‘On’ command on DishLeaf node, SDPMasterLeaf node, CSPMasterLeaf node and Subarray Node.

do()

Method to invoke On command on Lower level devices.

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)
class tmcprototype.centralnode.src.centralnode.stow_antennas_command.StowAntennas(*args, **kwargs)

A class for CentralNode’s StowAntennas() command.

Invokes the command SetStowMode on the specified receptors.

do(argin)

Method to invoke StowAntennas command.

Parameters:

argin – List of Receptors to be stowed.

Returns:

None

Raises:

DevFailed if error occurs while invoking command of DishLeafNode

ValueError if error occurs if input argument json string contains invalid value