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
- configure(argin: str, task_callback: Callable) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Configure command in 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 to 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: Optional[Callable] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the EndScan command in 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 dev_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 this command is allowed. It checks that the device is not in the FAULT and UNKNOWN state before executing the command and that all the components needed for the operation are responsive.
- Returns:
True if this command is allowed
- scan(argin: str, task_callback: Optional[Callable] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Scan command in queue for execution.
- Parameters:
argin – input json string for scan command
task_callable – A callable to update the command information.
- Argin dtype:
str
- Task_callable dtype:
Callable
- Returns:
a TaskStatus and response
- stop() None
Stops the event receiver
- update_device_health_state(dev_name: str, health_state: ska_control_model.HealthState) None
Update a monitored device health state aggregate the health states available
- Parameters:
dev_name – Name of the device
health_state – Health state of the device
- Dev_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:
dev_name – Name of the device
obs_state – Obs state of the device
- Dev_name dtype:
str
- Obs_state dtype:
ObsState
- update_device_state(dev_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
dev_name – Name of the device
- State dtype:
DevState
- Dev_name dtype:
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, dev_name: str) None
Update a device with the correct ping information. :param ping: device response time :ping dtype: int :param dev_name: Name of the device :dev_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.