Subarray Interface
Interfaces for subarray devices.
- class ska_tango_base.subarray.subarray_interface.SubarrayInterface[source]
Bases:
LRCMixin,AbstractSubarrayInterfaceProvides the Tango interface for an SKA subarray.
- class ska_tango_base.subarray.subarray_interface.AbstractSubarrayInterface[source]
Bases:
AbstractLRCMixin,ObsInterfaceProvides the Tango interface for an SKA subarray.
The long running command implementation is abstract and a task_executor must be provided.
- obs_state_model: ObsStateModel
The Observing State Machine for the subarray.
- _activation_time
Signal for the activation time of the device.
Write to this signal to report the time of activation to Tango clients.
- activationTime
Activation time attribute of the device.
This should be set by subclasses of this interface by writing to
_activation_time.
- assignedResources() list[str]
Read the assigned resources of the device.
Subclasses of this interface should override
read_assignedResources().
- read_assignedResources() list[str][source]
Read the resources assigned to the device.
Subclasses of this interface must provide this method.
- configuredCapabilities() list[str]
Read the configured capabilities of the device.
Subclasses of this interface should override
read_configuredCapabilities().
- read_configuredCapabilities() list[str][source]
Read the capabilities configured in the device.
Subclasses of this interface must provide this method.
- read_activationTime() float | tuple[float, float, AttrQuality][source]
Read the activation time of the device.
Subclasses can override this to change the behaviour of the
activationTimeattribute.
- is_activationTime_allowed(attr: AttReqType) bool[source]
Check if the activationTime can be read currently.
This can be overridden by subclasses to restrict when clients can access the attribute.
- is_AssignResources_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether
AssignResources()may be executed or enqueued.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_AssignResources(argin: str) tuple[list[ResultCode], list[str]][source]
Execute the standard AssignResources command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be EMPTY or IDLE.
While this command is running, the device should have obsState RESOURCING.
Once this command has completed successfully, the device should have obsState IDLE.
If this command does not complete successfully, the device should have obsState FAULT.
- Parameters:
argin – the resources to be assigned
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_ReleaseResources_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether
ReleaseResources()may be executed or enqueued.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_ReleaseResources(argin: str) tuple[list[ResultCode], list[str]][source]
Execute the standard ReleaseResources command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be IDLE.
While this command is running, the device should have obsState RESOURCING.
Once this command has completed successfully, the device should have obsState IDLE.
If this command does not complete successfully, the device should have obsState FAULT.
- Parameters:
argin – the resources to be released
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_ReleaseAllResources_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
ReleaseAllResources()command may be called.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_ReleaseAllResources() tuple[list[ResultCode], list[str]][source]
Execute the standard ReleaseAllResources command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be EMPTY.
While this command is running, the device should have obsState RESOURCING.
Once this command has completed successfully, the device should have obsState EMPTY.
If this command does not complete successfully, the device should have obsState FAULT.
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_Configure_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
Configure()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_Configure(argin: str) tuple[list[ResultCode], list[str]][source]
Execute the standard Configure command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be IDLE or READY.
While this command is running, the device should have obsState CONFIGURING.
Once this command has completed successfully, the device should have obsState READY.
If this command does not complete successfully, the device should have obsState FAULT.
- Parameters:
argin – the scan configuration specification
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_Scan_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
Scan()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_Scan(argin: str) tuple[list[ResultCode], list[str]][source]
Execute the standard Scan command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.Once this command has completed successfully, the device should have obsState SCANNING.
If this command does not complete successfully, the device should have obsState FAULT.
- Parameters:
argin – the per-scan configuration
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_EndScan_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
EndScan()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_EndScan() tuple[list[ResultCode], list[str]][source]
Execute the standard EndScan command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.Once this command has completed successfully, the device should have obsState READY.
If this command does not complete successfully, the device should have obsState FAULT.
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_End_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
End()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_End() tuple[list[ResultCode], list[str]][source]
Execute the standard End command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be IDLE.
Once this command has completed successfully, the device should have obsState IDLE.
If this command does not complete successfully, the device should have obsState FAULT
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_ObsReset_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether
ObsReset()may be executed or enqueued.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_ObsReset() tuple[list[ResultCode], list[str]][source]
Execute the standard ObsReset command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be IDLE.
While this command is running, the device should have obsState RESETTING.
Once this command has completed successfully, the device should have obsState IDLE.
If this command does not complete successfully, the device should have obsState FAULT.
Note
ObsReset()is not to be implemented for AA 0.5 or AA 1.- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_Restart_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
Restart()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state
- execute_Restart() tuple[list[ResultCode], list[str]][source]
Execute the standard Restart command.
This method must be overridden by all subclasses. The
submit_lrc_task()decorator can be used to make Reset a long running command.When this command is started, the commandedObsState should be FAULT or ABORTED.
While this command is running, the device should have obsState RESTARTING.
Once this command has completed successfully, the device should have obsState EMPTY.
If this command does not complete successfully, the device should have obsState FAULT.
- Returns:
A tuple containing a return code and a string message indicating status or a command ID. The message is for information purpose only.
- is_Abort_allowed() bool[source]
Return whether the
Abort()command may be called currently.This method can be overridden by subclasses to change when this command is allowed.
- Raises:
StateModelError – command not permitted in observation state
- Returns:
whether the command may be called in the current device state