36 lines
645 B
Python
36 lines
645 B
Python
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|