import org.zeromq.ZMQ as ZMQ
import ch.psi.bsread.Receiver as Receiver
import ch.psi.bsread.ReceiverConfig as ReceiverConfig
import ch.psi.bsread.configuration.Channel as ReceiverChannel



c1 = ReceiverChannel("min_value", 1)
config = ReceiverConfig("tcp://gfa-lc6-64:9999")
config.setSocketType( ZMQ.SUB);
receiver = Receiver(config)
receiver.connect()

message = None

message = receiver.receive()
for channel in message.getValues().keys():
    print channel , " = " , message.getValues()[channel].getValue().array().tolist()

receiver.close()