From afbb411659bc551246c826570859e5a56c5d44cf Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Wed, 20 Sep 2017 10:14:41 +0200 Subject: [PATCH] Closedown --- config/devices.properties | 1 + script/local.py | 2 ++ script/test/TestInvalid.py | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/devices.properties b/config/devices.properties index f4aa657..29517d5 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -18,3 +18,4 @@ adc_xh1=ch.psi.pshell.epics.ChannelInteger|SARFE10-PBPG050:HAMP-014-x-h1-DATA-SU adc_yh2=ch.psi.pshell.epics.ChannelInteger|SARFE10-PBPG050:HAMP-011-y-h2-DATA-SUM|||true m2rx=ch.psi.pshell.epics.Motor|SAROP21-OOMV096:W_RX|||true #camtool=ch.psi.pshell.bs.Camtool|localhost:10000||| +#invalid=ch.psi.pshell.epics.ChannelDouble|SARUN15-UIND030:INVALID-PV -1 true Nullify|||true diff --git a/script/local.py b/script/local.py index cbadca9..15daea0 100644 --- a/script/local.py +++ b/script/local.py @@ -2,6 +2,8 @@ # Deployment specific global definitions - executed after startup.py ################################################################################################### +import ch.psi.pshell.epics.InvalidValueAction as InvalidValueAction + #Device pool customization pbpg_mx.setTrustedWrite(False) pbpg_my.setTrustedWrite(False) diff --git a/script/test/TestInvalid.py b/script/test/TestInvalid.py index 4487a0e..d2fd723 100644 --- a/script/test/TestInvalid.py +++ b/script/test/TestInvalid.py @@ -1,9 +1,11 @@ import ch.psi.pshell.epics.ChannelDouble as ChannelDouble -channel = ChannelDouble("test_inv", "SARUN15-UIND030:INVALID-PV", -1, True, InvalidValueAction.Nullify) -avg = create_averager(channel, 5, interval =2.0, name = "avg") +channel = ChannelDouble("test_inv", "SARUN15-UIND030:INVALID-PV", -1, True, InvalidValueAction.Nullify) + +avg = create_averager(channel, 5, interval = -1, name = "avg") +avg.monitored = True channel.monitored = True add_device(channel, True) add_device(avg, True)