def run(self, port, channel, latency, bufferSize): self.mutex = Lock() self.port = port self.outqueuebuffers = {} self.outbuffers = {} self.senders = {} self.channels = None self.senderParent=SenderParent(self.port,self) self.channel = channel self.buffer_size = bufferSize self.timestamp_buffer = [None] * self.buffer_size self.debug = False self.index = 0; self.offset = None self.latency = latency self.setupDone = False self.channel_count = 0 pubnub = Pubnub("pub-c-e655613e-f776-4301-9f29-f71edbcd6559", "sub-c-2eafcf66-c636-11e3-8dcd-02ee2ddab7fe", "sec-c-ZjUwZDgzMTItYzE2Mi00ZGYyLTg2NGMtNmE5N2Q3MGI0MTli", False) while(True): pubnub.subscribe({ 'channel': self.channel, 'callback': self.setData })
def run(self, channel, filename): self.channel = channel self.filename = filename self.debug = False pubnub = Pubnub("pub-c-e655613e-f776-4301-9f29-f71edbcd6559", "sub-c-2eafcf66-c636-11e3-8dcd-02ee2ddab7fe", "sec-c-ZjUwZDgzMTItYzE2Mi00ZGYyLTg2NGMtNmE5N2Q3MGI0MTli", False) while True: pubnub.subscribe({ 'channel': self.channel, 'callback': self.setData })