Files
saresb/script/test/test_stream.py
2021-04-28 09:14:56 +02:00

43 lines
1.1 KiB
Python
Executable File

import ch.psi.pshell.bs.DispatcherConfig.Incomplete as Incomplete
channels = ["SAROP11-PBPS117:INTENSITY", \
"SAROP11-PBPS117:XPOS", \
"SAROP11-PBPS117:YPOS", \
"SLG-LSCP2-FNS:CH0:VAL_GET", \
"SINEG01-DBPM340:Q1", \
"SINEG01-DBPM340:X1", \
"SINEG01-DBPM340:Y1", \
"SINEG01-DBPM340:Q2", \
"S20SY02-DBPM150:Q1", \
"SINEG01-DBPM340:X2", \
"SINEG01-DBPM340:Y2", \
"SLG-LSCP2-FNS:CH0:VAL_GET"]
channels = [ \
"SINEG01-DBPM340:X2", \
"S20SY02-DBPM150:Q1", \
"SLG-LSCP2-FNS:CH0:VAL_GET" \
]
#channels = ["SLG-LSCP2-FNS:CH0:VAL_GET"]
dispatcher.config.mappingIncomplete=None
dispatcher.config.mappingIncomplete = Incomplete.fill_null
#dispatcher.config.mappingIncomplete = Incomplete.provide_as_is
#dispatcher.config.mappingIncomplete = Incomplete.drop
s1 = Stream("s1", dispatcher)
s1.initialize()
for c in channels:
s1.addScalar(c,c, 1, 0)
s1.addScalar("SINEG01-DBPM340:Q2","SINEG01-DBPM340:Q2", 1, 0)
add_device(s1, True)
s1.start()
s1.waitCacheChange(5000)
for i in range(20):
print s1.take().keys(), s1.take().values()
s1.waitCacheChange(5000)
#ret = bscan (s1, 20, None, save=False)