Controller Device

SKAController.

Controller device

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

A stub for an controller component manager.

class SKAController(*args: Any, **kwargs: Any)[source]

Controller device.

init_command_objects() None[source]

Set up the command objects.

class InitCommand(device: tango.server.Device, logger: Logger | None = None, validator: ArgumentValidator | None = None)[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.

elementLoggerAddress() str

Read FQDN of Element Logger device.

Returns:

FQDN of Element Logger device

elementAlarmAddress() str

Read FQDN of Element Alarm device.

Returns:

FQDN of Element Alarm device

elementTelStateAddress() str

Read FQDN of Element TelState device.

Returns:

FQDN of Element TelState device

elementDatabaseAddress() str

Read FQDN of Element Database device.

Returns:

FQDN of Element Database device

maxCapabilities() list[str]

Read maximum number of instances of each capability type.

Returns:

list of maximum number of instances of each capability type

availableCapabilities() list[str]

Read list of available number of instances of each capability type.

Returns:

list of available number of instances of each capability type

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

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

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

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

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

main(*args: str, **kwargs: str) int[source]

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code