ska_tmc_mccssubarrayleafnode.manager package
Submodules
ska_tmc_mccs_subarray_leaf_node.manager.component_manager module
Component Manager class for MCCS Subarray Leaf Node
- class ska_tmc_mccssubarrayleafnode.manager.component_manager.MccsSLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManager
A component manager for The MccsSubarrayLeafNode device.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
- abort_commands() Tuple[ska_tango_base.commands.ResultCode, str]
Invokes Abort command on Mccs Subarray and changes the obsState
- Parameters:
task_callback – callback to be called whenever the status of the task changes.
- configure(argin: str, task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Configure command in the queue for execution.
- Parameters:
argin – input json string for configure command
task_callable – A callable to update the command information.
- Argin dtype:
str
- Task_callable dtype:
Callable
- Returns:
a TaskStatus and response
- device_failed(device_info: ska_tmc_common.DeviceInfo, exception: Exception) None
Mark a device as failed and invoke the corresponding callback if it exists
- Parameters:
device_info – a device info
exception – an exception
- Device_info dtype:
DeviceInfo
- Raises:
dtype – Exception
- end(task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the End command in the queue for execution.
- Parameters:
task_callable – A callable to update the command information.
- Task_callable dtype:
Callable
- Returns:
a TaskStatus and response
- endscan(task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the EndScan command in the queue for execution.
- Parameters:
task_callable – A callable to update the command information.
- Task_callable dtype:
Callable
- Returns:
a TaskStatus and response
- get_device() ska_tmc_common.SubArrayDeviceInfo
Return the device info of the monitoring loop with name device_name
- Parameters:
None –
- Returns:
a device info
- Return type:
SubArrayDeviceInfo
- get_obs_state()
Get Current device obsState
- is_command_allowed(command_name: str) bool
Checks whether the specified command is allowed to be executed on this device.
This method ensures that the device is not in the FAULT or UNKNOWN state before executing the command. It also verifies that all the components needed for the operation are responsive.
- Parameters:
command_name (str) – The name of the command to be checked.
- Returns:
True if the command is allowed, False otherwise.
- Return type:
bool
- Raises:
CommandNotAllowed – If the specified command is not allowed.
- restart(argin: int, task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Restart command in the queue for execution.
- Parameters:
argin – An integer representing the subarray ID.
task_callable – A callable to update the command information.
- Argin dtype:
int
- Task_callable dtype:
Callable
- Returns:
a TaskStatus and response
- scan(argin: str, task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Scan command in the queue for execution.
- Parameters:
argin – input json string for scan command
task_callback – A callable to update the command information.
- Argin dtype:
str
- Task_callback dtype:
Callable
- Returns:
a TaskStatus and response
- stop() None
Stops the event receiver
- update_device_health_state(device_name: str, health_state: ska_control_model.HealthState) None
Update a monitored device health state aggregate the health states available
- Parameters:
device_name – Name of the device
health_state – Health state of the device
- Device_name dtype:
str
- Health_state dtype:
HealthState
- update_device_info(device_info: ska_tmc_common.SubArrayDeviceInfo) None
Update the device info used for monitoring.
- Parameters:
device_info – Information about the MCCS Subarray device.
- update_device_obs_state(device_name: str, obs_state: ska_tango_base.control_model.ObsState) None
Update a monitored device obs state, and call the relative callbacks if available
- Parameters:
device_name – Name of the device
obs_state – Obs state of the device
- Device_name dtype:
str
- Obs_state dtype:
ObsState
- update_device_state(device_name: str, state: tango.DevState) None
Update a monitored device state, aggregate the states available and call the relative callbacks if available
- Parameters:
state – state of the device
device_name – Name of the device
- State dtype:
DevState
- Device_name dtype:
str
- update_event_failure(device_name: str) None
Update a monitored device failure status :param device_name: Name of the device :type device_name: str
- update_long_running_command_result(device_name: str, value: str)
Processes and updates the lrcr callback when a longRunningCommandResult event is received. The event data is processed and updated on the callback if the event is for an exception.
- Parameters:
device_name – Name of the device
value – The attribute value from the longRunningCommandResult event.
- Device_name dtype:
str
- Value dtype:
Tuple of either (Unique ID, ResultCode) or (Unique ID, Exception message) type.
- update_ping_info(ping: int, device_name: str) None
Update a device with the correct ping information. :param ping: device response time :ping dtype: int :param device_name: Name of the device :device_name dtype: str
ska_tmc_mccs_subarray_leaf_node.manager.event_receiver module
MCCS Subarray Leaf Node Event Receiver.
- class ska_tmc_mccssubarrayleafnode.manager.event_receiver.MccsSLNEventReceiver(*args: Any, **kwargs: Any)
Bases:
EventReceiver
The MccsSLNEventReceiver class is responsible for receiving events from the MCCS Subarray device.
- handle_command_result_event(event: tango.EventType.CHANGE_EVENT) None
This method handles the longRunningCommandResult event.
- run() None
The run method for the event receiver thread. Starts the operations of the event receiver.
- subscribe_events(dev_info: ska_tmc_common.DeviceInfo) None
Event subscription method. Subscribes to the events for the given device.
- Parameters:
dev_info – The device info object for the device on which events are to be subscribed.
- Dev_info dtype:
DeviceInfo class object.