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.centralnodelow.src.centralnodelow.central_node_low.
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.
-
class
AssignResourcesCommand
(*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, station ids, station beam id and channels in JSON string format.
Parameters: argin – The string in JSON format. The JSON contains following values:
- subarray_id:
- DevShort. Mandatory. Sub-Array to allocate resources to
- station_ids:
- DevArray. Mandatory list of stations contributing beams to the data set
- channels:
- DevArray. Mandatory list of frequency channels used
- station_beam_ids:
- DevArray. Mandatory logical ID of beam
- Example:
- {
- “subarray_id”: 1, “station_ids”: [1,2], “channels”: [1,2,3,4,5,6,7,8], “station_beam_ids”: [1]
}
Note: From Jive, enter above input string without any space.
Returns: None Raises: DevFailed if error occurs while invoking command on any of the devices like SubarrayNode, MCCSMasterLeafNode Note: Enter input without spaces as:{“subarray_id”:1,”station_ids”:[1,2],”channels”:[1,2,3,4,5,6,7,8],”station_beam_ids”:[1]}
-
-
CentralAlarmHandler
¶ 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 Low.
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 SubarrayNodeLow or MccsMasterLeafNode.
-
-
MCCSMasterLeafNodeFQDN
¶ Used by autodoc_mock_imports.
-
ReleaseResources
(argin)¶ Release all the resources assigned to the given Subarray.
-
class
ReleaseResourcesCommand
(*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, release_all flag in JSON string format. When the release_all flag is True, ReleaseAllResources command is invoked on the respective SubarrayNode.
Parameters: argin – The string in JSON format. The JSON contains following values:
- subarray_id:
- DevShort. Mandatory.
- release_all:
- Boolean(True or False). Mandatory. True when all the resources to be released from Subarray.
- Example:
- {
- “subarray_id”: 1, “release_all”: true,
}
- Note: From Jive, enter input as:
- {“subarray_id”:1,”release_all”:true} without any space.
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
-
-
StandByTelescope
()¶ This command invokes Off() command on SubarrayNode, MCCSMasterLeafNode and sets CentralNode into OFF state.
-
class
StandByTelescopeCommand
(*args, **kwargs)¶ A class for Low CentralNode’s StandByTelescope() 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
()¶ Sets the CentralNodeLow into OFF state. Invokes the respective command on lower level nodes and devices.
param 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 error occurs while invoking command on any of the devices like SubarrayNode or MccsMasterLeafNode.
-
-
StartUpTelescope
()¶ This command invokes On() command on SubarrayNode, MCCSMasterLeafNode and sets the Central Node into ON state.
-
class
StartUpTelescopeCommand
(*args, **kwargs)¶ A class for Low CentralNode’s StartupCommand() 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
()¶ Setting the startup state to TRUE enables the telescope to accept subarray commands as per the subarray model. Set the CentralNode into ON 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 error occurs while invoking command on any of the devices like SubarrayNode or MccsMasterLeafNode.
-
-
TMAlarmHandler
¶ Used by autodoc_mock_imports.
-
TMLowSubarrayNodes
¶ Used by autodoc_mock_imports.
-
activityMessage
¶ Used by autodoc_mock_imports.
-
always_executed_hook
()¶ Internal construct of TANGO.
-
delete_device
()¶ Internal construct of TANGO.
-
health_state_cb
(evt)¶ Receives the subscribed Subarray health state and MCCS Master Leaf Node health state, aggregates them to calculate the telescope health state.
Parameters: evt – A event on Subarray healthState and MCCSMasterLeafNode healthstate.
Type: Event object It has the following members:
- date (event timestamp)
- reception_date (event reception timestamp)
- type (event type)
- dev_name (device name)
- name (attribute name)
- value (event value)
Returns: None
Raises: KeyError if error occurs while setting telescope healthState
-
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_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
-
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
-
read_activityMessage
()¶ Internal construct of TANGO. Returns activity message.
-
read_subarray1HealthState
()¶ Internal construct of TANGO. Returns Subarray1 health state.
-
read_telescopeHealthState
()¶ Internal construct of TANGO. Returns the Telescope health state.
-
subarray1HealthState
¶ Used by autodoc_mock_imports.
-
telescopeHealthState
¶ Used by autodoc_mock_imports.
-
write_activityMessage
(value)¶ Internal construct of TANGO. Sets the activity message.
-
-
tmcprototype.centralnodelow.src.centralnodelow.central_node_low.
main
(args=None, **kwargs)¶ Runs the CentralNode. :param args: Arguments internal to TANGO
Parameters: kwargs – Arguments internal to TANGO Returns: CentralNode TANGO object.