ska_tmc_subarraynode.commands package
Submodules
ska_tmc_subarraynode.commands.abstract_command module
- class ska_tmc_subarraynode.commands.abstract_command.AbstractOnOff(*args: Any, **kwargs: Any)
Bases:
ska_tmc_common.tmc_command.ska_tmc_common.tmc_command.TMCCommand._name
- check_allowed_low()
Checks whether this command is allowed It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive
- Returns
True if this command is allowed
- Return type
boolean
- check_allowed_mid()
Checks whether this command is allowed It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive
- Returns
True if this command is allowed
- Return type
boolean
- init_adapters_low()
- init_adapters_mid()
- class ska_tmc_subarraynode.commands.abstract_command.SubarrayNodeCommand(*args: Any, **kwargs: Any)
Bases:
ska_tmc_common.tmc_command.ska_tmc_common.tmc_command.TMCCommand._name
- check_allowed()
- do(argin=None)
- init_adapters()
- is_allowed(raise_if_disallowed=False)
- is_allowed_low(raise_if_disallowed)
- is_allowed_mid(raise_if_disallowed)
ska_tmc_subarraynode.commands.assign_resources_command module
AssignResourcesCommand class for SubarrayNode.
- class ska_tmc_subarraynode.commands.assign_resources_command.AssignResources(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.AssignResourcesCommand._name
A class for SubarrayNode’s AssignResources() command.
Assigns resources to the subarray. It accepts receptor id list as well as SDP resources string as a DevString. Upon successful execution, the ‘receptorIDList’ attribute of the subarray is updated with the list of receptors and SDP resources string is pass to SDPSubarrayLeafNode, and returns list of assigned resources as well as passed SDP string as a DevString.
Note: Resource allocation for CSP and SDP resources is also implemented but currently CSP accepts only receptorIDList and SDP accepts resources allocated to it.
- assign_csp_resources(receptor_ids)
This function accepts the receptor IDs list as input and invokes the assign resources command on the CSP Subarray Leaf Node.
- Parameters
argin –
List of strings Contains the list of strings that has the resources ids. Currently this list contains only receptor ids.
Example: [‘0001’, ‘0002’]
- Returns
List of strings. Returns the list of CSP resources successfully assigned to the Subarray. Currently, the CSPSubarrayLeafNode.AssignResources function returns void. The function only loops back the input argument in case of successful resource allocation, or returns exception object in case of failure.
- assign_sdp_resources(argin)
This function accepts the receptor ID list as input and assigns SDP resources to SDP Subarray through SDP Subarray Leaf Node.
- Parameters
argin – List of strings Contains the list of strings that has the resources ids. Currently processing block ids are passed to this function.
- Returns
List of strings.
Example: [‘PB1’, ‘PB2’]
Returns the list of successfully assigned resources. Currently the SDPSubarrayLeafNode.AssignResources function returns void. Thus, this function just loops back the input argument in case of success or returns exception object in case of failure.
- do(argin=None)
- do_low(argin)
Method to invoke AssignResources command on Subarraynode low.
- Parameters
argin –
DevString in JSON form containing following fields: interface: Schema to allocate assign resources.
- mccs:
subarray_beam_ids: list of integers
station_ids: list of integers
channel_blocks: list of integers
Example:
{“interface”:”https://schema.skao.int/ska-low-tmc-assignedresources/2.0”,”mccs”:{“subarray_beam_ids”:[1],”station_ids”:[[1,2]],”channel_blocks”:[3]}}
- Returns
A tuple containing ResultCode and string.
- do_mid(argin)
Method to invoke AssignResources command on subarraynode mid.
- Parameters
argin – DevString.
Example:
{“interface”:”https://schema.skao.int/ska-tmc-assignresources/2.0”,”subarray_id”:1, “dish”:{“receptor_ids”:[“0001”]},”sdp”:{“interface”: “https://schema.skao.int/ska-sdp-assignres/0.3”,”eb_id”:”eb-mvp01-20200325-00001”, “max_length”:100.0,”scan_types”:[{“scan_type_id”:”science_A”,”reference_frame”:”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]]}]},{“scan_type_id”:”calibration_B”,”reference_frame”:”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”:[{“pb_id”:”pb-mvp01-20200325-00001”, “workflow”:{“kind”:”realtime”,”name”:”vis_receive”,”version”:”0.1.0”},”parameters”:{}}, {“pb_id”:”pb-mvp01-20200325-00002”,”workflow”:{“kind”:”realtime”,”name”:”test_realtime”, “version”:”0.1.0”},”parameters”:{}},{“pb_id”:”pb-mvp01-20200325-00003”,”workflow”: {“kind”:”batch”,”name”:”ical”,”version”:”0.1.0”},”parameters”:{},”dependencies”:[{“pb_id”: “pb-mvp01-20200325-00001”,”kind”:[“visibilities”]}]},{“pb_id”:”pb-mvp01-20200325-00004”, “workflow”:{“kind”:”batch”,”name”:”dpreb”,”version”:”0.1.0”},”parameters”:{}, “dependencies”:[{“pb_id”:”pb-mvp01-20200325-00003”,”kind”:[“calibration”]}]}]}}
- Returns
A tuple containing a return code and string of Resources added to the Subarray. Example of string of Resources : [“0001”,”0002”] as argout if allocation successful.
- rtype:
(ResultCode, str)
- Raises
ValueError if input argument json string contains invalid value –
Exception if the command execution is not successful –
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Method to check whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Method to check whether this command is allowed in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- set_up_dish_data(receptor_ids)
Adds the receptors in dish leaf node group. The healthState and pointintgState attributes of all all the dishes are subscribed.
Note: Currently there are only receptors allocated so the group contains only receptor ids.
- Parameters
receptor_ids – List of receptor IDs to be allocated to subarray. Example: [‘0001’, ‘0002’]
- Returns
List of Resources added to the Subarray. Example: [‘0001’, ‘0002’]
ska_tmc_subarraynode.commands.configure_command module
Configure Command class for SubarrayNode.
- class ska_tmc_subarraynode.commands.configure_command.Configure(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.ConfigureCommand._name
A class for SubarrayNode’s Configure() command.
Configures the resources assigned to the Subarray.The configuration data for SDP, CSP and Dish is extracted out of the input configuration string and relayed to the respective underlying devices (SDP Subarray Leaf Node, CSP Subarray Leaf Node and Dish Leaf Node).
- check_only_dish_config(scan_configuration)
- do(argin=None)
- do_low(argin)
Method to invoke Configure command on the Mccs Subarray Leaf Node.
- Parameters
argin – DevString.
JSON string example is:
{“interface”:”https://schema.skao.int/ska-low-tmc-configure/2.0”,”transaction_id”:”txn-….-00001”,”mccs”:{“stations”:[{“station_id”:1},{“station_id”:2}],”subarray_beams”:[{“subarray_beam_id”:1,”station_ids”:[1,2],”update_rate”:0.0,”channels”:[[0,8,1,1],[8,8,2,1],[24,16,2,1]],”antenna_weights”:[1.0,1.0,1.0],”phase_centre”:[0.0,0.0],”target”:{“reference_frame”:”HORIZON”,”target_name”:”DriftScan”,”az”:180.0,”el”:45.0}}]},”sdp”:{},”tmc”:{“scan_duration”:10.0}}
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ReturnCode, str)
- do_mid(argin)
Method to invoke Configure command.
- Parameters
argin – DevString.
JSON string that includes pointing parameters of Dish - Azimuth and Elevation Angle, CSP Configuration and SDP Configuration parameters. JSON string example is: {“interface”:”https://schema.skao.int/ska-tmc-configure/2.0”,”transaction_id”:”txn-….-00001”, “pointing”:{“target”:{“reference_frame”:”ICRS”,”target_name”:”Polaris Australis”,”ra”:”21:08:47.92”, “dec”:”-88:57:22.9”}},”dish”:{“receiver_band”:”1”},”csp”:{“interface”: “https://schema.skao.int/ska-csp-configure/2.0”,”subarray”:{“subarray_name”:”science period 23”}, “common”:{“config_id”:”sbi-mvp01-20200325-00001-science_A”,”frequency_band”:”1”,”subarray_id”:1}, “cbf”:{“fsp”:[{“fsp_id”:1,”function_mode”:”CORR”,”frequency_slice_id”:1,”integration_factor”:1, “zoom_factor”:0,”channel_averaging_map”:[[0,2],[744,0]],”channel_offset”:0,”output_link_map”: [[0,0],[200,1]]},{“fsp_id”:2,”function_mode”:”CORR”,”frequency_slice_id”:2,”integration_factor”:1, “zoom_factor”:1,”channel_averaging_map”:[[0,2],[744,0]],”channel_offset”:744,”output_link_map”: [[0,4],[200,5]],”zoom_window_tuning”:650000}],”vlbi”:{}},”pss”:{},”pst”:{}},”sdp”:{“interface”: “https://schema.skao.int/ska-sdp-configure/0.3”,”scan_type”:”science_A”},”tmc”:{“scan_duration”:10.0}}
Note: While invoking this command from JIVE, provide above JSON string without any space.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ReturnCode, str)
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Method to check whether this command is allowed in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- class ska_tmc_subarraynode.commands.configure_command.ElementDeviceData
Bases:
object
- static build_up_csp_cmd_data(scan_config, delay_model_subscription, receive_addresses_map, component_manager)
Here the input data for CSP is build which is used in configuration of CSP. Below is the csp_config_schema variable value generated by using ska_telmodel library.
{“interface”:”https://schema.skao.int/ska-csp-configure/2.0”,”subarray”:{“subarray_name”: “science period 23”},”common”:{“config_id”:”sbi-mvp01-20200325-00001-science_A”, “frequency_band”:”1”,”subarray_id”:1},”cbf”:{“fsp”:[{“fsp_id”:1,”function_mode”:”CORR”, “frequency_slice_id”:1,”integration_factor”:1,”zoom_factor”:0,”channel_averaging_map”: [[0,2],[744,0]],”channel_offset”:0,”output_link_map”:[[0,0],[200,1]],”output_host”: [[0,”192.168.0.1”],[400,”192.168.0.2”]],”output_mac”:[[0,”06-00-00-00-00-00”]], “output_port”:[[0,9000,1],[400,9000,1]]},{“fsp_id”:2,”function_mode”:”CORR”, “frequency_slice_id”:2,”integration_factor”:1,”zoom_factor”:1,”channel_averaging_map”: [[0,2],[744,0]],”channel_offset”:744,”output_link_map”:[[0,4],[200,5]],”zoom_window_tuning”: 650000,”output_host”:[[0,”192.168.0.3”],[400,”192.168.0.4”]],”output_mac”: [[0,”06-00-00-00-00-01”]],”output_port”:[[0,9000,1],[400,9000,1]]}],”vlbi”:{}},”pss”:{},”pst”:{}}
- Returns
csp confiuration schema
- static build_up_dsh_cmd_data(scan_config, component_manager)
- static build_up_sdp_cmd_data(scan_config, component_manager)
ska_tmc_subarraynode.commands.end_command module
A class for TMC SubarrayNode’s End() command
- class ska_tmc_subarraynode.commands.end_command.End(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.EndCommand._name
A class for SubarrayNode’s End() command.
This command on Subarray Node invokes End command on CSP Subarray Leaf Node and SDP Subarray Leaf Node, and stops tracking of all the assigned dishes.
- do(argin=None)
- do_low()
Method to invoke 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.
- rtype:
(ResultCode, str)
- do_mid()
Method to invoke End command on CSP Subarray Leaf Node, SDP Subarray Leaf Node and Dish Leaf Nodes.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- end_csp()
End command on CSP Subarray Leaf Node
- end_sdp()
End command on SDP Subarray Leaf Node
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- stop_dish_tracking()
ska_tmc_subarraynode.commands.end_scan_command module
A class for TMC SubarrayNode’s EndScan() command.
- class ska_tmc_subarraynode.commands.end_scan_command.EndScan(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.EndScanCommand._name
A class for SubarrayNode’s EndScan() command.
Ends the scan. It is invoked on subarray 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.
- do(argin=None)
- do_low()
Method to invoke Endscan command.
- Returns
None
- Raises
DevFailed if the command execution is not successful. –
- do_mid()
Method to invoke Endscan command.
- Returns
None
- Raises
DevFailed if the command execution is not successful. –
- end_scan()
- end_scan_low()
- end_scan_mccs()
set up mccs devices
- end_scan_mid()
- endscan_csp()
set up csp devices
- endscan_sdp()
set up sdp devices
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
ska_tmc_subarraynode.commands.obsreset_command module
ObsReset Command for SubarrayNode.
- class ska_tmc_subarraynode.commands.obsreset_command.ObsReset(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.ObsResetCommand._name
A class for SubarrayNode’s ObsReset() command.
This command invokes ObsReset command on CspSubarrayLeafNode, SdpSubarrayLeafNode and DishLeafNode.
- do(argin=None)
- do_low()
Method to invoke ObsReset 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.
- rtype:
(ResultCode, str)
- do_mid()
Method to invoke ObsReset command on CSP Subarray Leaf Node, SDP Subarray Leaf Node and Dish Leaf Nodes.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- get_csp_subarray_obsstate()
- get_sdp_subarray_obsstate()
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- obsreset_csp()
Invoke ObsReset command on CSP Subarray Leaf Node.
- obsreset_sdp()
Invoke ObsReset command on SDP Subarray Leaf Node.
- obsrest_dish()
Invoke ObsReset command on Dish Leaf Node.
ska_tmc_subarraynode.commands.release_all_resources_command module
ReleaseAllResources Command for SubarrayNode
- class ska_tmc_subarraynode.commands.release_all_resources_command.ReleaseAllResources(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.ReleaseAllResourcesCommand._name
A class for SKASubarray’s ReleaseAllResources() command.
It checks whether all resources are already released. If yes then it returns code FAILED. If not it Releases all the resources from the subarray i.e. Releases resources from TMC Subarray Node, CSP Subarray and SDP Subarray. Upon successful execution, all the resources of a given subarray get released and empty array is returned. Selective release is not yet supported.
- clean_up()
Removes group of dishes from tango group client.
Unsubscribes events for dish health state and dish pointing state.
Cleans dictionaries of the resources across the subarraynode.
Note: Currently there are only receptors allocated so the group contains only receptor ids.
- Parameters
argin – None
- Returns
None
- do()
- do_low()
Method to invoke ReleaseAllResources command.
- Returns
A tuple containing a return code STARTED on successful release all resources and message.
- rtype:
(ResultCode, str)
- do_mid()
Method to invoke ReleaseAllResources command.
- Returns
A tuple containing a return code and “” as a string on successful release all resources.
- rtype:
(ResultCode, str)
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Method to check whether this command is allowed in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- release_csp_resources()
This function invokes releaseAllResources command on CSP Subarray via CSP Subarray Leaf Node.
- Parameters
argin – DevVoid
- Returns
DevVoid
- release_sdp_resources()
This function invokes releaseAllResources command on SDP Subarray via SDP Subarray Leaf Node.
- Parameters
argin – DevVoid
- Returns
DevVoid
ska_tmc_subarraynode.commands.reset_command module
Reset Command for SubarrayNode.
- class ska_tmc_subarraynode.commands.reset_command.Reset(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKABaseDevice.ska_tango_base.SKABaseDevice.ResetCommand._name
A class for SubarrayNode’s Reset() command.
- do(argin=None)
- do_low(argin=None)
” Method to invoke Reset command on TMC Low Devices.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- Raises
DevFailed. –
- do_mid(argin=None)
” Method to invoke Reset command on SubarrayNode.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- Raises
Exception. –
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
ska_tmc_subarraynode.commands.restart_command module
Restart Command for SubarrayNode.
- class ska_tmc_subarraynode.commands.restart_command.Restart(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.RestartCommand._name
A class for SubarrayNode’s Restart() command.
- clean_up()
Removes group of dishes from tango group client.
Unsubscribes events for dish health state and dish pointing state.
Cleans dictionaries of the resources across the subarraynode.
Note: Currently there are only receptors allocated so the group contains only receptor ids.
- Parameters
argin – None
- Returns
None
- do()
- do_low()
This command on Subarray Node Low invokes Restart command on MCCS Subarray Leaf Node and restarts the ongoing activity.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- Raises
Exception if error occurs while invoking command on MCCS Subarray Leaf Node. –
- do_mid()
This method invokes Restart command on CSPSubarrayLeafNode, SDpSubarrayLeafNode and DishLeafNode.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- rtype:
(ResultCode, str)
- Raises
Exception if error occurs while invoking command on CSPSubarrayLeafNode, SDpSubarrayLeafNode or –
DishLeafNode. –
- get_csp_subarray_obstate()
- get_mccs_subarray_obstate()
- get_sdp_subarray_obstate()
- get_subarray_obstate(dev_name)
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model. :param raise_if_disallowed: whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- restart_csp()
set up csp devices
- restart_dishes()
- restart_sdp()
set up sdp devices
ska_tmc_subarraynode.commands.scan_command module
A class for TMC SubarrayNode’s Scan() command
- class ska_tmc_subarraynode.commands.scan_command.Scan(*args: Any, **kwargs: Any)
Bases:
ska_tango_base.SKASubarray.ska_tango_base.SKASubarray.ScanCommand._name
A class for SubarrayNode’s Scan() command.
The command accepts Scan id as an input and executes a scan on the subarray. Scan command is invoked on respective CSP and SDP subarray 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.
- do(argin=None)
- do_low(argin)
Method to invoke Scan command.
- Parameters
argin – DevString. JSON string containing id.
JSON string example as follows:
{“interface”:”https://schema.skao.int/ska-low-tmc-scan/2.0”,”transaction_id”:”txn-….-00001”,”scan_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.
- rtype:
(ReturnCode, str)
- Raises
DevFailed if the command execution is not successful –
- do_mid(argin)
Method to invoke Scan command.
- Parameters
argin – DevString. JSON string containing id.
- Example
{ “interface”: “https://schema.skao.intg/ska-tmc-scan/2.0”, “transaction_id”: “txn-….-00001”, “scan_id”: 1 }
Note: Above JSON string can be used as an input argument while invoking this command from JIVE.
return: A tuple containing a return code and a string message indicating status. The message is for information purpose only.
rtype: (ReturnCode, str)
- is_allowed(raise_if_disallowed=True)
- is_allowed_low(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- is_allowed_mid(raise_if_disallowed)
Whether this command is allowed to run in the current state of the state model.
- Parameters
raise_if_disallowed – whether to raise an error or simply return False if the command is disallowed
- Returns
whether this command is allowed to run
- Return type
boolean
- scan_csp(argin)
set up csp devices
- scan_mccs(argin)
set up mccs devices
- scan_sdp(argin)
set up sdp devices
- start_scan_timer(scan_duration)
- update_mccs_json(input_scan)
This Scan command input string is updated to send to MCCS SubarrayLeafNode.
ska_tmc_subarraynode.commands.off_command module
- class ska_tmc_subarraynode.commands.off_command.Off(*args: Any, **kwargs: Any)
Bases:
ska_tmc_common.tmc_command.ska_tmc_common.tmc_command.TMCCommand._name
A class for Subarraynode’s Off() command.
- do_low(argin=None)
Method to invoke off command on the MCCS Subarray Leaf Node. param: None
return: A tuple containing a return code and a string message indicating status.
rtype: (ResultCode, str)
- do_mid(argin=None)
Method to invoke Off command on CSP and SDP Subarray Leaf Nodes. param: None
return: A tuple containing a return code and a string message indicating status.
rtype: (ResultCode, str)
- get_csp_subarray_obstate()
- get_sdp_subarray_obstate()
- get_subarray_obstate(dev_name)
ska_tmc_subarraynode.commands.on_command module
- class ska_tmc_subarraynode.commands.on_command.On(*args: Any, **kwargs: Any)
Bases:
ska_tmc_common.tmc_command.ska_tmc_common.tmc_command.TMCCommand._name
A class for the SubarrayNode’s On() command.
- do_low(argin=None)
Method to invoke On command on MccsSubarrayLeafNode
- Raises
Exception if the command execution is not successful –
- do_mid(argin=None)
Method to invoke On command on CspSubarrayLeafNode and SdpSubarrayLeafNode.
- Raises
DevFailed if the command execution is not successful –
ska_tmc_subarraynode.commands.standby_command module
- class ska_tmc_subarraynode.commands.standby_command.Standby(*args: Any, **kwargs: Any)
Bases:
ska_tmc_common.tmc_command.ska_tmc_common.tmc_command.TMCCommand._name
A class for the SubarrayNodes’s Standby() command.
- do_low(argin=None)
Method to invoke Standby command on MCCSSubarrayLeafNode
- do_mid(argin=None)
Method to invoke Standby command on CSPSubarrayLeafNode and SDPSubarrayLeafNode.
- Raises
Exception if the command execution is not successful –
- get_command_object(command_name)