Central Node

Central Node is a coordinator of the complete M&C system. Central Node implements the standard set of state and mode attributes defined by the SKA Control Model.

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

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

AssignResources(argin)

AssignResources command invokes the AssignResources command on lower level devices.

CentralAlarmHandler

Used by autodoc_mock_imports.

CspMasterLeafNodeFQDN

Used by autodoc_mock_imports.

DishLeafNodePrefix

Used by autodoc_mock_imports.

class InitCommand(*args, **kwargs)

A class for the TMC CentralNode’s init_device() method.

do()

Initializes the attributes and properties of the Central Node.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ReturnCode, str)
Raises:DevFailed if error occurs while initializing the CentralNode device or if error occurs while creating device proxy for any of the devices like SubarrayNode, DishLeafNode, CSPMasterLeafNode or SDPMasterLeafNode.
NumDishes

Used by autodoc_mock_imports.

ReleaseResources(argin)

Release all the resources assigned to the given Subarray.

SdpMasterLeafNodeFQDN

Used by autodoc_mock_imports.

StandByTelescope()

This command invokes SetStandbyLPMode() command on DishLeafNode, StandBy() command on CspMasterLeafNode and SdpMasterLeafNode and Off() command on SubarrayNode and sets CentralNode into OFF state.

StartUpTelescope()

This command invokes SetOperateMode() command on DishLeadNode, On() command on CspMasterLeafNode, SdpMasterLeafNode and SubarrayNode and sets the Central Node into ON state.

StowAntennas(argin)

This command stows the specified receptors.

TMAlarmHandler

Used by autodoc_mock_imports.

TMMidSubarrayNodes

Used by autodoc_mock_imports.

activityMessage

Used by autodoc_mock_imports.

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_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
Raises:DevFailed if this command is not allowed to be run in current device state
is_ReleaseResources_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_StandByTelescope_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_StartUpTelescope_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_StowAntennas_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.
read_activityMessage()

Internal construct of TANGO. Returns activity message.

read_subarray1HealthState()

Internal construct of TANGO. Returns Subarray1 health state.

read_subarray2HealthState()

Internal construct of TANGO. Returns Subarray2 health state.

read_subarray3HealthState()

Internal construct of TANGO. Returns Subarray3 health state.

read_telescopeHealthState()

Internal construct of TANGO. Returns the Telescope health state.

subarray1HealthState

Used by autodoc_mock_imports.

subarray2HealthState

Used by autodoc_mock_imports.

subarray3HealthState

Used by autodoc_mock_imports.

telescopeHealthState

Used by autodoc_mock_imports.

write_activityMessage(value)

Internal construct of TANGO. Sets the activity message.

tmcprototype.centralnode.src.centralnode.central_node.main(args=None, **kwargs)

Runs the CentralNode. :param args: Arguments internal to TANGO

Parameters:kwargs – Arguments internal to TANGO
Returns:CentralNode TANGO object.
tmcprototype.centralnode.src.centralnode.central_node.AssignResources

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.DeviceData

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.ObsStateAggregator

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.ReleaseResources

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.StandByTelescope

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.StartUpTelescope

Used by autodoc_mock_imports.

tmcprototype.centralnode.src.centralnode.central_node.StowAntennas

Used by autodoc_mock_imports.

AssignResources class for CentralNode.

class tmcprototype.centralnode.src.centralnode.assign_resources_command.AssignResources(*args, **kwargs)

A class for CentralNode’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:DevFailed if this command is not allowed to be run in current device state
do(argin)

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.

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”] } }
Return type:None
Raises:DevFailed when the API fails to allocate resources.

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

ReleaseResources class for CentralNode.

class tmcprototype.centralnode.src.centralnode.release_resources_command.ReleaseResources(*args, **kwargs)

A class for CentralNode’s ReleaseResources() 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(argin)

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.

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

StowAntennas class for CentralNode.

class tmcprototype.centralnode.src.centralnode.stow_antennas_command.StowAntennas(*args, **kwargs)

A class for CentralNode’s StowAntennas() 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(argin)

Invokes the command SetStowMode on the specified receptors.

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