Capability Device

SKACapability.

Capability handling device

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

A stub for an SKA capability component manager.

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

A Capability handling device.

It exposes the instances of configured capabilities.

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 CapabilityDevice’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.

activationTime() float

Read time of activation since Unix epoch.

Returns:

Activation time in seconds

configuredInstances() int

Read the number of instances of a capability in the subarray.

Returns:

The number of configured instances of a capability in a subarray

usedComponents() list[str]

Read the list of components with no.

of instances in use on this Capability

Returns:

The number of components currently in use.

class ConfigureInstancesCommand(device: SKACapability[ComponentManagerT], logger: Logger | None = None)[source]

A class for the SKALoggerDevice’s SetLoggingLevel() command.

do(*args: Any, **kwargs: Any) tuple[ResultCode, str][source]

Stateless hook for ConfigureInstances()) command functionality.

Parameters:
  • args – positional arguments to the command. This command takes a single integer number of instances.

  • 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.

ConfigureInstances(argin: int) tuple[list[ResultCode], list[str]]

Specify the number of instances of the current capacity to be configured.

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

Parameters:

argin – Number of instances to configure

Returns:

ResultCode and string message

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

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code