Commit d22fd47c authored by Petr Cermak's avatar Petr Cermak
Browse files

Merge branch 'master' of gitlab.mff.cuni.cz:mgml/entangle

parents 1a43a2aa e0fa2678
......@@ -50,29 +50,24 @@ properties([
// ********************************/
this.testenv = null
this.verifyresult = [:]
// ************* Function defs ***/
def publishGerrit(name, value) {
gerritverificationpublisher([
verifyStatusValue: value,
verifyStatusName: name,
verifyStatusCategory: 'test',
verifyStatusReporter: 'jenkins',
verifyStatusRerun: '@recheck'
])
def map = [(-1) :"FAILED", 0:"RUNNING", 1:"SUCCESSFUL"]
gerritPostCheck(["jenkins:${name}":map[value]])
}
def runBaseClassGen() {
def testenv=docker.image('docker.ictrl.frm2.tum.de:5443/jenkins/entangle-jenkins:bionic')
verifyresult.put('baseclassdoc', 0)
publishGerrit('baseclassdoc', verifyresult['baseclassdoc'])
def status = "OK"
try {
testenv.inside() {
this.testenv.inside() {
sh '''\
#!/bin/bash
. /home/jenkins/py3entangle/bin/activate
......@@ -100,18 +95,18 @@ fi
def runChecks() {
def status = "OK"
def testenv=docker.image('docker.ictrl.frm2.tum.de:5443/jenkins/entangle-jenkins:bionic')
verifyresult.put('pylint', 0)
publishGerrit('pylint', verifyresult['pylint'])
try{
withCredentials([string(credentialsId: 'GERRITHTTP', variable: 'GERRITHTTP')]) {
testenv.inside() {
this.testenv.inside() {
sh '''\
#!/bin/bash
. /home/jenkins/py3entangle/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements.txt &> pip_checks.txt
pip install -r requirements-dev.txt &>> pip_checks.txt
# run pylint
rm -f pylint_*.txt
......@@ -166,27 +161,30 @@ addopts = --junit-xml=pytest-${pyver}.xml
def status = "OK"
verifyresult.put(pyver, 0)
def mysqltango=docker.image('tangocs/mysql')
def tangodb=docker.image('tangocs/tango-cs:9')
def testenv=docker.image("docker.ictrl.frm2.tum.de:5443/jenkins/entangle-jenkins:$dtag")
publishGerrit('pytest-'+pyver, verifyresult[pyver])
// no need to always pull mysql and tango
def mysqltango=docker.image('docker.ictrl.frm2.tum.de:5443/docker_proxy/tangocs/mysql')
def tangodb=docker.image('docker.ictrl.frm2.tum.de:5443/docker_proxy/tangocs/tango-cs:9')
try {
timeout(5) {
withEnv(["VENV=$venv"]) {
mysqltango.withRun('-e MYSQL_ROOT_PASSWORD=root') { mysql ->
tangodb.withRun("-e ORB_PORT=10000 -e TANGO_HOST=127.0.0.1:10000 -e MYSQL_HOST=db:3306 -e MYSQL_USER=tango -e MYSQL_PASSWORD=tango -e MYSQL_DATABASE=tango --link ${mysql.id}:db "){ tangocs ->
testenv.inside("--link ${tangocs.id}:tango -e TANGO_HOST=tango:10000") {
this.testenv.inside("--link ${tangocs.id}:tango -e TANGO_HOST=tango:10000") {
sh """\
#!/bin/bash
. /home/jenkins/${VENV}/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements.txt &> pip-test_${pyver}.txt
pip install -r requirements-dev.txt &>> pip-test_${pyver}.txt
/home/jenkins/${VENV}/bin/wait-for-tangodb.py
pytest -c pytest${pyver}.ini -v test
"""
"""
}
}
......@@ -221,16 +219,16 @@ publishHTML([allowMissing: true,
} // pytest
def runDocTest() {
def testenv=docker.image('docker.ictrl.frm2.tum.de:5443/jenkins/entangle-jenkins:bionic')
verifyresult.put('doc', 0)
publishGerrit('doc', verifyresult['doc'])
def status = "OK"
try {
testenv.inside() {
this.testenv.inside() {
sh '''\
#!/bin/bash
. /home/jenkins/py3entangle/bin/activate
touch doc/warnings.txt
pip install -r requirements.txt
pip install -r requirements.txt &> pip-doctest.txt
# check documentation coverage
if ! make covcheck; then
echo "Build step failed: Found undocumented or unimplemented classes"
......@@ -280,6 +278,8 @@ fi
node('dockerhost') {
stage(name: 'checkout code: ' + GERRIT_PROJECT) {
deleteDir()
this.testenv=docker.image('docker.ictrl.frm2.tum.de:5443/jenkins/entangle-jenkins:bionic')
this.testenv.pull()
checkout(changelog: true, poll: false,
scm: [$class: 'GitSCM',
branches: [[name: "$GERRIT_BRANCH"]],
......
......@@ -4,7 +4,8 @@ SHELL = /bin/bash
T = test
PYTHON = python
TANGO_HOST = localhost:10000
TANGO_HOST ?= localhost:10000
JENKINS_HOST ?= jenkins.admin.frm2.tum.de
test:
TANGO_HOST=$(TANGO_HOST) $(PYTHON) -m pytest -v $(O) $(T)
......@@ -61,6 +62,6 @@ release-minor:
MODE="minor" $(MAKE) release
release:
ssh jenkinsng.admin.frm2 -p 29417 build -v -s -p GERRIT_PROJECT=$(shell git config --get remote.origin.url | rev | cut -d '/' -f -3 | rev) -p ARCH=all -p MODE=$(MODE) ReleasePipeline
ssh $(JENKINS_HOST) -p 29417 build -v -s -p GERRIT_PROJECT=$(shell git config --get remote.origin.url | rev | cut -d '/' -f -3 | rev) -p ARCH=all -p MODE=$(MODE) ReleasePipeline
.PHONY: release release-patch release-minor
......@@ -35,6 +35,7 @@ A full list:
* snimpy -- snmp reader device
* adafruit-circuitpython-ads1x15 -- ads1x15_aio devices
* LabJackPython -- labjack_usb devices
* zapf - access to PILS PLCs
* opcua -- opc_ua devices
......
tango-entangle (5.15.4) focal; urgency=medium
* Keysight/Funcgen: extend list of supported hardware
-- Jens Krüger <jenkins@jenkins02.admin.frm2.tum.de> Wed, 11 Aug 2021 10:38:23 +0200
tango-entangle (5.15.3) focal; urgency=medium
* Termotek: Fix array comparison
-- Jens Krüger <jenkins@jenkins01.admin.frm2.tum.de> Mon, 09 Aug 2021 10:47:53 +0200
tango-entangle (5.15.2) focal; urgency=medium
[ Georg Brandl ]
* fixup some unused variables
* add live-histogramming for DNS detector
[ Jens Krüger ]
* CAEN/HV: Fix comparision between string and int
-- Georg Brandl <jenkins@jenkins01.admin.frm2.tum.de> Wed, 04 Aug 2021 16:21:31 +0200
tango-entangle (5.15.1) focal; urgency=medium
* debian: fix postinst script not executing systemd actions
-- Georg Brandl <jenkins@jenkins01.admin.frm2.tum.de> Tue, 06 Jul 2021 15:46:47 +0200
tango-entangle (5.15.0) focal; urgency=medium
[ Jens Krüger ]
* Device: Add Dallas temperature sensor read out
[ Georg Brandl ]
* all: isort
* sis_dns: fix time units for interval/delay
-- Jens Krüger <jenkins@jenkins01.admin.frm2.tum.de> Tue, 06 Jul 2021 09:09:38 +0200
tango-entangle (5.14.1) focal; urgency=medium
[ Enrico Faulhaber ]
* pils_zapf_plc: adapt to api change from
[ Georg Brandl ]
* pils_zapf: further adapt to status change
* bump zapf requirement
-- Enrico Faulhaber <jenkins@jenkins02.admin.frm2.tum.de> Fri, 11 Jun 2021 16:43:29 +0200
tango-entangle (5.14.0) focal; urgency=medium
[ Björn Pedersen ]
* Always pull the test image
[ Georg Brandl ]
* debian: require zapf while building (for manpage)
* systemd: hide tracebacks by default
-- Björn Pedersen <jenkins@jenkins01.admin.frm2.tum.de> Tue, 08 Jun 2021 09:02:35 +0200
tango-entangle (5.13.1) focal; urgency=medium
* TTi: Fix range setting for the PL303P devices
-- Jens Krüger <jenkins@jenkins01.admin.frm2.tum.de> Sat, 29 May 2021 14:59:05 +0200
tango-entangle (5.13.0) focal; urgency=medium
[ Björn Pedersen ]
* Jenkinsfile: switch to checks usage
[ Christian Felder ]
* fastcomtec: Work around FreeHeap 0xc0000374 exception during memory allocation
[ Jens Krüger ]
* TTiPS: Add additional model
[ Björn Pedersen ]
* jenkins: redirect pip output to files
[ Georg Brandl ]
* beckhoff_ads: implement direct ADS communication via zapf
* pils_zapf: add support for PILS PLCs via zapf library
[ Enrico Faulhaber ]
* PILS_plc: fix name clash for RefPos + minor fixes
-- Björn Pedersen <jenkins@jenkins01.admin.frm2.tum.de> Thu, 27 May 2021 16:10:16 +0200
tango-entangle (5.12.0) focal; urgency=medium
* UNRELEASED
-- Georg Brandl <jenkins@jenkins02.admin.frm2.tum.de> Wed, 21 Apr 2021 19:38:04 +0200
tango-entangle (5.11.2) focal; urgency=medium
[ Georg Brandl ]
* add file_in_dir device
* covcheck: output number of classes
[ Enrico Faulhaber ]
* mlz/toftof: adapt to changes in C-layer
[ Georg Brandl ]
* metaljet: fix base class
* defs: introduce "mapping" to digital types
[ Jens Krüger ]
* Eurotherm: Fix typo
-- Georg Brandl <jenkins@jenkins01.admin.frm2.tum.de> Wed, 21 Apr 2021 19:00:20 +0200
tango-entangle (5.11.1) focal; urgency=medium
[ Georg Brandl ]
* fzj/s7_io: reset VALID bit after successful request
* Makefile: improve target host handling
[ Enrico Faulhaber ]
* Make loggers more robust against non utf-8 data
[ Björn Pedersen ]
* redis_listener: Fix event not being processed on py3
[ Georg Brandl ]
* atik_ccd: bytes/str fix
-- Georg Brandl <jenkins@jenkins02.admin.frm2.tum.de> Wed, 07 Apr 2021 14:43:00 +0200
tango-entangle (5.11.0) focal; urgency=medium
* special device: interlock of heaters with sensors for ccm8v
-- Georg Brandl <jenkins@jenkins01.admin.frm2.tum.de> Thu, 25 Mar 2021 16:15:32 +0100
tango-entangle (5.10.0) focal; urgency=medium
[ Georg Brandl ]
* copyright header update
* newport/esp: style fixup
* sequencer: restructure and amend docs
* version: translate to valid PEP 440 version
* sequencer: accept stop request during long step delay sleeps
[ Alexander Steffens ]
* hexapod: adust external axes by writing the actual position to the hardware
* hexapod: shorten/refactor function and variable names
* hexapod: reorder methods
* hexapod: initialise variables in init
[ Georg Brandl ]
* cryomech_compressor: py3 fix
* fzj s7_io: update docs, implement Stop
* fzj: add sis_dns device
* fix copyright year
[ Alexander Steffens ]
* smaract_motor: add device to support SmarAct MCS2 motors
[ Enrico Faulhaber ]
* improve PILS implementation
[ Jens Krüger ]
* Eurotherm: Add the attribute 'sensortype'
* Phytron: Extend maximum current settings
[ Georg Brandl ]
* consort_analyzer: new device
* tektronix_oscilloscope: support TBS2104B
[ Jens Krüger ]
* phyMotion: Fix a problem with float return value
[ Georg Brandl ]
* tc/ag1017: bytes/string fixup
-- Georg Brandl <jenkins@jenkins01.admin.frm2.tum.de> Tue, 23 Mar 2021 13:48:43 +0100
tango-entangle (5.9.10) bionic; urgency=medium
[ Alexander Steffens ]
......
......@@ -14,7 +14,8 @@ Build-Depends: debhelper (>= 11~),
python3-sphinx,
python3-cffi,
python3-serial,
python3-usb
python3-usb,
python3-zapf (>= 0.3)
Standards-Version: 4.1.4
Package: tango-entangle
......@@ -30,7 +31,8 @@ Depends: ${misc:Depends},
python3-cffi,
python3-serial,
python3-usb,
python3-urwid
python3-urwid,
python3-zapf (>= 0.3)
Description: Convenient framework to write device servers
Contains a collection of base interfaces for all kinds of hardware,
which allows writing device drivers quickly, a library of helper APIs
......
#!/bin/sh
set -e
journalctl --update-catalog
#DEBHELPER#
exit 0
<?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="DigitalInput" pogoRevision="9.2">
<classes name="DigitalInput" pogoRevision="9.4">
<description description="The DigitalInput handles all devices reading a bitfield." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="true" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="MLZDevice" sourcePath="defs"/>
......@@ -10,6 +10,11 @@
<type xsi:type="pogoDsl:ShortType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="mapping" description="If given, a list of strings giving a label to values that can be read. The strings must be in the form &quot;value: label&quot;. Example: [&quot;0: off&quot;, &quot;1: on&quot;].">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>[]</DefaultPropValue>
</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"/>
......@@ -64,8 +69,8 @@
<argin description="">
<type xsi:type="pogoDsl:StringArrayType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
<argout description="True if the properties were saved persistently, False if they were only set for the current session.">
<type xsi:type="pogoDsl:BooleanType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
<excludedStates>MOVING</excludedStates>
......
<?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="DigitalOutput" pogoRevision="9.1">
<classes name="DigitalOutput" pogoRevision="9.4">
<description description="The DigitalOutput handles all devices that can set and read a digital value corresponding to a bitfield." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="true" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="MLZDevice" sourcePath="defs"/>
......@@ -10,6 +10,11 @@
<type xsi:type="pogoDsl:ShortType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="mapping" description="If given, a list of strings giving a label to values that can be read and written. The strings must be in the form &quot;value: label[: flag]&quot;, where if flag is &quot;ro&quot;, the value is not accepted when writing (e.g. useful for intermediate and exceptional states). Example: [&quot;0: off&quot;, &quot;1: on&quot;, &quot;2: busy: ro&quot;].">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>[]</DefaultPropValue>
</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"/>
......@@ -64,8 +69,8 @@
<argin description="">
<type xsi:type="pogoDsl:StringArrayType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
<argout description="True if the properties were saved persistently, False if they were only set for the current session.">
<type xsi:type="pogoDsl:BooleanType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
<excludedStates>MOVING</excludedStates>
......
<?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="DiscreteInput" pogoRevision="9.1">
<description description="The DiscreteInput handles all devices delivering a discrete (integral) value." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="false" hasConcreteProperty="false" hasAbstractCommand="false" hasAbstractAttribute="false">
<classes name="DiscreteInput" pogoRevision="9.4">
<description description="The DiscreteInput handles all devices delivering a discrete (integral) value." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="false" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="MLZDevice" sourcePath="defs"/>
<identification contact="at frm2.tum.de> - Alexander Lenz &lt;alexander.lenz" author="Alexander Lenz &lt;alexander.lenz" emailDomain="frm2.tum.de>" classFamily="AbstractClasses" siteSpecific="" platform="All Platforms" bus="Not Applicable" manufacturer="none" reference=""/>
</description>
<deviceProperties name="mapping" description="If given, a list of strings giving a label to values that can be read. The strings must be in the form &quot;value: label&quot;. Example: [&quot;0: off&quot;, &quot;1: on&quot;].">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>[]</DefaultPropValue>
</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"/>
......@@ -60,8 +65,8 @@
<argin description="">
<type xsi:type="pogoDsl:StringArrayType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
<argout description="True if the properties were saved persistently, False if they were only set for the current session.">
<type xsi:type="pogoDsl:BooleanType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
<excludedStates>MOVING</excludedStates>
......
<?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="DiscreteOutput" pogoRevision="9.1">
<description description="The DiscreteOutput handles all devices that can set and read a discrete (integral) value." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="true" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<classes name="DiscreteOutput" pogoRevision="9.4">
<description description="The DiscreteOutput handles all devices that can set and read a discrete (integral) value." title="" sourcePath="defs" language="Python" filestogenerate="XMI file,Protected Regions" license="GPL" hasMandatoryProperty="false" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<inheritances classname="MLZDevice" sourcePath="defs"/>
<identification contact="at frm2.tum.de> - Alexander Lenz &lt;alexander.lenz" author="Alexander Lenz &lt;alexander.lenz" emailDomain="frm2.tum.de>" classFamily="AbstractClasses" siteSpecific="" platform="All Platforms" bus="Not Applicable" manufacturer="none" reference=""/>
</description>
<deviceProperties name="absmin" mandatory="true" description="Minimum allowed value for the &quot;value&quot; attribute. This limit should be checked in the server before sending commands to the hardware, except if both absmin and absmax are zero.">
<deviceProperties name="absmin" description="Minimum allowed value for the &quot;value&quot; attribute. This limit should be checked in the server before sending commands to the hardware, except if both absmin and absmax are zero.">
<type xsi:type="pogoDsl:LongType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>0</DefaultPropValue>
</deviceProperties>
<deviceProperties name="absmax" mandatory="true" description="Maximum allowed value for the &quot;value&quot; attribute. This limit should be checked in the server before sending commands to the hardware, except if both absmin and absmax are zero.">
<deviceProperties name="absmax" description="Maximum allowed value for the &quot;value&quot; attribute. This limit should be checked in the server before sending commands to the hardware, except if both absmin and absmax are zero.">
<type xsi:type="pogoDsl:LongType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>0</DefaultPropValue>
</deviceProperties>
<deviceProperties name="mapping" description="If given, a list of strings giving a label to values that can be read and written. The strings must be in the form &quot;value: label[: flag]&quot;, where if flag is &quot;ro&quot;, the value is not accepted when writing (e.g. useful for intermediate and exceptional states). Example: [&quot;0: off&quot;, &quot;1: on&quot;, &quot;2: busy: ro&quot;].&#xA;&#xA;If given, the properties &quot;absmin&quot; and &quot;absmax&quot; are not used, otherwise they are mandatory.">
<type xsi:type="pogoDsl:StringVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>[]</DefaultPropValue>
</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">
......@@ -68,8 +75,8 @@
<argin description="">
<type xsi:type="pogoDsl:StringArrayType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
<argout description="True if the properties were saved persistently, False if they were only set for the current session.">
<type xsi:type="pogoDsl:BooleanType"/>
</argout>
<status abstract="false" inherited="true" concrete="true"/>
<excludedStates>MOVING</excludedStates>
......
......@@ -15,11 +15,12 @@
Class members:
========== ==================================================== ===================================================
========== ==================================================== ======================================================
Commands Attributes Properties
========== ==================================================== ===================================================
========== ==================================================== ======================================================
\ :attr:`~DigitalInput.value` :attr:`~DigitalInput.bits`
========== ==================================================== ===================================================
\ \ :attr:`~DigitalInput.mapping`
========== ==================================================== ======================================================
Inherited members:
......@@ -63,4 +64,12 @@ Properties
Number of bits represented by the bitfield.
.. attribute:: DigitalInput.mapping
:type: DevVarStringArray
:default: ``[]``
If given, a list of strings giving a label to values that can be read. The
strings must be in the form "value: label". Example: ["0: off", "1: on"].
......@@ -16,11 +16,12 @@
Class members:
========== ==================================================== ===================================================
========== ==================================================== ======================================================
Commands Attributes Properties
========== ==================================================== ===================================================
========== ==================================================== ======================================================
\ :attr:`~DigitalOutput.value` :attr:`~DigitalOutput.bits`
========== ==================================================== ===================================================
\ \ :attr:`~DigitalOutput.mapping`
========== ==================================================== ======================================================
Inherited members:
......@@ -65,4 +66,15 @@ Properties
Number of bits represented by the bitfield.
.. attribute:: DigitalOutput.mapping
:type: DevVarStringArray
:default: ``[]``
If given, a list of strings giving a label to values that can be read and
written. The strings must be in the form "value: label[: flag]", where if
flag is "ro", the value is not accepted when writing (e.g. useful for
intermediate and exceptional states). Example: ["0: off", "1: on", "2:
busy: ro"].
......@@ -16,11 +16,11 @@
Class members:
========== ==================================================== ==========
========== ==================================================== ======================================================
Commands Attributes Properties
========== ==================================================== ==========
\ :attr:`~DiscreteInput.value` \
========== ==================================================== ==========
========== ==================================================== ======================================================
\ :attr:`~DiscreteInput.value` :attr:`~DiscreteInput.mapping`
========== ==================================================== ======================================================
Inherited members:
......@@ -54,6 +54,15 @@ Attributes
Properties
----------
.. attribute:: DiscreteInput.mapping
:type: DevVarStringArray
:default: ``[]``
If given, a list of strings giving a label to values that can be read. The
strings must be in the form "value: label". Example: ["0: off", "1: on"].
......@@ -16,12 +16,13 @@
Class members:
=================================================== ==================================================== =====================================================
=================================================== ==================================================== ======================================================
Commands Attributes Properties
=================================================== ==================================================== =====================================================
=================================================== ==================================================== ======================================================
:meth:`~DiscreteOutput.Stop` :attr:`~DiscreteOutput.value` :attr:`~DiscreteOutput.absmax`
\ \ :attr:`~DiscreteOutput.absmin`
=================================================== ==================================================== =====================================================
\ \ :attr:`~DiscreteOutput.mapping`
=================================================== ==================================================== ======================================================
Inherited members:
......@@ -69,7 +70,7 @@ Properties
.. attribute:: DiscreteOutput.absmin
:type: DevLong64
:default: none
:default: ``0``
Minimum allowed value for the "value" attribute. This limit should be
checked in the server before sending commands to the hardware, except if
......@@ -78,10 +79,24 @@ Properties
.. attribute:: DiscreteOutput.absmax
:type: DevLong64
:default: none
:default: ``0``
Maximum allowed value for the "value" attribute. This limit should be
checked in the server before sending commands to the hardware, except if
both absmin and absmax are zero.
.. attribute:: DiscreteOutput.mapping
:type: DevVarStringArray
:default: ``[]``
If given, a list of strings giving a label to values that can be read and
written. The strings must be in the form "value: label[: flag]", where if
flag is "ro", the value is not accepted when writing (e.g. useful for
intermediate and exceptional states). Example: ["0: off", "1: on", "2:
busy: ro"].