ska_tmc_mccssubarrayleafnode.commands package
Submodules
ska_tmc_mccssubarrayleafnode.commands.mccssubarrayln_command module
This module provides the implementation of the MccsSLNCommand class, which is a common command class for MCCS Subarray Leaf Node. It contains common functionality for the commands present on this device.
- class ska_tmc_mccssubarrayleafnode.commands.mccs_subarrayln_command.MccsSLNCommand(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeCommand
Common Command class for MCCS Subarray Leaf Node. This class provides common functionality for the commands present on this device.
- init_adapter() Tuple[ska_tango_base.commands.ResultCode, str]
Initialize the adapters for communication with the MCCS Subarray device and the MCCS Master device.
This method attempts to create adapters for both the MCCS Subarray device and the MCCS Master device using the specified device names obtained from the component manager. It continues trying until both adapters are created or the specified timeout is reached.
- Returns:
A tuple containing the result code and a message indicating
the status of the adapter initialization. :rtype: Tuple[ResultCode, str]
- Raises:
ConnectionFailed – If there is an issue establishing a
connection with the devices. :raises DevFailed: If there is a device-related error during adapter creation. :raises AttributeError: If there is an attribute error during adapter creation. :raises ValueError: If there is a value error during adapter creation. :raises TypeError: If there is a type error during adapter creation.
- set_command_id(command_name: str)
Sets the command id for error propagation.
- Parameters:
command_name (str) – Name of the command
ska_tmcs_mccssubarrayleafnode.commands.configure_command module
Configure command class for MccsSubarrayLeafNode.
- class ska_tmc_mccssubarrayleafnode.commands.configure_command.Configure(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Configure command for MCCS Subarray Leaf Node device.
It provides methods to configure the Mccs Subarray device and handle the execution of the Configure command.
- do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Configure command on Mccs Subarray. :param argin: The string in JSON format. :argin dtype: str The JSON contains following values: Example: {“interface”: “https://schema.skatelescope.org/ska-low-mccs-subarray-configure/3.0”, “subarray_beams”: [{“subarray_beam_id”: 1, “update_rate”: 0.0, “logical_bands”: [{“start_channel”: 80, “number_of_channels”: 16}, {“start_channel”: 384, “number_of_channels”: 16}], “apertures”: [{“aperture_id”: “AP001.01”, “weighting_key_ref”: “aperture2”}, {“aperture_id”: “AP001.02”, “weighting_key_ref”: “aperture3”}, {“aperture_id”: “AP002.01”, “weighting_key_ref”: “aperture2”}, {“aperture_id”: “AP002.02”, “weighting_key_ref”: “aperture3”}, {“aperture_id”: “AP003.01”, “weighting_key_ref”: “aperture1”}], “sky_coordinates”:{“timestamp”: “2021-10-23T12:34:56.789Z”, “reference_frame”: “ICRS”, “c1”: 180.0, “c1_rate”: 0.0, “c2”: 45.0, “c2_rate”: 0.0}}]}
return: Tuple[ResultCode, str]:
- invoke_configure(argin: str, task_callback: Callable, task_abort_event: Event) None
This is a long running method for Configure command, it executes the do hook of the command class.
- Parameters:
argin – Input json string for the configure command
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort command being called.
- Argin dtype:
str
- Task_callback dtype:
Callable
- Task_abort_event dtype:
Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
ska_tmc_mccssubarrayleafnode.commands.end_command module
End command class for MccsSubarrayLeafNode.
- class ska_tmc_mccssubarrayleafnode.commands.end_command.End(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the End command for MCCS Subarray Leaf Node device.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke End command on Mccs Subarray.
- Return type:
(ResultCode, message)
- end(task_callback: Callable, task_abort_event: Event)
This is a long running method for End command, it executes the do hook of the command class.
- Parameters:
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort command being called.
- Task_callback dtype:
Callable
- Task_abort_event dtype:
Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
ska_tmc_mccssubarrayleafnode.commands.abort_command module
Abort command class for MccsSubarrayLeafNode.
- class ska_tmc_mccssubarrayleafnode.commands.abort_command.Abort(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Abort command for Mccs Subarray.
It provides methods to Abort the Mccs Subarray device and handle the execution of the Abort command.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Abort command on Mccs Subarray.
- Return type:
(ResultCode, message)
ska_tmc_mccssubarrayleafnode.commands.restart_command module
Restart command class for MccsSubarrayLeafNode.
This module defines the Restart command class for the MCCS Subarray Leaf Node.
- class ska_tmc_mccssubarrayleafnode.commands.restart_command.Restart(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Restart command for Mccs Subarray Leaf Node. It provides functionality to restart the MCCS Subarray device and handles the execution of the Restart command.
- do(argin: int) Tuple[ska_tango_base.commands.ResultCode, str]
Invoke the Restart command on the MCCS Controller device.
- Parameters:
argin – An integer representing the subarray ID.
- Returns:
A tuple containing the result code and a message indicating
the status of the Restart command execution. :rtype: Tuple[ResultCode, str]
- restart(argin: int, task_callback: Callable, task_abort_event: Optional[Event]) None
Perform the Restart command for the MCCS Subarray leaf node device.
- Parameters:
argin – An integer representing the subarray ID.
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of an
Abort command being called.
ska_tmc_mccssubarrayleafnode.commands.scan_command module
Scan command class for MccsSubarrayLeafNode.
- class ska_tmc_mccssubarrayleafnode.commands.scan_command.Scan(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Scan command for MCCS Subarray Leaf Node device.
It provides methods to invoke the scan command on the Mccs Subarray device and handle its execution.
- do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Scan command on Mccs Subarray.
- Parameters:
argin – The string in JSON format.
- Argin dtype:
str
The JSON contains following values:
Example: { “interface”: “https://schema.skatelescope.org/ska-low-mccs-subarray-scan/3.0”, “scan_id”: 12345678, “start_time”: “2023-12-31T12:34:28Z”, “duration”: 0.0 } :rtype: Tuple[ResultCode, str]
- scan(argin: str, task_callback: Callable, task_abort_event: Event) None
This method invoked the do hook of the command class. It also sets up the command tracking.
- Parameters:
argin (str) – Input json string for the scan command
task_callback (Callable) – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort
command being called. :type task_abort_event: Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
ska_tmc_mccssubarrayleafnode.commands.endscan_command module
EndScan command class for MccsSubarrayLeafNode.
- class ska_tmc_mccssubarrayleafnode.commands.endscan_command.EndScan(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the EndScan command for MCCS Subarray Leaf Node device.
It provides methods to invoke endscan command on the Mccs Subarray device and handle its execution.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke EndScan command on Mccs Subarray. :return: Tuple[ResultCode, str]:
- endscan(task_callback: Callable, task_abort_event: Event) None
This method invokes the do hook for the EndScan command class. It also sets up the command tracking.
- Parameters:
task_callback (Callable) – A callback function to update the command status.
task_abort_event – A threading event to notify in case of Abort
command being called. :type task_abort_event: threading.Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
Module contents
This is init module for MccsSubarrayleafnode commands.
- class ska_tmc_mccssubarrayleafnode.commands.Abort(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Abort command for Mccs Subarray.
It provides methods to Abort the Mccs Subarray device and handle the execution of the Abort command.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Abort command on Mccs Subarray.
- Return type:
(ResultCode, message)
- class ska_tmc_mccssubarrayleafnode.commands.Configure(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Configure command for MCCS Subarray Leaf Node device.
It provides methods to configure the Mccs Subarray device and handle the execution of the Configure command.
- do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Configure command on Mccs Subarray. :param argin: The string in JSON format. :argin dtype: str The JSON contains following values: Example: {“interface”: “https://schema.skatelescope.org/ska-low-mccs-subarray-configure/3.0”, “subarray_beams”: [{“subarray_beam_id”: 1, “update_rate”: 0.0, “logical_bands”: [{“start_channel”: 80, “number_of_channels”: 16}, {“start_channel”: 384, “number_of_channels”: 16}], “apertures”: [{“aperture_id”: “AP001.01”, “weighting_key_ref”: “aperture2”}, {“aperture_id”: “AP001.02”, “weighting_key_ref”: “aperture3”}, {“aperture_id”: “AP002.01”, “weighting_key_ref”: “aperture2”}, {“aperture_id”: “AP002.02”, “weighting_key_ref”: “aperture3”}, {“aperture_id”: “AP003.01”, “weighting_key_ref”: “aperture1”}], “sky_coordinates”:{“timestamp”: “2021-10-23T12:34:56.789Z”, “reference_frame”: “ICRS”, “c1”: 180.0, “c1_rate”: 0.0, “c2”: 45.0, “c2_rate”: 0.0}}]}
return: Tuple[ResultCode, str]:
- invoke_configure(argin: str, task_callback: Callable, task_abort_event: Event) None
This is a long running method for Configure command, it executes the do hook of the command class.
- Parameters:
argin – Input json string for the configure command
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort command being called.
- Argin dtype:
str
- Task_callback dtype:
Callable
- Task_abort_event dtype:
Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
- class ska_tmc_mccssubarrayleafnode.commands.End(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the End command for MCCS Subarray Leaf Node device.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke End command on Mccs Subarray.
- Return type:
(ResultCode, message)
- end(task_callback: Callable, task_abort_event: Event)
This is a long running method for End command, it executes the do hook of the command class.
- Parameters:
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort command being called.
- Task_callback dtype:
Callable
- Task_abort_event dtype:
Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
- class ska_tmc_mccssubarrayleafnode.commands.EndScan(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the EndScan command for MCCS Subarray Leaf Node device.
It provides methods to invoke endscan command on the Mccs Subarray device and handle its execution.
- do() Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke EndScan command on Mccs Subarray. :return: Tuple[ResultCode, str]:
- endscan(task_callback: Callable, task_abort_event: Event) None
This method invokes the do hook for the EndScan command class. It also sets up the command tracking.
- Parameters:
task_callback (Callable) – A callback function to update the command status.
task_abort_event – A threading event to notify in case of Abort
command being called. :type task_abort_event: threading.Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.
- class ska_tmc_mccssubarrayleafnode.commands.Restart(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Restart command for Mccs Subarray Leaf Node. It provides functionality to restart the MCCS Subarray device and handles the execution of the Restart command.
- do(argin: int) Tuple[ska_tango_base.commands.ResultCode, str]
Invoke the Restart command on the MCCS Controller device.
- Parameters:
argin – An integer representing the subarray ID.
- Returns:
A tuple containing the result code and a message indicating
the status of the Restart command execution. :rtype: Tuple[ResultCode, str]
- restart(argin: int, task_callback: Callable, task_abort_event: Optional[Event]) None
Perform the Restart command for the MCCS Subarray leaf node device.
- Parameters:
argin – An integer representing the subarray ID.
task_callback – A callable function to update the command status.
task_abort_event – A threading event to notify in case of an
Abort command being called.
- class ska_tmc_mccssubarrayleafnode.commands.Scan(*args: Any, **kwargs: Any)
Bases:
MccsSLNCommand
This class implements the Scan command for MCCS Subarray Leaf Node device.
It provides methods to invoke the scan command on the Mccs Subarray device and handle its execution.
- do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]
Method to invoke Scan command on Mccs Subarray.
- Parameters:
argin – The string in JSON format.
- Argin dtype:
str
The JSON contains following values:
Example: { “interface”: “https://schema.skatelescope.org/ska-low-mccs-subarray-scan/3.0”, “scan_id”: 12345678, “start_time”: “2023-12-31T12:34:28Z”, “duration”: 0.0 } :rtype: Tuple[ResultCode, str]
- scan(argin: str, task_callback: Callable, task_abort_event: Event) None
This method invoked the do hook of the command class. It also sets up the command tracking.
- Parameters:
argin (str) – Input json string for the scan command
task_callback (Callable) – A callable function to update the command status.
task_abort_event – A threading event to notify in case of Abort
command being called. :type task_abort_event: Event
- update_task_status(**kwargs) None
Method to update task status with result code and exception message if any.