Deprecated Subarray

This module provides an SKA subarray Tango device and component manager.

class ska_tango_base.subarray.SKASubarray[source]

Bases: SKAObsDevice[ComponentManagerT], AbstractSubarrayInterface

A generic subarray device for SKA.

Deprecated:

Use the future API instead.

SKASubarray inherits from the SKAObsDevice and AbstractSubarrayInterface, and expects a component manager to be provided by implementing the create_component_manager() method.

__init__(*args: Any, **kwargs: Any) None[source]

Initialise a new instance.

Parameters:
  • args – positional arguments.

  • kwargs – keyword arguments.

class InitCommand[source]

Bases: InitCommand

A class for the SKASubarray’s init_device() “command”.

do(*args: Any, **kwargs: Any) tuple[ResultCode, str][source]

Stateless hook for device initialisation.

Parameters:
  • args – positional arguments to the command. This command does not take any, so this should be empty.

  • kwargs – keyword arguments to the command. This command does not take any, so this should be empty.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

on_new_shared_bus() None[source]

Initialise signals.

create_component_manager() ComponentManagerT[source]

Create and return a component manager for this device.

Raises:

NotImplementedError – because it is not implemented.

_component_state_changed(fault: bool | None = None, power: PowerState | None = None, obsfault: bool | None = None, resourced: bool | None = None, configured: bool | None = None, scanning: bool | None = None) None[source]

Update the device about the component’s state.

Subclasses should ensure that this is called by the component_state_callback callback passed to their component manager.

Parameters:
  • fault – The new fault state of the device, or None if unchanged

  • power – The new power state of the device, or None if unchanged

read_assignedResources() list[str][source]

Read the resources assigned to the device.

The list of resources assigned to the subarray.

Returns:

Resources assigned to the device.

read_configuredCapabilities() list[str][source]

Read capabilities configured in the Subarray.

A list of capability types with no. of instances in use on this subarray; e.g. Correlators:512, PssBeams:4 PstBeams:4, VlbiBeams:0.

Returns:

A list of capability types with no. of instances used in the Subarray

class AssignResourcesCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s AssignResources() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None, schema: dict[str, Any] | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

  • schema – an optional JSON schema for the command argument.

class ReleaseResourcesCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s ReleaseResources() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None, schema: dict[str, Any] | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

  • schema – an optional JSON schema for the command argument.

class ReleaseAllResourcesCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s ReleaseAllResources() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

class ConfigureCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s Configure() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None, schema: dict[str, Any] | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

  • schema – an optional JSON schema for the command argument.

class ScanCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s Scan() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None, schema: dict[str, Any] | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

  • schema – an optional JSON schema for the command argument.

class EndScanCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s EndScan() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

class EndCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s End() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

class ObsResetCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s ObsReset() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

class RestartCommand[source]

Bases: SubmittedSlowCommand

A class for SKASubarray’s Restart() command.

__init__(command_tracker: CommandTrackerProtocol, component_manager: SubarrayComponentManager, callback: Callable[[bool], None] | None = None, logger: Logger | None = None) None[source]

Initialise a new instance.

Parameters:
  • command_tracker – the device’s command tracker

  • component_manager – the device’s component manager

  • callback – an optional callback to be called when this command starts and finishes.

  • logger – a logger for this command to log with.

init_command_objects() None[source]

Set up the command objects.

execute_AssignResources(argin: str) DevVarLongStringArrayType[source]

Assign resources to this subarray.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin – the resources to be assigned

Returns:

A tuple containing a result code and a string message. If the result code indicates that the command was accepted, the message is the unique ID of the task that will execute the command. If the result code indicates that the command was not excepted, the message explains why.

execute_ReleaseResources(argin: str) DevVarLongStringArrayType[source]

Delta removal of assigned resources.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin – the resources to be released

Returns:

A tuple containing a result code and the unique ID of the command

execute_ReleaseAllResources() DevVarLongStringArrayType[source]

Remove all resources to tear down to an empty subarray.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a result code and the unique ID of the command

execute_Configure(argin: str) DevVarLongStringArrayType[source]

Configure the capabilities of this subarray.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin – JSON-encoded string with the scan configuration”, configuration specification

Returns:

A tuple containing a result code and the unique ID of the command

execute_Scan(argin: str) DevVarLongStringArrayType[source]

Start scanning.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin – JSON-encoded string with the per-scan configuration

Returns:

A tuple containing a result code and the unique ID of the command

execute_EndScan() DevVarLongStringArrayType[source]

End the scan.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a result code and the unique ID of the command

execute_End() DevVarLongStringArrayType[source]

End the scan block.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a result code and the unique ID of the command

execute_ObsReset() DevVarLongStringArrayType[source]

Reset the current observation process.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a result code and the unique ID of the command

execute_Restart() DevVarLongStringArrayType[source]

Restart the subarray. That is, deconfigure and release all resources.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a result code and the unique ID of the command

class ska_tango_base.subarray.SubarrayComponentManager[source]

Bases: ObsDeviceComponentManager

An abstract base class for a component manager for an SKA subarray Tango devices.

Deprecated:

Use the future API instead.

It supports:

  • Maintaining a connection to its component

  • Controlling its component via commands like AssignResources(), Configure(), Scan(), etc.

  • Monitoring its component, e.g. detect that a scan has completed

__init__(*args: Any, **kwargs: Any) None[source]

Initialise a new ComponentManager instance.

Parameters:
  • args – additional positional arguments

  • kwargs – additional keyword arguments

assign(task_callback: TaskCallbackType | None, **kwargs: Any) tuple[TaskStatus, str][source]

Assign resources to the component.

Parameters:
  • task_callback – callback to be called when the status of the command changes

  • kwargs – keyword arguments. These will be the root keys defined by the command schema.

Raises:

NotImplementedError – This is an abstract class

release(task_callback: TaskCallbackType | None, **kwargs: Any) tuple[TaskStatus, str][source]

Release resources from the component.

Parameters:
  • task_callback – callback to be called when the status of the command changes

  • kwargs – keyword arguments. These will be the root keys defined by the command schema.

Raises:

NotImplementedError – This is an abstract class

release_all(task_callback: TaskCallbackType | None) tuple[TaskStatus, str][source]

Release all resources.

Parameters:

task_callback – callback to be called when the status of the command changes

Raises:

NotImplementedError – This is an abstract class

configure(task_callback: TaskCallbackType | None, **kwargs: Any) tuple[TaskStatus, str][source]

Configure the component.

Parameters:
  • task_callback – callback to be called when the status of the command changes

  • kwargs – keyword arguments. These will be the root keys defined by the command schema.

Raises:

NotImplementedError – This is an abstract class

deconfigure(task_callback: TaskCallbackType | None) tuple[TaskStatus, str][source]

Deconfigure this component.

Parameters:

task_callback – callback to be called when the status of the command changes

Raises:

NotImplementedError – This is an abstract class

scan(task_callback: TaskCallbackType | None, **kwargs: Any) tuple[TaskStatus, str][source]

Start scanning.

Parameters:
  • task_callback – callback to be called when the status of the command changes

  • kwargs – keyword arguments. These will be the root keys defined by the command schema.

Raises:

NotImplementedError – This is an abstract class

end_scan(task_callback: TaskCallbackType | None) tuple[TaskStatus, str][source]

End scanning.

Parameters:

task_callback – callback to be called when the status of the command changes

Raises:

NotImplementedError – This is an abstract class

obsreset(task_callback: TaskCallbackType | None) tuple[TaskStatus, str][source]

Reset the component to unconfigured but do not release resources.

Parameters:

task_callback – callback to be called when the status of the command changes

Raises:

NotImplementedError – This is an abstract class

restart(task_callback: TaskCallbackType | None) tuple[TaskStatus, str][source]

Deconfigure and release all resources.

Parameters:

task_callback – callback to be called when the status of the command changes

Raises:

NotImplementedError – This is an abstract class

property assigned_resources: list[str]

Return the resources assigned to the component.

Raises:

NotImplementedError – the resources assigned to the component

property configured_capabilities: list[str]

Return the configured capabilities of the component.

Raises:

NotImplementedError – list of strings indicating number of configured instances of each capability type

class ska_tango_base.subarray.SubarrayInterface[source]

Bases: LRCMixin, AbstractSubarrayInterface

Provides the Tango interface for an SKA subarray.

Deprecated:

Use the future API instead.

class ska_tango_base.subarray.subarray_interface.AbstractSubarrayInterface[source]

Bases: AbstractLRCMixin, ObsInterface

Provides the Tango interface for an SKA subarray.

Deprecated:

Use the future API instead.

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.

component_scanning() None[source]

Perform scanning action on the ObsStateModel.

component_not_scanning() None[source]

Perform not scanning action on the ObsStateModel.

component_resourced() None[source]

Perform resourced action on the ObsStateModel.

component_unresourced() None[source]

Perform unresourced action on the ObsStateModel.

component_configured() None[source]

Perform configured action on the ObsStateModel.

component_unconfigured() None[source]

Perform unconfigured action on the ObsStateModel.

component_obsfault() None[source]

Perform fault action on the ObsStateModel.

_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

The resources assigned to the device.

read_assignedResources() list[str][source]

Read the resources assigned to the device.

Subclasses of this interface must provide this method.

configuredCapabilities

The configured capabilities of the device.

For example, [“Correlators:512”, “PssBeams:4”, “PstBeams:4”, “VlbiBeams:0”].

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 activationTime attribute.

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.

CapabilityTypes

Types of capability supported by this subarray.

SubID

Unique identifier for this subarray.

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.

started_AssignResources() None[source]

AssignResources command started callback.

completed_AssignResources() None[source]

AssignResources command completed callback.

AssignResources(argin: str) tuple[list[ResultCode], list[str]][source]

Assign resources to this subarray.

Subclasses should override the execute_AssignResources method to change the behaviour of this command.

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.

started_ReleaseResources() None[source]

ReleaseResources command started callback.

completed_ReleaseResources() None[source]

ReleaseResources command completed callback.

ReleaseResources(argin: str) tuple[list[ResultCode], list[str]][source]

Delta removal of assigned resources.

Subclasses should override the execute_ReleaseResources method to change the behaviour of this command.

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.

started_ReleaseAllResources() None[source]

ReleaseAllResources command started callback.

completed_ReleaseAllResources() None[source]

ReleaseAllResources command completed callback.

ReleaseAllResources() tuple[list[ResultCode], list[str]][source]

Remove all resources to tear down to an empty subarray.

Subclasses should override the execute_ReleaseAllResources method to change the behaviour of this command.

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.

started_Configure() None[source]

Configure command started callback.

completed_Configure() None[source]

Configure command completed callback.

Configure(argin: str) tuple[list[ResultCode], list[str]][source]

Configure the capabilities of this subarray.

Subclasses should override the execute_Configure method to change the behaviour of this command.

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.

Scan(argin: str) tuple[list[ResultCode], list[str]][source]

Start scanning.

Subclasses should override the execute_Scan method to change the behaviour of this command.

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.

EndScan() tuple[list[ResultCode], list[str]][source]

End the scan.

Subclasses should override the execute_EndScan method to change the behaviour of this command.

Raises:

NotImplementedError

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.

End() tuple[list[ResultCode], list[str]][source]

End the scan block.

Subclasses should override the execute_End method to change the behaviour of this command.

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.

started_ObsReset() None[source]

ObsReset command started callback.

completed_ObsReset() None[source]

ObsReset command completed callback.

ObsReset() tuple[list[ResultCode], list[str]][source]

Reset the current observation process.

Subclasses should override the execute_ObsReset method to change the behaviour of this command.

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.

started_Restart() None[source]

Restart command started callback.

completed_Restart() None[source]

Restart command completed callback.

Restart() tuple[list[ResultCode], list[str]][source]

Restart the subarray. That is, deconfigure and release all resources.

Subclasses should override the execute_Restart method to change the behaviour of this command.

Returns:

A tuple containing a result code and the unique ID of the command

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

started_Abort() None[source]

Abort command started callback.

completed_Abort() None[source]

Abort command completed callback.