SKADevice
This module implements a generic base model and device for SKA.
It exposes the generic attributes, properties and commands of an SKA device.
- class ska_tango_base.ska_device.SKADevice[source]
Bases:
DeviceA generic base device for SKA.
- LoggingLevelDefault
Device property.
Default logging level at device startup. See
LoggingLevel
- LoggingTargetsDefault
Device property.
Default logging targets at device startup. See the project readme for details.
- init_device() None[source]
Initialise the tango device after startup.
Subclasses that have no need to override the default implementation of state management may leave
init_device()alone. Override thedo()method on the nested classInitCommandinstead.
- set_logging_level(value: LoggingLevel) None[source]
Set the logging level for the device.
Both the Python logger and the Tango logger are updated.
- Parameters:
value – Logging level for logger
- Raises:
LoggingLevelError – for invalid value
- set_logging_targets(targets: list[str]) None[source]
Set the additional logging targets for the device.
Note that this excludes the handlers provided by the ska_ser_logging library defaults.
- Parameters:
targets – Logging targets for logger
- _build_state: str
Value returned by the
buildState()attribute.Should be set by subclasses during device initialisation.
Typically this will include the name of the python package, the version number of that package and a brief description of that package.
- _version_id: str
Value returned by the
versionId()attribute.Should be set by subclasses during device initialisation.
Must be of the form
"<major>.<minor>.<patch>".
- loggingLevel(value: LoggingLevel) None
Set the logging level for the device.
Both the Python logger and the Tango logger are updated.
- Parameters:
value – Logging level for logger