Future Obs Interface

Interface for devices with an observation state.

class ska_tango_base.future._obs_interface.ObsStateEmitMixin[source]

Bases: SharingObserver

A mixin class for a SKA subarray device or its component manager.

It provides helper methods for managing the Observation State of the device.

on_new_shared_bus() None[source]

Initialise the mixin sharing observer.

_update_obs_state(**kwargs: Unpack[ObsStateInput]) None[source]

Emit a change in observation state.

This is a helper method for use by subclasses.

Parameters:

kwargs – key/values for state.

component_scanning() None[source]

Update observation state to reflect that scanning is in progress.

component_not_scanning() None[source]

Update observation state to reflect that scanning is not in progress.

component_resourced() None[source]

Update observation state to reflect that resources are allocated.

component_unresourced() None[source]

Update observation state to reflect that no resources are allocated.

component_configured() None[source]

Update observation state to reflect that the subarray is configured.

component_unconfigured() None[source]

Update observation state to reflect that the subarray is not configured.

component_obsfault() None[source]

Update observation state to reflect that a fault has occurred.

component_no_obsfault() None[source]

Revert the observation state fault.

class ska_tango_base.future._obs_interface.ObsInterface[source]

Bases: ObsStateEmitMixin, BaseInterface

Provides the Tango interface for an SKA device with an Observation State.

_obs_state: Signal[ObsState]

Signal for the observation state of the device.

Write to this signal to report the observation state of the device to Tango clients.

obsState

Observation state attribute of the device.

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

_commanded_obs_state: CommandedObsStateSignal

Signal for the commanded observation state of the device.

Write to this signal whenever a command is executed which will result in an obs state transition.

commandedObsState

Attribute for the last commanded Observation State of the device.

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

_config_progress: Signal[int]

Signal for the configuration progress of the device.

Write to this signal to report configuration progress to Tango clients.

configurationProgress

Configuration progress attribute of the device.

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

_config_delay_expected: Signal[int]

Signal for the configuration delay expected of the device.

Write to this signal to report the expected configuration delay to Tango clients.

configurationDelayExpected

Configuration delay expected attribute of the device.

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

read_obsState() ObsState | tuple[ObsState, float, AttrQuality][source]

Read the observation state of the device.

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

is_obsState_allowed(request_type: AttReqType) bool[source]

Check if the obsState can be read currently.

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

read_commandedObsState() ObsState | tuple[ObsState, float, AttrQuality][source]

Read the commanded observation state of the device.

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

is_commandedObsState_allowed(request_type: AttReqType) bool[source]

Check if the commandedObsState can be read currently.

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

read_configurationProgress() int | tuple[int, float, AttrQuality][source]

Read the configuration progress of the device.

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

is_configurationProgress_allowed(request_type: AttReqType) bool[source]

Check if the configurationProgress can be read currently.

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

read_configurationDelayExpected() int | tuple[int, float, AttrQuality][source]

Read the expected configuration delay of the device.

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

is_configurationDelayExpected_allowed(request_type: AttReqType) bool[source]

Check if the configurationDelayExpected can be read currently.

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

ska_tango_base.future._obs_interface.standard_obs_mode(description: str | None = None, **kwargs: Any) tuple[Signal[list[ObsMode]], attribute_from_signal][source]

Return a signal and attribute pair for the optional obsMode attribute.

The obsMode attribute exposes the active observation modes of the device as a list of ObsMode enumerants. The initial value is [ObsMode.IDLE]. The returned tuple should be unpacked into class-level signal and attribute declarations, for example:

_obs_mode, obsMode = standard_obs_mode()

Override description to provide a device-specific Tango attribute description.

Parameters:
  • description – Optional override for the Tango attribute description.

  • kwargs – Additional keyword arguments forwarded to attribute_from_signal().

Returns:

A (signal, attribute) tuple.