Script execution

This commit is contained in:
2019-10-10 14:18:58 +02:00
parent c88d22ca56
commit 437ff0d77b

35
script/test/TestZMQ2.py Normal file
View File

@@ -0,0 +1,35 @@
from ch.psi.pshell.bs import Stream
from ch.psi.pshell.bs import Provider
from ch.psi.pshell.bs.ProviderConfig import SocketType;
providers, streams = [], []
for i in range(9000, 9008)
p = Provider("Provider"+str(i),"tcp://SFTEST-CVME-DBPM1:"+str(i), SocketType.PULL)
p.intialize()
providers.add(p)
s = Stream("Stream"+str(i), p)
s.initialize()
streams.add(s)
try:
for s in streams:
s.start(True)
s.waitCacheChange(5000)
print s.getName() + " channels:" + str(s.getIdentifiers())
finally:
try:
for s in streams:
s.close()
except:
pass