Skip to content
Snippets Groups Projects
Commit 106b7c2c authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Add TANGO workshop code, day #2

parents
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
#
# This file is part of the PowerSupply project
#
#
#
# Distributed under the terms of the GPL license.
# See LICENSE.txt for more info.
""" Training
"""
# PyTango imports
import PyTango
from PyTango import DebugIt
from PyTango.server import run
from PyTango.server import Device, DeviceMeta
from PyTango.server import attribute, command
from PyTango.server import device_property
from PyTango import AttrQuality, DispLevel, DevState
from PyTango import AttrWriteType, PipeWriteType
# Additional import
# PROTECTED REGION ID(PowerSupply.additionnal_import) ENABLED START #
# PROTECTED REGION END # // PowerSupply.additionnal_import
__all__ = ["PowerSupply", "main"]
class PowerSupply(Device):
"""
"""
__metaclass__ = DeviceMeta
# PROTECTED REGION ID(PowerSupply.class_variable) ENABLED START #
# PROTECTED REGION END # // PowerSupply.class_variable
# -----------------
# Device Properties
# -----------------
LoadImpedance = device_property(
dtype='double',
mandatory=True
)
HWUpdateTime = device_property(
dtype='double',
mandatory=True
)
# ----------
# Attributes
# ----------
Voltage = attribute(
dtype='double',
access=AttrWriteType.READ_WRITE,
label="PSV",
unit="V",
display_unit="V",
)
Current = attribute(
dtype='double',
label="PSC",
unit="A",
display_unit="A",
max_value=100,
min_value=0,
max_alarm=100,
min_alarm=90,
max_warning=90,
min_warning=80,
)
# ---------------
# General methods
# ---------------
def init_device(self):
Device.init_device(self)
# PROTECTED REGION ID(PowerSupply.init_device) ENABLED START #
self.voltage = 0
self.current = 0
self.set_state(DevState.OFF)
# PROTECTED REGION END # // PowerSupply.init_device
def always_executed_hook(self):
# PROTECTED REGION ID(PowerSupply.always_executed_hook) ENABLED START #
t = 'Voltage = %s, Current = %s' % (self.voltage, self.current)
self.set_status(t)
print(t)
# PROTECTED REGION END # // PowerSupply.always_executed_hook
def delete_device(self):
# PROTECTED REGION ID(PowerSupply.delete_device) ENABLED START #
pass
# PROTECTED REGION END # // PowerSupply.delete_device
# ------------------
# Attributes methods
# ------------------
def read_Voltage(self):
# PROTECTED REGION ID(PowerSupply.Voltage_read) ENABLED START #
return self.voltage
# PROTECTED REGION END # // PowerSupply.Voltage_read
def write_Voltage(self, value):
# PROTECTED REGION ID(PowerSupply.Voltage_write) ENABLED START #
self.voltage = value
self.current = self.voltage / self.LoadImpedance
# PROTECTED REGION END # // PowerSupply.Voltage_write
def read_Current(self):
# PROTECTED REGION ID(PowerSupply.Current_read) ENABLED START #
return self.current
# PROTECTED REGION END # // PowerSupply.Current_read
# --------
# Commands
# --------
@command(
)
@DebugIt()
def On(self):
# PROTECTED REGION ID(PowerSupply.On) ENABLED START #
self.set_state(DevState.ON)
# PROTECTED REGION END # // PowerSupply.On
@command(
)
@DebugIt()
def Off(self):
# PROTECTED REGION ID(PowerSupply.Off) ENABLED START #
self.set_state(DevState.OFF)
# PROTECTED REGION END # // PowerSupply.Off
# ----------
# Run server
# ----------
def main(args=None, **kwargs):
# PROTECTED REGION ID(PowerSupply.main) ENABLED START #
return run((PowerSupply,), args=args, **kwargs)
# PROTECTED REGION END # // PowerSupply.main
if __name__ == '__main__':
main()
# -*- coding: utf-8 -*-
#
# This file is part of the PowerSupply project
#
#
#
# Distributed under the terms of the GPL license.
# See LICENSE.txt for more info.
""" bla
"""
# PyTango imports
import PyTango
from PyTango import DebugIt
from PyTango.server import run
from PyTango.server import Device, DeviceMeta
from PyTango.server import attribute, command
from PyTango.server import device_property
from PyTango import AttrQuality, DispLevel, DevState
from PyTango import AttrWriteType, PipeWriteType
# Additional import
# PROTECTED REGION ID(PowerSupply.additionnal_import) ENABLED START #
# PROTECTED REGION END # // PowerSupply.additionnal_import
__all__ = ["PowerSupply", "main"]
class PowerSupply(Device):
"""
"""
__metaclass__ = DeviceMeta
# PROTECTED REGION ID(PowerSupply.class_variable) ENABLED START #
# PROTECTED REGION END # // PowerSupply.class_variable
# -----------------
# Device Properties
# -----------------
LoadImpedance = device_property(
dtype='double',
mandatory=True
)
HWUpdateTime = device_property(
dtype='double',
mandatory=True
)
# ----------
# Attributes
# ----------
current = attribute(
dtype='double',
)
voltage = attribute(
dtype='double',
access=AttrWriteType.READ_WRITE,
)
# ---------------
# General methods
# ---------------
def init_device(self):
Device.init_device(self)
# PROTECTED REGION ID(PowerSupply.init_device) ENABLED START #
self.voltage = 0.0
self.current = 0.0
self.set_state(DevState.OFF)
# PROTECTED REGION END # // PowerSupply.init_device
def always_executed_hook(self):
# PROTECTED REGION ID(PowerSupply.always_executed_hook) ENABLED START #
t = 'Voltage = %s, Current = %s' % (self.voltage, self.current)
self.set_status(t)
print(t)
# PROTECTED REGION END # // PowerSupply.always_executed_hook
def delete_device(self):
# PROTECTED REGION ID(PowerSupply.delete_device) ENABLED START #
pass
# PROTECTED REGION END # // PowerSupply.delete_device
# ------------------
# Attributes methods
# ------------------
def read_current(self):
# PROTECTED REGION ID(PowerSupply.current_read) ENABLED START #
return self.current
# PROTECTED REGION END # // PowerSupply.current_read
def read_voltage(self):
# PROTECTED REGION ID(PowerSupply.voltage_read) ENABLED START #
return self.voltage
# PROTECTED REGION END # // PowerSupply.voltage_read
def write_voltage(self, value):
# PROTECTED REGION ID(PowerSupply.voltage_write) ENABLED START #
self.voltage = value
self.current = self.voltage / self.LoadImpedance
# PROTECTED REGION END # // PowerSupply.voltage_write
# --------
# Commands
# --------
@command(
)
@DebugIt()
def On(self):
# PROTECTED REGION ID(PowerSupply.On) ENABLED START #
self.set_state(DevState.ON)
# PROTECTED REGION END # // PowerSupply.On
@command(
)
@DebugIt()
def Off(self):
# PROTECTED REGION ID(PowerSupply.Off) ENABLED START #
self.set_state(DevState.OFF)
# PROTECTED REGION END # // PowerSupply.Off
# ----------
# Run server
# ----------
def main(args=None, **kwargs):
# PROTECTED REGION ID(PowerSupply.main) ENABLED START #
return run((PowerSupply,), args=args, **kwargs)
# PROTECTED REGION END # // PowerSupply.main
if __name__ == '__main__':
main()
<?xml version="1.0" encoding="ASCII"?>
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://www.esrf.fr/tango/pogo/PogoDsl">
<classes name="PowerSupply" pogoRevision="9.6">
<description description="" title="bla" sourcePath="/hosthome" language="PythonHL" filestogenerate="XMI file,Code files,Protected Regions" license="GPL" copyright="" hasMandatoryProperty="true" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<identification contact="at astron.nl - jurges" author="jurges" emailDomain="astron.nl" classFamily="PowerSupply" siteSpecific="" platform="All Platforms" bus="Not Applicable" manufacturer="none" reference=""/>
</description>
<deviceProperties name="LoadImpedance" mandatory="true" description="">
<type xsi:type="pogoDsl:DoubleType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="HWUpdateTime" mandatory="true" description="">
<type xsi:type="pogoDsl:DoubleType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device state">
<type xsi:type="pogoDsl:StateType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device status">
<type xsi:type="pogoDsl:ConstStringType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="On" description="" execMethod="on" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<commands name="Off" description="" execMethod="off" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<attributes name="current" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="voltage" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<states name="ON" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="OFF" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="RUNNING" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<preferences docHome="./doc_html" makefileHome="/usr/local/share/pogo/preferences"/>
</classes>
</pogoDsl:PogoSystem>
# -*- coding: utf-8 -*-
#
# This file is part of the SKAPowerSupply project
#
#
#
# Distributed under the terms of the GPL license.
# See LICENSE.txt for more info.
""" blah
"""
# PyTango imports
import PyTango
from PyTango import DebugIt
from PyTango.server import run
from PyTango.server import Device, DeviceMeta
from PyTango.server import attribute, command
from PyTango.server import device_property
from PyTango import AttrQuality, DispLevel, DevState
from PyTango import AttrWriteType, PipeWriteType
from skabase.SKABaseDevice import SKABaseDevice
# Additional import
# PROTECTED REGION ID(SKAPowerSupply.additionnal_import) ENABLED START #
import time
# PROTECTED REGION END # // SKAPowerSupply.additionnal_import
__all__ = ["SKAPowerSupply", "main"]
class SKAPowerSupply(SKABaseDevice):
"""
"""
__metaclass__ = DeviceMeta
# PROTECTED REGION ID(SKAPowerSupply.class_variable) ENABLED START #
# PROTECTED REGION END # // SKAPowerSupply.class_variable
# -----------------
# Device Properties
# -----------------
HWUpdateTime = device_property(
dtype='double',
mandatory=True
)
LoadImpedance = device_property(
dtype='double',
mandatory=True
)
# ----------
# Attributes
# ----------
Current = attribute(
dtype='double',
)
Voltage = attribute(
dtype='double',
access=AttrWriteType.READ_WRITE,
)
# ---------------
# General methods
# ---------------
def init_device(self):
SKABaseDevice.init_device(self)
# PROTECTED REGION ID(SKAPowerSupply.init_device) ENABLED START #
self.Voltage = 0.0
self.Current = 0.0
self.set_state(DevState.OFF)
# PROTECTED REGION END # // SKAPowerSupply.init_device
def always_executed_hook(self):
# PROTECTED REGION ID(SKAPowerSupply.always_executed_hook) ENABLED START #
t = 'Voltage = %s, Current = %s' % (self.Voltage, self.Current)
self.set_status(t)
print(t)
# PROTECTED REGION END # // SKAPowerSupply.always_executed_hook
def delete_device(self):
# PROTECTED REGION ID(SKAPowerSupply.delete_device) ENABLED START #
pass
# PROTECTED REGION END # // SKAPowerSupply.delete_device
# ------------------
# Attributes methods
# ------------------
def read_Current(self):
# PROTECTED REGION ID(SKAPowerSupply.Current_read) ENABLED START #
return self.Current
# PROTECTED REGION END # // SKAPowerSupply.Current_read
def read_Voltage(self):
# PROTECTED REGION ID(SKAPowerSupply.Voltage_read) ENABLED START #
return self.Voltage
# PROTECTED REGION END # // SKAPowerSupply.Voltage_read
def write_Voltage(self, value):
# PROTECTED REGION ID(SKAPowerSupply.Voltage_write) ENABLED START #
self.Voltage = value
self.Current = self.Voltage / self.LoadImpedance
# PROTECTED REGION END # // SKAPowerSupply.Voltage_write
# --------
# Commands
# --------
@command(
)
@DebugIt()
def On(self):
# PROTECTED REGION ID(SKAPowerSupply.On) ENABLED START #
self.set_state(DevState.ON)
# PROTECTED REGION END # // SKAPowerSupply.On
@command(
)
@DebugIt()
def Off(self):
# PROTECTED REGION ID(SKAPowerSupply.Off) ENABLED START #
self.set_state(DevState.OFF)
# PROTECTED REGION END # // SKAPowerSupply.Off
# ----------
# Run server
# ----------
def main(args=None, **kwargs):
# PROTECTED REGION ID(SKAPowerSupply.main) ENABLED START #
return run((SKAPowerSupply,), args=args, **kwargs)
# PROTECTED REGION END # // SKAPowerSupply.main
if __name__ == '__main__':
main()
<?xml version="1.0" encoding="ASCII"?>
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://www.esrf.fr/tango/pogo/PogoDsl">
<classes name="SKAPowerSupply" pogoRevision="9.6">
<description description="" title="blah" sourcePath="/hosthome/foo" language="PythonHL" filestogenerate="XMI file,Code files,Protected Regions" license="GPL" copyright="" hasMandatoryProperty="true" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="SKABaseDevice" sourcePath="../lmc-base-classes/skabase/SKABaseDevice"/>
<identification contact="at astron.nl - jurges" author="jurges" emailDomain="astron.nl" classFamily="PowerSupply" siteSpecific="" platform="Unix Like" bus="Not Applicable" manufacturer="none" reference=""/>
</description>
<deviceProperties name="SkaLevel" description="Indication of importance of the device in the SKA hierarchy &#xA;to support drill-down navigation: 1..6, with 1 highest.&#xA;Default is 4, making provision for &#xA;EltMaster, EltAlarms, EltTelState = 1&#xA;SubEltMaster = 2&#xA;Subarray, Capability = 2/3&#xA;Others = 4 (or 5 or 6)">
<type xsi:type="pogoDsl:ShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<DefaultPropValue>4</DefaultPropValue>
</deviceProperties>
<deviceProperties name="GroupDefinitions" description="Each string in the list is a JSON serialised dict defining the ``group_name``,&#xA;``devices`` and ``subgroups`` in the group. A TANGO Group object is created&#xA;for each item in the list, according to the hierarchy defined. This provides&#xA;easy access to the managed devices in bulk, or individually.&#xA;&#xA;The general format of the list is as follows, with optional ``devices`` and&#xA;``subgroups`` keys:&#xA; [ {``group_name``: ``&lt;name>``,&#xA; ``devices``: [``&lt;dev name>``, ...]},&#xA; {``group_name``: ``&lt;name>``,&#xA; ``devices``: [``&lt;dev name>``, ``&lt;dev name>``, ...],&#xA; ``subgroups`` : [{&lt;nested group>},&#xA; {&lt;nested group>}, ...]},&#xA; ...&#xA; ]&#xA;&#xA;For example, a hierarchy of racks, servers and switches:&#xA; [ {``group_name``: ``servers``,&#xA; ``devices``: [``elt/server/1``, ``elt/server/2``,&#xA; ``elt/server/3``, ``elt/server/4``]},&#xA; {``group_name``: ``switches``,&#xA; ``devices``: [``elt/switch/A``, ``elt/switch/B``]},&#xA; {``group_name``: ``pdus``,&#xA; ``devices``: [``elt/pdu/rackA``, ``elt/pdu/rackB``]},&#xA; {``group_name``: ``racks``,&#xA; ``subgroups``: [&#xA; {``group_name``: ``rackA``,&#xA; ``devices``: [``elt/server/1``, ``elt/server/2``,&#xA; ``elt/switch/A``, ``elt/pdu/rackA``]},&#xA; {``group_name``: ``rackB``,&#xA; ``devices``: [``elt/server/3``, ``elt/server/4``,&#xA; ``elt/switch/B``, ``elt/pdu/rackB``],&#xA; ``subgroups``: []}&#xA; ]} ]">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="true" concrete="true"/>
</deviceProperties>
<deviceProperties name="LoggingLevelDefault" description="Default logging level at device startup.&#xA;(0=OFF, 1=FATAL, 2=ERROR, 3=WARNING, 4=INFO, 5=DEBUG)">
<type xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="true" concrete="true"/>
<DefaultPropValue>4</DefaultPropValue>
</deviceProperties>
<deviceProperties name="LoggingTargetsDefault" description="Default logging targets at device startup.&#xA;Each item has the format: target_type::target_name.&#xA;To log to stdout, use 'console::cout'.&#xA;To log to syslog, use 'syslog::&lt;address>',&#xA; where &lt;address> is a file path,&#xA; for example 'syslog::/var/run/rsyslog/dev/log'.&#xA;To log to a file, use 'file::&lt;path>',&#xA; where &lt;path> is a file path,&#xA; for example 'file::/tmp/my_dev.log'.">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="true" concrete="true"/>
</deviceProperties>
<deviceProperties name="HWUpdateTime" mandatory="true" description="">
<type xsi:type="pogoDsl:DoubleType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="LoadImpedance" mandatory="true" description="">
<type xsi:type="pogoDsl:DoubleType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device state">
<type xsi:type="pogoDsl:StateType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device status">
<type xsi:type="pogoDsl:ConstStringType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="GetVersionInfo" description="Array of version strings of all entities modelled by this device. &#xA;(One level down only)&#xA;Each string in the array lists the version info for one entity&#xA;managed by this device. &#xA;The first entry is version info for this TANGO Device itself.&#xA;The entities may be TANGO devices, or hardware LRUs or &#xA;anything else this devices manages/models.&#xA;The intention with this command is that it can provide more &#xA;detailed information than can be captured in the versionId &#xA;and buildState attributes, if necessary.&#xA;In the minimal case the GetVersionInfo will contain only the &#xA;versionId and buildState attributes of the next lower level&#xA;entities." execMethod="get_version_info" displayLevel="OPERATOR" polledPeriod="0">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="[ name: EltTelState ]">
<type xsi:type="pogoDsl:StringArrayType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
</commands>
<commands name="Reset" description="Reset device to its default state" execMethod="reset" displayLevel="OPERATOR" polledPeriod="0">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
</commands>
<commands name="On" description="" execMethod="on" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<commands name="Off" description="" execMethod="off" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<attributes name="buildState" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="60000" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Build state of this device" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="versionId" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="60000" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Version Id of this device" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="loggingLevel" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Current logging level for this device - initialises to LoggingLevelDefault on startup" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="healthState" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The health state reported for this device. It interprets the current device condition &#xA;and condition of all managed devices to set this. Most possibly an aggregate attribute." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="adminMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The admin mode reported for this device. It may interpret the current device condition &#xA;and condition of all managed devices to set this. Most possibly an aggregate attribute." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="controlMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The control mode of the device. REMOTE, LOCAL&#xA;TANGO Device accepts only from a &#x2018;local&#x2019; client and ignores commands and queries received from TM&#xA;or any other &#x2018;remote&#x2019; clients. The Local clients has to release LOCAL control before REMOTE clients&#xA;can take control again." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="simulationMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Reports the simulation mode of the device. Some devices may implement both modes,&#xA;while others will have simulators that set simulationMode to True while the real&#xA;devices always set simulationMode to False." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="testMode" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" memorized="true" allocReadMember="true">
<dataType xsi:type="pogoDsl:EnumType"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="The test mode of the device. &#xA;Either no test mode or an indication of the test mode." label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Current" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Voltage" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="1000" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="loggingTargets" attType="Spectrum" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="3" maxY="" allocReadMember="true">
<dataType xsi:type="pogoDsl:StringType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<status abstract="false" inherited="true" concrete="true"/>
<properties description="Logging targets for this device, excluding ska_logging defaults - &#xA;initialises to LoggingTargetsDefault on startup" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<states name="ON" description="This state could have been called OK or OPERATIONAL. It means that the device is in its operational state. (E.g. the power supply is giving its nominal current, th motor is ON and ready to move, the instrument is operating). This state is modified by the Attribute alarm checking of the DeviceImpl:dev_state method. i.e. if the State is ON and one attribute has its quality factor to ATTR_WARNING or ATTR_ALARM, then the State is modified to ALARM.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="OFF" description="The device is in normal condition but is not active. E.g. the power supply main circuit breaker is open; the RF transmitter has no power etc...">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="FAULT" description="The device has a major failure that prevents it to work. For instance, A power supply has stopped due to over temperature A motor cannot move because it has fault conditions. Usually we cannot get out from this state without an intervention on the hardware or a reset command.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="INIT" description="This state is reserved to the starting phase of the device server. It means that the software is not fully operational and that the user must wait">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="ALARM" description="ALARM - The device is operating but&#xA;at least one of the attributes is out of range. It can be linked to alarm conditions set by attribute properties or a specific case. (E.g. temperature alarm on a stepper motor, end switch pressed on a stepper motor, up water level in a tank, etc....). In alarm, usually the device does its job, but the operator has to perform an action to avoid a bigger problem that may switch the state to FAULT.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="UNKNOWN" description="The device cannot retrieve its state. It is the case when there is a communication problem to the hardware (network cut, broken cable etc...) It could also represent an incoherent situation">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="STANDBY" description="Equates to LOW-POWER mode. This is the initial transition from INIT if the device supports a low-power mode. The device is not fully active but is ready to operate.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="DISABLE" description="The device cannot be switched ON for an external reason. E.g. the power supply has its door open, the safety conditions are not satisfactory to allow the device to operate.">
<status abstract="false" inherited="true" concrete="true"/>
</states>
<states name="RUNNING" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<preferences docHome="./doc_html" makefileHome="/usr/local/share/pogo/preferences"/>
</classes>
</pogoDsl:PogoSystem>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment