PoweredInterface Tango Device

Provides the Tango interface for a SKA device that controls a powered component.

This class extends BaseInterface with support for power state transitions (ON, OFF, STANDBY) driven by the component under control. It is up to subclasses to override various abstract methods to provide the appropriate behaviour and set the Operational State as appropriate, except for the initial state that is set in init_device().

The Operational State of an SKA Tango device is exposed as the built-in Tango device state via set_state(). Subclasses are not expected to call set_state() themselves. Instead, the state is driven automatically by calling init_completed(), software_fault() component_on(), component_off() and component_standby() from the appropriate places in the device implementation, which will additionally ensure that change and archive events are sent.

The Operational State of the PoweredInterface only supports a subset of the DevState enumeration, with the following interpretations:

  • INIT: The device is initialising. Mandatory initial state for all devices.

  • ON: The system under control is powered on. Mandatory default state if the device is operational.

  • OFF: The system under control is powered off. Optional.

  • STANDBY: The system under control is in low-power standby mode. Optional.

  • FAULT: The system under control is in fault. Optional.

PoweredInterface also provides the signals _admin_mode, _commanded_state and _health_state as well as the corresponding Tango attributes adminMode, commandedState and healthState, as well as healthInfo.

The adminMode Tango attribute is writable and should not be set by subclasses of this interface.

The commandedState should be set by subclasses as appropriate, using the corresponding signal.

The healthState and healthInfo read-only attributes should be set by subclasses by calling report_health().

This interface also provides optional state transition commands Off(), Standby(), On() as well as implementations of the is_Off_allowed(), is_Standby_allowed() and is_On_allowed() methods which respect the Operational State machine.

Subclasses can provide an implementation for these commands by overriding the execute_Off(), execute_Standby() and execute_On() methods.

Properties

PoweredInterface.LoggingLevelDefault

Default logging level at device startup.

Data type:

DevUShort

Default value:

4

PoweredInterface.LoggingTargetsDefault

Default logging targets at device startup.

Data type:

DevVarStringArray

Default value:

[‘tango::logger’]

Attributes

PoweredInterface.State

The operational state of the device as enumeration.

Access:

READ

Data type:

DevState

Data format:

SCALAR

PoweredInterface.Status

More detailed textual information about the device’s status.

Access:

READ

Data type:

DevString

Data format:

SCALAR

PoweredInterface.adminMode

The Admin Mode of the device.

Set by a client to mark the device for science or only engineering.

Access:

READ_WRITE

Data type:

DevEnum

Data format:

SCALAR

PoweredInterface.buildState

Read the Build State of the device.

Access:

READ

Data type:

DevString

Data format:

SCALAR

PoweredInterface.commandedState

The last commanded Operating State of the device.

Initial string is “None”. Only other strings it can change to is “OFF”, “STANDBY” or “ON”, following the Off(), Standby() or On() commands. If the state transition commands are long running commands the commanded state will only update when the long running command starts executing.

Access:

READ

Data type:

DevString

Data format:

SCALAR

PoweredInterface.healthInfo

Read the Health Info of the device.

It provides an explanation for the currently reported Health State

Access:

READ

Data type:

DevString

Data format:

SPECTRUM

Max_dim_x:

256

PoweredInterface.healthState

Read the Health State of the device.

It interprets the current device condition and condition of all managed devices to set this.

Access:

READ

Data type:

DevEnum

Data format:

SCALAR

PoweredInterface.loggingLevel

Read the logging level of the device.

Initialises to LoggingLevelDefault on startup. See LoggingLevel

Access:

READ_WRITE

Data type:

DevEnum

Data format:

SCALAR

PoweredInterface.loggingTargets

Read the additional logging targets of the device.

Note that this excludes the handlers provided by the ska_ser_logging library defaults - initialises to LoggingTargetsDefault on startup.

Access:

READ_WRITE

Data type:

DevString

Data format:

SPECTRUM

Max_dim_x:

4

PoweredInterface.versionId

Read the Version Id of the device.

Access:

READ

Data type:

DevString

Data format:

SCALAR

Commands

PoweredInterface.GetVersionInfo() DevVarStringArray

Get the version information of the device.

Returns:

The device class name and its package information.

PoweredInterface.Init() DevVoid

Reinitialise the Tango device.

PoweredInterface.On() DevVarLongStringArray

Turn the device on.

Returns:

[ResultCode][Status message or command ID]