ska_tmc_mccsmasterleafnode.manager package
Submodules
ska_tmc_mccsmasterleafnode.manager.component_manager module
This module implements ComponentManager class for the Mccs Master Leaf Node.
- class ska_tmc_mccsmasterleafnode.manager.component_manager.MccsMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for MCCSMasterLeafNode component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
Controlling the behaviour of MCCS Master.
- assign_resources(argin, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits AssignResources command as a separate task.
- Returns:
a result code and message
- clear_command_mapping(unique_id: str) None
Clear command mapping for given unique id.
- get_device() ska_tmc_common.DeviceInfo
- get_lrcr_result(command_id: str) ska_tango_base.commands.ResultCode
Returns long running command result for command with given command ID
- 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 not unresponsive.
- Returns:
True if this command is allowed
- Return type:
boolean
- is_mccs_master_responsive() None
Checks if MCCS Master device is responsive.
- property mccs_master_device_name: str
Returns device name for the MCCS Master Device.
- off()
Method ‘off’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- off_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on()
Method ‘on’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- on_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- release_resources(argin, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits ReleaseAllResources command as a separate task.
- Returns:
a result code and message
- standby()
Method ‘standby’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- standby_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the Standby command for execution. :rtype: tuple
- start_communicating()
Method ‘start_communicating’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘ MccsSLNComponentManager’
- stop_communicating()
Method ‘stop_communicating’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘ MccsSLNComponentManager’
- update_device_ping_failure(device_info: ska_tmc_common.DeviceInfo, exception: Exception) None
Mark a device as failed and invoke the corresponding callback if it exists.
- param device_info:
a device info
- type device_info:
DeviceInfo
- param exception:
an exception
- type:
Exception
- 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 :type ping: int
- validate_json_argument_low(json_argument, req_keys) tuple
To validate the low json for assign resources command before entering the queue :param json_argument: Json Argument :type json_argument: dict :param req_keys: Required key list to check in json argument :type req_keys: list
Module contents
Init file for MCCSMasterLeafNode Manager
- class ska_tmc_mccsmasterleafnode.manager.MccsMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for MCCSMasterLeafNode component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
Controlling the behaviour of MCCS Master.
- assign_resources(argin, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits AssignResources command as a separate task.
- Returns:
a result code and message
- clear_command_mapping(unique_id: str) None
Clear command mapping for given unique id.
- get_device() ska_tmc_common.DeviceInfo
- get_lrcr_result(command_id: str) ska_tango_base.commands.ResultCode
Returns long running command result for command with given command ID
- 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 not unresponsive.
- Returns:
True if this command is allowed
- Return type:
boolean
- is_mccs_master_responsive() None
Checks if MCCS Master device is responsive.
- property mccs_master_device_name: str
Returns device name for the MCCS Master Device.
- off()
Method ‘off’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- off_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on()
Method ‘on’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- on_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- release_resources(argin, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits ReleaseAllResources command as a separate task.
- Returns:
a result code and message
- standby()
Method ‘standby’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘MccsSLNComponentManager’
- standby_command(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_control_model.TaskStatus, str]
Submits the Standby command for execution. :rtype: tuple
- start_communicating()
Method ‘start_communicating’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘ MccsSLNComponentManager’
- stop_communicating()
Method ‘stop_communicating’ is abstract in class ‘BaseComponentManager’ but is not overridden in child class ‘ MccsSLNComponentManager’
- update_device_ping_failure(device_info: ska_tmc_common.DeviceInfo, exception: Exception) None
Mark a device as failed and invoke the corresponding callback if it exists.
- param device_info:
a device info
- type device_info:
DeviceInfo
- param exception:
an exception
- type:
Exception
- 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 :type ping: int
- validate_json_argument_low(json_argument, req_keys) tuple
To validate the low json for assign resources command before entering the queue :param json_argument: Json Argument :type json_argument: dict :param req_keys: Required key list to check in json argument :type req_keys: list