ska_tmc_cspmasterleafnode.manager package
Submodules
ska_tmc_cspmasterleafnode.manager.component_manager module
This module implements ComponentManager class for the CSP Controller leaf node.
- class ska_tmc_cspmasterleafnode.manager.component_manager.CspMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for The CSP Controller leaf node component.
It supports in controlling the behaviour of CSP Master.
- build_device_attribute_map() Dict[str, List[str]]
Builds a dictionary mapping device names to lists of attributes to be subscribed.
- Returns:
A mapping from device names to list of attributes.
- Return type:
Dict[str, List[str]]
- check_device_responsiveness(device_name: str) bool
This method accepts device_name and provides the responsiveness of the device.
- Parameters:
device_name (str) – Tango device FQDN.
- Raises:
DeviceNameIncorrect – raises exception when device name is incorrect.
- Returns:
Returns True when device is available, else false.
- Return type:
bool
- check_if_csp_master_is_responsive() None
Checks if Csp Master device is responsive.
- property csp_master_device_name: str
Returns device name for the CSP Master Device.
- get_attribute_dict() dict
Returns the common attribute dictionary for all component types.
- Returns:
Dictionary of common attributes to be handled by the EventManager.
- get_device() ska_tmc_common.DeviceInfo
- property health_info: dict
Property that provides the health information of the device.
- Returns:
Returns the health information of the device
- Return type:
dict
- property health_state: ska_control_model.HealthState
Property that provides the health state of the device.
- Returns:
Returns the health state of the device
- Return type:
HealthState
- is_command_allowed(command_name: str) bool
Checks whether this command is allowed. It checks that the device is in the right state to execute this command and that all the components needed for the operation are not unresponsive.
- Returns:
True if this command is allowed
- Return type:
boolean
- is_event_failed(event) bool
Check if event failed
- Returns:
True, if event failed else returns False
- off(task_callback)
Empty method for resolving lint issue
- off_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on(task_callback)
Empty method for resolving lint issue
- on_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- set_health_info(health_info: dict) None
Sets the health info of the device.
- set_health_state(health_state: ska_control_model.HealthState) None
Sets the health state of the device.
- setup_event_subscription() None
Sets up the event subscription after input parameters are updated.
- standby(task_callback)
Empty method for resolving lint issue
- standby_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the Standby command for execution.
- Return type:
tuple
- start_communicating()
Empty method for resolving lint issue
- stop() None
Stops the event processing
- stop_communicating()
Empty method for resolving lint issue
- update_device_admin_mode(admin_mode: ska_control_model.AdminMode) None
Update a monitored device admin mode, and call the relative callbacks if available
- Parameters:
admin_state – admin mode of the device
- update_device_health_state(health_state: ska_control_model.HealthState) None
Update a monitored device health state aggregate the health states available
- Parameters:
health_state (HealthState) – health state of the device
- update_exception_for_unresponsiveness(device_info: ska_tmc_common.DeviceInfo, exception: str) None
Set a device to failed and call the relative callback if available
- Parameters:
device_info (DeviceInfo) – a device info
exception (str) – an exception
- update_responsiveness_info(device_name: str) None
Update a device with the correct availability information.
- Parameters:
dev_name (str) – name of the device
Module contents
Init file for CSP Controller leaf node Manager.
- class ska_tmc_cspmasterleafnode.manager.CspMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for The CSP Controller leaf node component.
It supports in controlling the behaviour of CSP Master.
- build_device_attribute_map() Dict[str, List[str]]
Builds a dictionary mapping device names to lists of attributes to be subscribed.
- Returns:
A mapping from device names to list of attributes.
- Return type:
Dict[str, List[str]]
- check_device_responsiveness(device_name: str) bool
This method accepts device_name and provides the responsiveness of the device.
- Parameters:
device_name (str) – Tango device FQDN.
- Raises:
DeviceNameIncorrect – raises exception when device name is incorrect.
- Returns:
Returns True when device is available, else false.
- Return type:
bool
- check_if_csp_master_is_responsive() None
Checks if Csp Master device is responsive.
- property csp_master_device_name: str
Returns device name for the CSP Master Device.
- get_attribute_dict() dict
Returns the common attribute dictionary for all component types.
- Returns:
Dictionary of common attributes to be handled by the EventManager.
- get_device() ska_tmc_common.DeviceInfo
- property health_info: dict
Property that provides the health information of the device.
- Returns:
Returns the health information of the device
- Return type:
dict
- property health_state: ska_control_model.HealthState
Property that provides the health state of the device.
- Returns:
Returns the health state of the device
- Return type:
HealthState
- is_command_allowed(command_name: str) bool
Checks whether this command is allowed. It checks that the device is in the right state to execute this command and that all the components needed for the operation are not unresponsive.
- Returns:
True if this command is allowed
- Return type:
boolean
- is_event_failed(event) bool
Check if event failed
- Returns:
True, if event failed else returns False
- off(task_callback)
Empty method for resolving lint issue
- off_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on(task_callback)
Empty method for resolving lint issue
- on_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- set_health_info(health_info: dict) None
Sets the health info of the device.
- set_health_state(health_state: ska_control_model.HealthState) None
Sets the health state of the device.
- setup_event_subscription() None
Sets up the event subscription after input parameters are updated.
- standby(task_callback)
Empty method for resolving lint issue
- standby_command(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the Standby command for execution.
- Return type:
tuple
- start_communicating()
Empty method for resolving lint issue
- stop() None
Stops the event processing
- stop_communicating()
Empty method for resolving lint issue
- update_device_admin_mode(admin_mode: ska_control_model.AdminMode) None
Update a monitored device admin mode, and call the relative callbacks if available
- Parameters:
admin_state – admin mode of the device
- update_device_health_state(health_state: ska_control_model.HealthState) None
Update a monitored device health state aggregate the health states available
- Parameters:
health_state (HealthState) – health state of the device
- update_exception_for_unresponsiveness(device_info: ska_tmc_common.DeviceInfo, exception: str) None
Set a device to failed and call the relative callback if available
- Parameters:
device_info (DeviceInfo) – a device info
exception (str) – an exception
- update_responsiveness_info(device_name: str) None
Update a device with the correct availability information.
- Parameters:
dev_name (str) – name of the device
- class ska_tmc_cspmasterleafnode.manager.CspMLNComponentManagerMid(*args: Any, **kwargs: Any)
Bases:
CspMLNComponentManagerA component manager for The CSP Controller leaf node Mid component.
- build_device_attribute_map()
Builds a dictionary mapping device names to lists of attributes to be subscribed.
- Returns:
A mapping from device names to list of attributes.
- Return type:
Dict[str, List[str]]
- clear_load_dish_cfg_attributes()
Clear all load dish cfg attribute after command completes
- get_attribute_dict() dict
Extends the common attribute dictionary with mid-specific attributes.
- Returns:
Dictionary of attributes to be handled by the EventManager.
- handle_dish_vcc_config_callback(value) None
Handle dish vcc config attribute change event
- handle_source_dish_vcc_config_callback(value) None
Handle source dish vcc config attribute change event
- is_dish_vcc_config_valid() Tuple[bool, str]
Validate the sent dish VCC config and source dish VCC config match with received dish VCC config and source dish VCC config.
- Returns:
A tuple of boolean indicating validation success and an error message if any
- load_dish_cfg_command(argin: str, task_callback: Callable[[ska_control_model.TaskStatus, str], None], task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]
Submits the LoadDishCfg command for execution.
- Parameters:
argin – JSON string containing dish VCC configuration parameters
task_callback – Optional. Callback function for task completion
- Returns:
A tuple of TaskStatus and a response message
- start_dish_vcc_validation() None
Create Dish Vcc validation manager object and call validate method.
- update_dish_vcc_map_validation_result(value: ska_tango_base.commands.ResultCode) None
Update dish vcc map validation result
- Parameters:
value (ResultCode) – ResultCode value to be updated
- validat_load_dish_cfg_json(argin: str)
Validate load dish cfg json and raise exception if found error :param argin: json argument :type argin: str
- Raises:
CommandNotAllowed if found error in json –