Subarray Node¶
Subarray Node Low Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.subarray_node_low.
SubarrayNode
(*args, **kwargs)¶ Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.
-
class
InitCommand
(*args, **kwargs)¶ A class for the TMC SubarrayNode’s init_device() method.
-
do
()¶ Initializes the attributes and properties of the Subarray 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 the error while subscribing the tango attribute
-
-
MccsSubarrayFQDN
¶ Used by autodoc_mock_imports.
-
MccsSubarrayLNFQDN
¶ Used by autodoc_mock_imports.
-
activityMessage
¶ Used by autodoc_mock_imports.
-
always_executed_hook
()¶ Internal construct of TANGO.
-
calculate_observation_state
()¶ Calculates aggregated observation state of Subarray.
-
command_class_object
()¶ Sets up the command objects :return: None
-
delete_device
()¶ Internal construct of TANGO.
-
get_deviceproxy
(device_fqdn)¶ Returns device proxy for given FQDN.
-
health_state_cb
(event)¶ Receives the subscribed health states, aggregates them to calculate the overall subarray health state.
Parameters: evt – A event on MCCS Subarray 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
-
init_command_objects
()¶ Initialises the command handlers for commands supported by this device.
-
observation_state_cb
(evt)¶ Receives the subscribed MCCS Subarray obsState.
Parameters: evt – A event on MCCS Subarray ObsState.
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 SubarrayNode’s ObsState.
-
read_activityMessage
()¶ Internal construct of TANGO. Returns activityMessage. Example: “Subarray node is initialized successfully” //result occured after initialization of device.
-
read_scanID
()¶ Internal construct of TANGO. Returns the Scan ID.
EXAMPLE: 123 Where 123 is a Scan ID from configuration json string.
-
scanID
¶ Used by autodoc_mock_imports.
-
write_activityMessage
(value)¶ Internal construct of TANGO. Sets the activityMessage.
-
class
-
tmcprototype.subarraynodelow.src.subarraynodelow.subarray_node_low.
main
(args=None, **kwargs)¶ Runs the SubarrayNode. :param args: Arguments internal to TANGO :param kwargs: Arguments internal to TANGO :return: SubarrayNode TANGO object.
AssignResourcesCommand class for SubarrayNodeLow.
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.assign_resources_command.
AssignResourcesCommand
(*args, **kwargs)¶ A class for SubarrayNodelow’s AssignResources() command.
-
do
(argin)¶ Assigns the resources to the subarray. It accepts station ids, channels, station beam ids
Parameters: argin – DevString in JSON form containing following fields: station_ids: list of integers
channels: list of integers
station_beam_ids: list of integers
Example:
{“station_ids”: [1, 2], “channels”: [1, 2, 3, 4, 5, 6, 7, 8], “station_beam_ids”: [1]}
Returns: A tuple containing ResultCode and string.
-
ConfigureCommand class for SubarrayNodeLow.
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.configure_command.
ConfigureCommand
(*args, **kwargs)¶ A class for SubarrayNodeLow’s Configure() command.
-
do
(argin)¶ Configures the resources assigned to the Mccs Subarray.
Parameters: argin – DevString. JSON string example is:
{“mccs”:{“stations”:[{“station_id”:1,},{“station_id”:2,}],”station_beam_pointings”: [{“station_beam_id”:1,”target”:{“system”:”HORIZON”,”name”:”DriftScan”,”Az”:180.0,”El”:45.0}, “update_rate”:0.0,”channels”:[1,2,3,4,5,6,7,8]}]},”tmc”:{“scanDuration”:10.0}}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: JSONDecodeError if input argument json string contains invalid value DevFailed if the command execution is not successful.
-
EndCommand class for SubarrayNodeLow.
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.end_command.
EndCommand
(*args, **kwargs)¶ A class for SubarrayNodeLow’s End() command.
-
do
()¶ This command on Subarray Node Low invokes End command on MCCS Subarray Leaf Node.
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.
-
EndScanCommand class for SubarrayNodeLow.
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.end_scan_command.
EndScanCommand
(*args, **kwargs)¶ A class for SubarrayNodeLow’s EndScan() command.
-
do
()¶ Ends the scan. It is invoked on subarrayLow after completion of the scan duration. It can also be invoked by an external client while a scan is in progress, Which stops the scan immediately irrespective of the provided scan duration.
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 the command execution is not successful.
-
OffCommand class for SubarrayNodeLow
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.off_command.
OffCommand
(*args, **kwargs)¶ A class for the SubarrayNodes’s Off() command.
-
do
()¶ This command invokes Off Command on MCCSSubarray through mccs subarray leaf node. This comamnd changes Subaray device state from ON to OFF.
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
-
OnCommand class for SubarrayNodeLow
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.on_command.
OnCommand
(*args, **kwargs)¶ A class for the SubarrayNodeLow’s On() command.
-
do
()¶ This command invokes On Command on MCCSSubarray through MCCS Subarray Leaf node. This comamnd changes Subarray device state from OFF to ON.
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
-
ReleaseAllResourcesCommand for SubarrayNodeLow
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.release_all_resources_command.
ReleaseAllResourcesCommand
(*args, **kwargs)¶ A class for SKASubarrayLow’s ReleaseAllResources() command.
-
do
()¶ It invokes ReleaseAllResources command on Subarraylow.
Returns: A tuple containing a return code and RELEASEALLRESOURCES command invoked successfully as a string on successful release all resources. Example: RELEASEALLRESOURCES command invoked successfully as string on successful release all resources.
Return type: (ResultCode, str)
-
ScanCommand class for SubarrayNodeLow
-
class
tmcprototype.subarraynodelow.src.subarraynodelow.scan_command.
ScanCommand
(*args, **kwargs)¶ A class for SubarrayNodeLow’s Scan() command.
-
call_end_scan_command
()¶
-
do
(argin)¶ This command accepts id as input. And it Schedule scan on subarray from where scan command is invoked on MCCS subarray Leaf Node for the provided interval of time. It checks whether the scan is already in progress. If yes it throws error showing duplication of command.
Parameters: argin – DevString. JSON string containing id. JSON string example as follows:
{“id”: 1}
Note: Above JSON string can be used as an input argument while invoking this command from JIVE.
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 the command execution is not successful
-