import ch.psi.bsread.Receiver as Receiver
import ch.psi.bsread.ReceiverConfig as ReceiverConfig
import ch.psi.bsread.configuration.Channel as ReceiverChannel
\
c1 = ReceiverChannel("Int32Scalar", 10)
config = ReceiverConfig(socket)

receiver = Receiver(config)
receiver.connect()

try:
    while(True):
        message = receiver.receive()
        print "----------------"
        for channel in message.getValues().keys():
            print channel , " = " , message.getValues()[channel].getValue().array().tolist()
        break
finally:  
    receiver.close()
