========================== SKABaseDevice Tango Device ========================== A generic base device for SKA with support for long running commands. :class:`~ska_tango_base.base.base_device.SKABaseDevice` inherits from the :class:`~ska_tango_base.base.base_interface.BaseInterface` and :class:`~ska_tango_base.long_running_commands.mixin.AbstractLRCMixin`, and expects a component manager to be provided by implementing the :meth:`~ska_tango_base.base.base_device.SKABaseDevice.create_component_manager` method. Properties ---------- .. index:: single: GroupDefinitions; SKABaseDevice.GroupDefinitions .. py:attribute:: GroupDefinitions :module: SKABaseDevice Each string in the list is a JSON serialised dict defining the ``group_name``, ``devices`` and ``subgroups`` in the group. A Tango Group object is created for each item in the list, according to the hierarchy defined. This provides easy access to the managed devices in bulk, or individually. :data type: DevVarStringArray .. index:: single: LoggingLevelDefault; SKABaseDevice.LoggingLevelDefault .. py:attribute:: LoggingLevelDefault :module: SKABaseDevice Default logging level at device startup. :data type: DevUShort :default value: 4 .. index:: single: LoggingTargetsDefault; SKABaseDevice.LoggingTargetsDefault .. py:attribute:: LoggingTargetsDefault :module: SKABaseDevice Default logging targets at device startup. :data type: DevVarStringArray :default value: ['tango::logger'] .. index:: single: SkaLevel; SKABaseDevice.SkaLevel .. py:attribute:: SkaLevel :module: SKABaseDevice Indication of importance of the device in the SKA hierarchy to support drill-down navigation: 1..6, with 1 highest. :data type: DevShort :default value: 4 Attributes ---------- .. index:: single: State; SKABaseDevice.State .. py:attribute:: State :module: SKABaseDevice The operational state of the device as enumeration. :access: READ :data type: DevState :data format: SCALAR .. index:: single: Status; SKABaseDevice.Status .. py:attribute:: Status :module: SKABaseDevice More detailed textual information about the device's status. :access: READ :data type: DevString :data format: SCALAR .. index:: single: adminMode; SKABaseDevice.adminMode .. py:attribute:: adminMode :module: SKABaseDevice The Admin Mode of the device. It may interpret the current device condition and condition of all managed devices to set this. :access: READ_WRITE :data type: DevEnum :data format: SCALAR .. index:: single: buildState; SKABaseDevice.buildState .. py:attribute:: buildState :module: SKABaseDevice Read the Build State of the device. :access: READ :data type: DevString :data format: SCALAR .. index:: single: commandedState; SKABaseDevice.commandedState .. py:attribute:: commandedState :module: SKABaseDevice 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 .. index:: single: controlMode; SKABaseDevice.controlMode .. py:attribute:: controlMode :module: SKABaseDevice The control mode of the device. A Tango Device accepts only from a 'local' client and ignores commands and queries received from TM or any other 'remote' clients. The local client has to release LOCAL control before REMOTE clients can take control again. :access: READ_WRITE :data type: DevEnum :data format: SCALAR .. index:: single: healthInfo; SKABaseDevice.healthInfo .. py:attribute:: healthInfo :module: SKABaseDevice ('Read the Health Info of the device.\n\nIt provides an explanation for the currently reported Health State',) :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 256 .. index:: single: healthState; SKABaseDevice.healthState .. py:attribute:: healthState :module: SKABaseDevice 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; SKABaseDevice.loggingLevel .. py:attribute:: loggingLevel :module: SKABaseDevice 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; SKABaseDevice.loggingTargets .. py:attribute:: loggingTargets :module: SKABaseDevice 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: longRunningCommandIDsInQueue; SKABaseDevice.longRunningCommandIDsInQueue .. py:attribute:: longRunningCommandIDsInQueue :module: SKABaseDevice Read the IDs of the long running commands in the queue. Every client that executes a command will receive a command ID as response. Keep track of IDs currently allocated. Entries are removed ``self._command_tracker._removal_time`` seconds after they have finished. **DEPRECATED**: A client can check for the queued command(s) in 'lrcQueue'. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 32 .. index:: single: longRunningCommandInProgress; SKABaseDevice.longRunningCommandInProgress .. py:attribute:: longRunningCommandInProgress :module: SKABaseDevice Read the name(s) of the currently executing long running command(s). Name(s) of command and possible abort in progress or empty string(s). **DEPRECATED**: A client can check for the command(s) in progress in 'lrcExecuting'. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 2 .. index:: single: longRunningCommandProgress; SKABaseDevice.longRunningCommandProgress .. py:attribute:: longRunningCommandProgress :module: SKABaseDevice Read the progress of the currently executing long running command(s). ID, progress of the currently executing command(s). Clients can subscribe to on change event and wait for the ID they are interested in. **DEPRECATED**: A client can check the progress of command(s) in 'lrcExecuting'. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 4 .. index:: single: longRunningCommandResult; SKABaseDevice.longRunningCommandResult .. py:attribute:: longRunningCommandResult :module: SKABaseDevice Read the result of the completed long running command. Reports unique ID and json-encoded result. Clients can subscribe to on change event and wait for the ID they are interested in. **DEPRECATED**: A client can check for the result of a command in 'lrcFinished'. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 2 .. index:: single: longRunningCommandStatus; SKABaseDevice.longRunningCommandStatus .. py:attribute:: longRunningCommandStatus :module: SKABaseDevice Read the status of the currently executing long running commands. ID, status pairs of the currently executing commands. Clients can subscribe to on change event and wait for the ID they are interested in. **DEPRECATED**: A client can check for the status of a command in the 'lrcQueue', 'lrcExecuting' and 'lrcFinished' attributes. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 64 .. index:: single: longRunningCommandsInQueue; SKABaseDevice.longRunningCommandsInQueue .. py:attribute:: longRunningCommandsInQueue :module: SKABaseDevice Read the long running commands in the queue. Keep track of which commands are that are currently known about. Entries are removed ``self._command_tracker._removal_time`` seconds after they have finished. **DEPRECATED**: A client can check for the queued command(s) in 'lrcQueue'. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 32 .. index:: single: lrcExecuting; SKABaseDevice.lrcExecuting .. py:attribute:: lrcExecuting :module: SKABaseDevice A list of info JSON blobs of the currently executing commands. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 2 .. index:: single: lrcFinished; SKABaseDevice.lrcFinished .. py:attribute:: lrcFinished :module: SKABaseDevice A list of info JSON blobs of the finished long running commands. :access: READ :data type: DevString :data format: SPECTRUM :max_dim_x: 100 .. index:: single: lrcProtocolVersions; SKABaseDevice.lrcProtocolVersions .. py:attribute:: lrcProtocolVersions :module: SKABaseDevice Return supported protocol versions. :access: READ :data type: DevLong64 :data format: SPECTRUM :max_dim_x: 2 .. index:: single: lrcQueue; SKABaseDevice.lrcQueue .. py:attribute:: lrcQueue :module: SKABaseDevice A list of info JSON blobs of the commands in queue. :access: READ :data type: DevString :data format: SPECTRUM .. index:: single: simulationMode; SKABaseDevice.simulationMode .. py:attribute:: simulationMode :module: SKABaseDevice When TRUE the device is using a simulator. :access: READ_WRITE :data type: DevEnum :data format: SCALAR .. index:: single: testMode; SKABaseDevice.testMode .. py:attribute:: testMode :module: SKABaseDevice If TEST the device is using testing logic. :access: READ_WRITE :data type: DevEnum :data format: SCALAR .. index:: single: versionId; SKABaseDevice.versionId .. py:attribute:: versionId :module: SKABaseDevice Read the Version Id of the device. :access: READ :data type: DevString :data format: SCALAR Commands -------- .. index:: single: Abort; SKABaseDevice.Abort .. py:method:: Abort() -> DevVarLongStringArray :module: SKABaseDevice Abort any executing long running command(s) and empty the queue. :returns: [ResultCode.STARTED][Command ID] .. index:: single: AbortCommands; SKABaseDevice.AbortCommands .. py:method:: AbortCommands() -> DevVarLongStringArray :module: SKABaseDevice Empty out long running commands in queue. **DEPRECATED**: A client should call the tracked 'Abort' long running command instead. :returns: [ResultCode.STARTED]['Aborting commands'] .. index:: single: CheckLongRunningCommandStatus; SKABaseDevice.CheckLongRunningCommandStatus .. py:method:: CheckLongRunningCommandStatus(DevString) -> DevString :module: SKABaseDevice Check the status of a long running command by ID. :returns: Status of the asynchronous task. .. index:: single: DebugDevice; SKABaseDevice.DebugDevice .. py:method:: DebugDevice() -> DevUShort :module: SKABaseDevice Enable remote debugging of this device. :returns: The TCP port the debugger is listening on. .. index:: single: GetVersionInfo; SKABaseDevice.GetVersionInfo .. py:method:: GetVersionInfo() -> DevVarStringArray :module: SKABaseDevice Get the version information of the device. :returns: The device class name and its package information. .. index:: single: Init; SKABaseDevice.Init .. py:method:: Init() -> DevVoid :module: SKABaseDevice Reinitialise the Tango device. .. index:: single: Off; SKABaseDevice.Off .. py:method:: Off() -> DevVarLongStringArray :module: SKABaseDevice Turn the device off. :returns: [ResultCode][Status message or command ID] .. index:: single: On; SKABaseDevice.On .. py:method:: On() -> DevVarLongStringArray :module: SKABaseDevice Turn the device on. :returns: [ResultCode][Status message or command ID] .. index:: single: Reset; SKABaseDevice.Reset .. py:method:: Reset() -> DevVarLongStringArray :module: SKABaseDevice Reset the device. :returns: [ResultCode][Status message or command ID] .. index:: single: Standby; SKABaseDevice.Standby .. py:method:: Standby() -> DevVarLongStringArray :module: SKABaseDevice Put the device into standby mode. :returns: [ResultCode][Status message or command ID]