========================== BaseInterface Tango Device ========================== Provides the Tango interface for a base SKA device with an Operational State. This class only provides the Tango interface required for SKA Tango devices which support an Operational State. 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 :py:meth:`!init_device`. The Operational State of an SKA Tango device is exposed as the built-in Tango device state via :py:meth:`~tango.server.Device.set_state()`. Subclasses are not expected to call :py:meth:`~tango.server.Device.set_state()` themselves. Instead, the state is driven automatically by calling :py:meth:`~.future._base_interface.BaseInterface.init_invoked`, :py:meth:`~.future._base_interface.BaseInterface.init_completed` and :py:meth:`~.future._base_interface.OpStateEmitMixin.software_fault` from the appropriate places in the device implementation, which will additionally ensure that change and archive events are sent. The Operational State of the :py:class:`!BaseInterface` only supports a subset of the :py:class:`~tango.DevState` enumeration, with the following interpretations: - **INIT**: The device is initialising. Mandatory initial state for all devices. - **ON**: The Tango device is communicating with the system under control. Mandatory default state after initialisation has finished. - **FAULT**: The Tango device encountered a software fault/exception. Optional. :py:class:`!BaseInterface` also provides the signals :py:attr:`~.future._base_interface.BaseInterface._admin_mode` and :py:attr:`~.future._base_interface.BaseInterface._health_state` as well as the corresponding Tango attributes :py:attr:`~.future._base_interface.BaseInterface.adminMode` and :py:attr:`~.future._base_interface.BaseInterface.healthState`, as well as :py:attr:`~.future._base_interface.BaseInterface.healthInfo`. The :py:attr:`~.future._base_interface.BaseInterface.adminMode` Tango attribute is writable and should not be set by subclasses of this interface. The :py:attr:`~.future._base_interface.BaseInterface.healthState` and :py:attr:`~.future._base_interface.BaseInterface.healthInfo` read-only attributes should be set by subclasses by calling :py:meth:`~.future._base_interface.BaseInterface.report_health()`. It is intended to provide information of the overall health of the device, based on the state of the component(s) it is monitoring. Properties ---------- .. index:: single: LoggingLevelDefault; BaseInterface.LoggingLevelDefault .. py:attribute:: LoggingLevelDefault :module: BaseInterface Default logging level at device startup. :data type: DevUShort :default value: 4 .. index:: single: LoggingTargetsDefault; BaseInterface.LoggingTargetsDefault .. py:attribute:: LoggingTargetsDefault :module: BaseInterface Default logging targets at device startup. :data type: DevVarStringArray :default value: ['tango::logger'] Attributes ---------- .. index:: single: State; BaseInterface.State .. py:attribute:: State :module: BaseInterface The operational state of the device as enumeration. :access: READ :data type: DevState :data format: SCALAR .. index:: single: Status; BaseInterface.Status .. py:attribute:: Status :module: BaseInterface More detailed textual information about the device's status. :access: READ :data type: DevString :data format: SCALAR .. index:: single: adminMode; BaseInterface.adminMode .. py:attribute:: adminMode :module: BaseInterface 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 .. index:: single: buildState; BaseInterface.buildState .. py:attribute:: buildState :module: BaseInterface Read the Build State of the device. :access: READ :data type: DevString :data format: SCALAR .. index:: single: healthInfo; BaseInterface.healthInfo .. py:attribute:: healthInfo :module: BaseInterface 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 .. index:: single: healthState; BaseInterface.healthState .. py:attribute:: healthState :module: BaseInterface 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 .. index:: single: loggingLevel; BaseInterface.loggingLevel .. py:attribute:: loggingLevel :module: BaseInterface Read the logging level of the device. Initialises to LoggingLevelDefault on startup. See :py:class:`~ska_control_model.LoggingLevel` :access: READ_WRITE :data type: DevEnum :data format: SCALAR .. index:: single: loggingTargets; BaseInterface.loggingTargets .. py:attribute:: loggingTargets :module: BaseInterface 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 .. index:: single: versionId; BaseInterface.versionId .. py:attribute:: versionId :module: BaseInterface Read the Version Id of the device. :access: READ :data type: DevString :data format: SCALAR Commands -------- .. index:: single: GetVersionInfo; BaseInterface.GetVersionInfo .. py:method:: GetVersionInfo() -> DevVarStringArray :module: BaseInterface Get the version information of the device. :returns: The device class name and its package information. .. index:: single: Init; BaseInterface.Init .. py:method:: Init() -> DevVoid :module: BaseInterface Reinitialise the Tango device.