Component Manager Mixins

This module defines SKA Tango device mixin classes for using a component manager.

class ska_tango_base.future._component_manager_mixins.ComponentManagerMixin[source]

Bases: SignalBusMixin, Generic[ComponentManagerT]

An abstract mixin class for using a component manager with a SKA Tango device.

on_new_shared_bus() None[source]

Create the component manager when the shared bus is initialised.

The component manager is created here so that the SharingObserver bus-propagation mechanism can automatically share the bus with the component manager (which itself should be a subclass of SharingObserver). The SharingObserver.shared_bus setter iterates vars(self) after calling on_new_shared_bus, so assigning _component_manager here ensures the component manager is found and receives the bus before any signals are emitted.

delete_device() None[source]

Cleanup the component manager.

property component_manager: ComponentManagerT

Get the component manager.

create_component_manager() ComponentManagerT[source]

Create and return a component manager for this device.

Raises:

NotImplementedError – if not overridden by a subclass.

class ska_tango_base.future._component_manager_mixins.ComponentManagerLRCMixin[source]

Bases: ComponentManagerMixin[TaskExecutorComponentManagerT], AbstractLRCMixin

A mixin class for using a component manager and long running commands.

This mixin is intended to be used with a SKA Tango device which has a component manager that is a subclass of TaskExecutorComponentManager, which in turn provides a task executor following the TaskExecutorProtocol that can be used to execute long running tasks.

property task_executor: TaskExecutorProtocol

Get the task executor.

Returns:

The initialised task executor.

schedule_abort_task(task_callback: TaskCallbackType) tuple[TaskStatus, str][source]

Schedule an Abort task to begin executing immediately.

Subclasses should override this to change the behaviour of the Abort() command.

Parameters:

task_callback – Notified of progress of the abort command.

Returns:

A tuple containing TaskStatus.IN_PROGRESS and a message.