Script execution
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user