ska_tmc_sdpmasterleafnode.manager package
Submodules
ska_tmc_sdpmasterleafnode.manager.component_manager module
This module implements ComponentManager class for the Sdp Master Leaf Node.
- class ska_tmc_sdpmasterleafnode.manager.component_manager.SdpMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for The SDP Master Leaf Node component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
Controlling the behaviour of SDP Master.
- disable(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Disable command for execution.
- Return type:
tuple
- get_attribute_dict() dict
Returns the common attribute dictionary for all component types.
- Returns:
Dictionary of common attributes to be handled by the EventReceiver.
- get_device() ska_tmc_common.device_info.DeviceInfo
Return the device info our of the monitoring loop with name dev_name
- Parameters:
None –
- Returns:
a device info
- Return type:
DeviceInfo
- handle_admin_mode_event(event: tango.EventType.CHANGE_EVENT) None
Handle SDP controller admin mode change event
- 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
- off(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- property sdp_master_device_name: str
Returns device name for the SDP Master Device.
- Returns:
sdp master fqdn string
- standby(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Standby command for execution.
- Return type:
tuple
- start_communicating() None
Establish communication with the component, then start monitoring.
This is the place to do things like:
Initiate a connection to the component (if your communication is connection-oriented)
Subscribe to component events (if using “pull” model)
Start a polling loop to monitor the component (if using a “push” model)
- stop_communicating() None
Cease monitoring the component, and break off all communication with it.
For example,
If you are communicating over a connection, disconnect.
If you have subscribed to events, unsubscribe.
If you are running a polling loop, stop it.
- update_device_admin_mode(device_name: str, admin_mode: ska_control_model.AdminMode) None
- Update a monitored device admin mode,
and call the relative callbacks if available
- Parameters:
device_name (str) – Name of the device on which admin mode is updated
admin_state – admin mode of the device
- update_exception_for_unresponsiveness(device_info: ska_tmc_common.device_info.DeviceInfo, exception: str) None
Set a device to failed and call the relative callback if available
- Parameters:
device_info (DeviceInfo) – a device info
exception – an exception
- Type:
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 module for SDP Master Leaf Node Component Manager
- class ska_tmc_sdpmasterleafnode.manager.SdpMLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManagerA component manager for The SDP Master Leaf Node component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
Controlling the behaviour of SDP Master.
- disable(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Disable command for execution.
- Return type:
tuple
- get_attribute_dict() dict
Returns the common attribute dictionary for all component types.
- Returns:
Dictionary of common attributes to be handled by the EventReceiver.
- get_device() ska_tmc_common.device_info.DeviceInfo
Return the device info our of the monitoring loop with name dev_name
- Parameters:
None –
- Returns:
a device info
- Return type:
DeviceInfo
- handle_admin_mode_event(event: tango.EventType.CHANGE_EVENT) None
Handle SDP controller admin mode change event
- 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
- off(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Off command for execution.
- Return type:
tuple
- on(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the On command for execution.
- Return type:
tuple
- property sdp_master_device_name: str
Returns device name for the SDP Master Device.
- Returns:
sdp master fqdn string
- standby(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]
Submits the Standby command for execution.
- Return type:
tuple
- start_communicating() None
Establish communication with the component, then start monitoring.
This is the place to do things like:
Initiate a connection to the component (if your communication is connection-oriented)
Subscribe to component events (if using “pull” model)
Start a polling loop to monitor the component (if using a “push” model)
- stop_communicating() None
Cease monitoring the component, and break off all communication with it.
For example,
If you are communicating over a connection, disconnect.
If you have subscribed to events, unsubscribe.
If you are running a polling loop, stop it.
- update_device_admin_mode(device_name: str, admin_mode: ska_control_model.AdminMode) None
- Update a monitored device admin mode,
and call the relative callbacks if available
- Parameters:
device_name (str) – Name of the device on which admin mode is updated
admin_state – admin mode of the device
- update_exception_for_unresponsiveness(device_info: ska_tmc_common.device_info.DeviceInfo, exception: str) None
Set a device to failed and call the relative callback if available
- Parameters:
device_info (DeviceInfo) – a device info
exception – an exception
- Type:
Exception
- update_responsiveness_info(device_name: str = '') None
Update a device with the correct availability information.
- Parameters:
dev_name (str) – name of the device