Controller Device

SKAController.

Controller device

class ska_tango_base.controller.controller_device.ControllerComponentManager[source]

A stub for an controller component manager.

class ska_tango_base.controller.controller_device.SKAController[source]

A generic controller device for SKA.

SKAController inherits from the SKABaseDevice and ControllerInterface, and expects a component manager to be provided by implementing the create_component_manager() method.

init_command_objects() None[source]

Set up the command objects.

class InitCommand[source]

A class for the SKAController’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.

create_component_manager() ComponentManagerT[source]

Create and return a component manager for this device.

Raises:

NotImplementedError – because it is not implemented.

class IsCapabilityAchievableCommand[source]

A class for the SKAController’s IsCapabilityAchievable() command.

__init__(device: SKAController[ComponentManagerT], logger: Logger | None = None)[source]

Initialise a new instance.

Parameters:
  • device – the device that this command acts upon.

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

do(*args: Any, **kwargs: Any) bool[source]

Stateless hook for device IsCapabilityAchievable() command.

Parameters:
  • args – positional arguments to the command. There is a single positional argument: an array consisting of pairs of * [nrInstances]: DevLong. Number of instances of the capability. * [Capability types]: DevString. Type of capability.

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

Returns:

Whether the capability is achievable

execute_IsCapabilityAchievable(argin: tuple[list[int], list[str]]) bool[source]

Check if provided capabilities can be achieved by the resource(s).

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

Parameters:

argin

An array consisting pair of

  • [nrInstances]: DevLong. Number of instances of the capability.

  • [Capability types]: DevString. Type of capability.

Returns:

True or False