import ch.psi.pshell.bs.Scalar as Scalar import ch.psi.pshell.bs.Waveform as Waveform import ch.psi.pshell.bs.Stream as Stream import ch.psi.bsread.configuration.Channel as ReceiverChannel s = Stream("stream", dispatcher) channels = ['Int8Scalar', 'Int16Scalar', 'Int32Scalar', 'Int64Scalar', 'UInt8Scalar', 'UInt16Scalar', 'UInt32Scalar', 'UInt64Scalar', 'Float32Scalar', 'Float64Scalar' #, 'BoolScalar', 'StringScalar', ] for c in channels: add_device(Scalar(c, s, c, 10), True) channels = [ 'Int8Waveform', 'Int16Waveform', 'Int32Waveform', 'Int64Waveform', 'UInt8Waveform', 'UInt16Waveform', 'UInt32Waveform', 'UInt64Waveform', 'Float32Waveform', 'Float64Waveform', 'BoolWaveform'] #for c in channels: # add_device(Waveform(c, s, c, 10), True) #s.setIncomplete("fill_null") try: add_device(s, True) set_device_alias(stream, "PulseID") s.start() #for i in range(10): # s.waitCacheChange(5000) # print s.take().keys(), s.take().values() bscan(s , 10, save=False) for v in s.take().items(): print v[0], v[1] finally: s.close()