Subarray Component Manager

This module provides an abstract component manager for SKA Tango subarray devices.

class SubarrayComponentManager(logger: Logger, communication_state_callback: Optional[Callable[[CommunicationStatus], None]] = None, component_state_callback: Optional[Callable[[...], None]] = None, **state: Any)[source]

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

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

assign(resources: set[str], task_callback: Optional[Callable[[], None]] = None) tuple[TaskStatus, str][source]

Assign resources to the component.

Parameters
  • resources – resources to be assigned

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

Raises

NotImplementedError – This is an abstract class

release(resources: set[str], task_callback: Optional[Callable[[], None]] = None) tuple[TaskStatus, str][source]

Release resources from the component.

Parameters
  • resources – resources to be released

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

Raises

NotImplementedError – This is an abstract class

release_all(task_callback: Optional[Callable] = 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(configuration: dict[str, Any], task_callback: Optional[Callable[[], None]] = None) tuple[TaskStatus, str][source]

Configure the component.

Parameters
  • configuration – the configuration to be configured

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

Raises

NotImplementedError – This is an abstract class

deconfigure(task_callback: Optional[Callable] = 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(args: str, task_callback: Optional[Callable] = None) tuple[TaskStatus, str][source]

Start scanning.

Parameters
  • args – scan parameters encoded in a json string

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

Raises

NotImplementedError – This is an abstract class

end_scan(task_callback: Optional[Callable] = 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

abort(task_callback: Optional[Callable] = None) tuple[TaskStatus, str][source]

Tell the component to abort whatever it was doing.

Parameters

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

Raises

NotImplementedError – This is an abstract class

obsreset(task_callback: Optional[Callable] = 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: Optional[Callable] = 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