Deprecated Controller

This module provides an SKA controller Tango device.

class ska_tango_base.controller.ControllerComponentManager[source]

Bases: BaseComponentManager

A stub for an controller component manager.

Deprecated:

Use the future API instead.

class ska_tango_base.controller.SKAController[source]

Bases: SKABaseDevice[ComponentManagerT], ControllerInterface

A generic controller device for SKA.

Deprecated:

Use the future API instead.

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]

Bases: DeviceInitCommand

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]

Bases: FastCommand[bool]

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

class ska_tango_base.controller.ControllerInterface[source]

Bases: BaseInterface

Provides the Tango interface for an SKA controller devices.

Deprecated:

Use the future API instead.

MaxCapabilities: list[str]

List of maximum number of instances per capability type provided by this element.

_max_capabilities

Signal for the maximum capabilities of the device.

Write to this signal to signal a change in the maximum capabilities of the device.

maxCapabilities

The maximum capabilities of the device.

This should be set by subclasses of this interface by writing to _max_capabilities.

read_maxCapabilities() list[str] | tuple[list[str], float, AttrQuality][source]

Read the max capabilities of the device.

Subclasses can override this to change the behaviour of the maxCapabilities attribute.

is_maxCapabilities_allowed(attr: AttReqType) bool[source]

Check if the maxCapabilities can be read currently.

This can be overridden by subclasses to restrict when clients can access the attribute.

_available_capabilities

Signal for the maximum capabilities of the device.

Write to this signal to signal a change in the maximum capabilities of the device.

availableCapabilities

The maximum capabilities of the device.

This should be set by subclasses of this interface by writing to _max_capabilities.

read_availableCapabilities() list[str] | tuple[list[str], float, AttrQuality][source]

Read the max capabilities of the device.

Subclasses can override this to change the behaviour of the availableCapabilities attribute.

is_availableCapabilities_allowed(attr: AttReqType) bool[source]

Check if the availableCapabilities can be read currently.

This can be overridden by subclasses to restrict when clients can access the attribute.

on_new_shared_bus() None[source]

Initialise the device.

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

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

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

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

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

Execute the IsCapabilityAchieable command.

Subclasses should override this to change the behaviour of the IsCapabilityAchievable command.