Obs Interface
Interface for devices with an observation state.
- class ska_tango_base.obs.obs_interface.ObsInterface[source]
Bases:
BaseInterfaceProvides the Tango interface for an SKA device with an Observation State.
Warning
The default scalar
obsModeattribute provided by this class has been deprecated since ska-tango-base 1.5.0. Use thestandard_obs_mode()method to override the scalar attribute and its signal with a list version in a subclass.Example
class MyDevice(ObsInterface): _obs_mode, obsMode = standard_obs_mode()
- _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 a 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.
- _obs_mode: Signal[ObsMode] | Signal[list[ObsMode]]
Signal for the observation mode of the device.
Write to this signal to report observation mode of the device to Tango clients.
- obsMode: attribute_from_signal | None
Observation mode attribute of the device.
This should be set by subclasses of this interface by writing to
_obs_mode.
- _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
obsStateattribute.
- 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
commandedObsStateattribute.
- 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_obsMode() ObsMode | tuple[ObsMode, float, AttrQuality][source]
Read the observation mode of the device.
Subclasses can override this to change the behaviour of the
obsModeattribute.
- is_obsMode_allowed(request_type: AttReqType) bool[source]
Check if the obsMode 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
configurationProgressattribute.
- 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
configurationDelayExpectedattribute.
- 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.obs.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
obsModeattribute.The
obsModeattribute exposes the active observation modes of the device as a list ofObsModeenumerants. 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
descriptionto 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.