ska_tmc_cspsubarrayleafnode.manager package
Submodules
ska_tmc_cspsubarrayleafnode.manager.component_manager module
Component Manager class for CSP Subarray Leaf Node
- class ska_tmc_cspsubarrayleafnode.manager.component_manager.CspSLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManager
A component manager for The CSP Subarray Leaf Node component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
- abort_commands(task_callback: Optional[Callable] = None)
Invokes Abort command on lower level Csp Subarray and changes the obsstate
- Parameters:
task_callback – callback to be called whenever the status of the task changes.
- assign_resources(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the AssignResources command in queue.
- Returns:
a result code and message
- configure(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the Configure command in queue.
- Returns:
a result code and message
- property delay_model: str
Returns the delayModel attribute.
- Returns:
the delayModel
- Return type:
str
- end(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the End command in queue.
- Returns:
a result code and message
- end_scan(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the EndScan command in queue.
- Returns:
a result code and message
- generate_command_result(result_code: ska_tango_base.commands.ResultCode, message: str) Tuple[ska_tango_base.commands.ResultCode, str]
This method is used for generating command result
- get_device() ska_tmc_common.device_info.SubArrayDeviceInfo
Return the device info
- Parameters:
None –
- Returns:
a device info
- Return type:
SubArrayDeviceInfo
- get_obs_state()
Get Current device obsState
- property input_parameter
Return the input parameter :return: input parameter :rtype: InputParameter
- is_command_allowed(command_name: str) Union[bool, ska_tmc_common.exceptions.InvalidObsStateError, ska_tmc_common.exceptions.DeviceUnresponsive, ska_tmc_common.exceptions.CommandNotAllowed]
Checks whether this command is allowed. It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive.
- Parameters:
command_name (str) – name of the command
- Returns:
True if this command is allowed
- Return type:
boolean
- off(task_callback)
Empty method for resolving lint issue
- on(task_callback)
Empty method for resolving lint issue
- raise_invalid_obsstate_error(command_name: str) ska_tmc_common.exceptions.InvalidObsStateError
checking the InvalidObsState of Csp Subarray device :param command_name: The name of command :type command_name: str
- release_all_resources(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the ReleaseAllResources command in queue.
- Returns:
a result code and message
- restart(task_callback: Optional[Callable] = None) tuple
Submit the Restart command in queue.
- Returns:
a result code and message
- scan(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the Scan command in queue.
- Returns:
a result code and message
- set_target(target)
Set the target with KatPoint Target object
- standby(task_callback)
Empty method for resolving lint issue
- start_communicating()
Empty method for resolving lint issue
- property start_delay
Return start delay flag True/False
- Returns:
start delay flag
- Return type:
bool
- stop() None
Stops the event receiver
- stop_communicating()
Empty method for resolving lint issue
- update_command_result(device_name: str, value: str) None
Updates the long running command result callback
- 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 :param obs_state: obs state of the device :type obs_state: ObsState
- update_device_ping_failure(device_info, exception)
Set a device to failed and call the relative callback if available :param device_info: a device info :type device_info: DeviceInfo :param exception: an exception :type: Exception
- update_event_failure(device_name: str) None
- update_ping_info(ping: int, device_name: str) None
Update a device with the correct ping information.
- Parameters:
dev_name (str) – name of the device
ping (int) – device response time
ska_tmc_cspsubarrayleafnode.manager.event_receiver module
Event Receiver for CSP Subarray Leaf Node
- class ska_tmc_cspsubarrayleafnode.manager.event_receiver.CspSLNEventReceiver(*args: Any, **kwargs: Any)
Bases:
EventReceiver
The CSP SLNEventReceiver class has the responsibility to receive events from the CSP Subarray managed by the CSP Subarray Leaf Node.
The ComponentManager uses the handle events methods for the attribute of interest. For each of them a callback is defined.
- handle_command_result_event(event: tango.EventType.CHANGE_EVENT) None
This method handle lrcr event
- handle_obs_state_event(event: tango.EventType.CHANGE_EVENT) None
- run() None
- subscribe_events(dev_info: ska_tmc_common.device_info.SubArrayDeviceInfo, attribute_dictionary: Optional[Dict[str, str]] = None)
Module contents
Init file for CSP Subarray Leaf Node Manager
- class ska_tmc_cspsubarrayleafnode.manager.CspSLNComponentManager(*args: Any, **kwargs: Any)
Bases:
TmcLeafNodeComponentManager
A component manager for The CSP Subarray Leaf Node component.
It supports:
Monitoring its component, e.g. detect that it has been turned off or on
- abort_commands(task_callback: Optional[Callable] = None)
Invokes Abort command on lower level Csp Subarray and changes the obsstate
- Parameters:
task_callback – callback to be called whenever the status of the task changes.
- assign_resources(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the AssignResources command in queue.
- Returns:
a result code and message
- configure(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the Configure command in queue.
- Returns:
a result code and message
- property delay_model: str
Returns the delayModel attribute.
- Returns:
the delayModel
- Return type:
str
- end(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the End command in queue.
- Returns:
a result code and message
- end_scan(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the EndScan command in queue.
- Returns:
a result code and message
- generate_command_result(result_code: ska_tango_base.commands.ResultCode, message: str) Tuple[ska_tango_base.commands.ResultCode, str]
This method is used for generating command result
- get_device() ska_tmc_common.device_info.SubArrayDeviceInfo
Return the device info
- Parameters:
None –
- Returns:
a device info
- Return type:
SubArrayDeviceInfo
- get_obs_state()
Get Current device obsState
- property input_parameter
Return the input parameter :return: input parameter :rtype: InputParameter
- is_command_allowed(command_name: str) Union[bool, ska_tmc_common.exceptions.InvalidObsStateError, ska_tmc_common.exceptions.DeviceUnresponsive, ska_tmc_common.exceptions.CommandNotAllowed]
Checks whether this command is allowed. It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive.
- Parameters:
command_name (str) – name of the command
- Returns:
True if this command is allowed
- Return type:
boolean
- off(task_callback)
Empty method for resolving lint issue
- on(task_callback)
Empty method for resolving lint issue
- raise_invalid_obsstate_error(command_name: str) ska_tmc_common.exceptions.InvalidObsStateError
checking the InvalidObsState of Csp Subarray device :param command_name: The name of command :type command_name: str
- release_all_resources(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the ReleaseAllResources command in queue.
- Returns:
a result code and message
- restart(task_callback: Optional[Callable] = None) tuple
Submit the Restart command in queue.
- Returns:
a result code and message
- scan(argin: str, task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]
Submit the Scan command in queue.
- Returns:
a result code and message
- set_target(target)
Set the target with KatPoint Target object
- standby(task_callback)
Empty method for resolving lint issue
- start_communicating()
Empty method for resolving lint issue
- property start_delay
Return start delay flag True/False
- Returns:
start delay flag
- Return type:
bool
- stop() None
Stops the event receiver
- stop_communicating()
Empty method for resolving lint issue
- update_command_result(device_name: str, value: str) None
Updates the long running command result callback
- 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 :param obs_state: obs state of the device :type obs_state: ObsState
- update_device_ping_failure(device_info, exception)
Set a device to failed and call the relative callback if available :param device_info: a device info :type device_info: DeviceInfo :param exception: an exception :type: Exception
- update_event_failure(device_name: str) None
- update_ping_info(ping: int, device_name: str) None
Update a device with the correct ping information.
- Parameters:
dev_name (str) – name of the device
ping (int) – device response time
- class ska_tmc_cspsubarrayleafnode.manager.CspSLNComponentManagerLow(*args: Any, **kwargs: Any)
Bases:
CspSLNComponentManager
A component manager for The CSP Subarray Leaf Node Low component.
- get_station_ids()
Returns the station ids.
- Returns:
station ids
- Return type:
list
- class ska_tmc_cspsubarrayleafnode.manager.CspSLNComponentManagerMid(*args: Any, **kwargs: Any)
Bases:
CspSLNComponentManager
A component manager for The CSP Subarray Leaf Node Mid component.
- get_receptor_ids()
Returns the receptor ids.
- Returns:
receptor ids
- Return type:
list
- class ska_tmc_cspsubarrayleafnode.manager.CspSLNEventReceiver(*args: Any, **kwargs: Any)
Bases:
EventReceiver
The CSP SLNEventReceiver class has the responsibility to receive events from the CSP Subarray managed by the CSP Subarray Leaf Node.
The ComponentManager uses the handle events methods for the attribute of interest. For each of them a callback is defined.
- handle_command_result_event(event: tango.EventType.CHANGE_EVENT) None
This method handle lrcr event
- handle_obs_state_event(event: tango.EventType.CHANGE_EVENT) None
- run() None
- subscribe_events(dev_info: ska_tmc_common.device_info.SubArrayDeviceInfo, attribute_dictionary: Optional[Dict[str, str]] = None)