##// END OF EJS Templates
nada
José Chávez -
r913:66816cdd4da4
parent child
Show More
@@ -335,7 +335,6 class ReceiverData(ProcessingUnit, Process):
335 335 self.sender.send_pyobj(data)
336 336
337 337 def update(self):
338
339 338 t = self.dataOut.ltctime
340 339 self.data['times'].append(t)
341 340 self.data['dataOut'] = self.dataOut
@@ -356,7 +355,7 class ReceiverData(ProcessingUnit, Process):
356 355 self.data[plottype][t] = self.dataOut.getCoherence(phase=True)
357 356 if self.realtime:
358 357 self.data_web[plottype] = roundFloats(decimate(self.data[plottype][t]).tolist())
359 self.data_web['time'] = t
358 self.data_web['timestamp'] = t
360 359 self.data_web['interval'] = self.dataOut.getTimeInterval()
361 360 self.data_web['type'] = plottype
362 361 def run(self):
@@ -368,8 +367,8 class ReceiverData(ProcessingUnit, Process):
368 367 self.receiver.bind(self.address)
369 368 monitor = self.receiver.get_monitor_socket()
370 369 self.sender = self.context.socket(zmq.PUB)
371 if self.realtime:
372 self.sender_web = self.context.socket(zmq.PUB)
370 if self.realtime:
371 self.sender_web = self.context.socket(zmq.PUB)
373 372 self.sender_web.bind(self.plot_address)
374 373 self.sender.bind("ipc:///tmp/zmq.plots")
375 374
@@ -400,9 +399,9 class ReceiverData(ProcessingUnit, Process):
400 399 self.started = True
401 400
402 401 return
403
402
404 403 def sendToWeb(self):
405
404
406 405 if not self.isWebConfig:
407 406 context = zmq.Context()
408 407 sender_web_config = context.socket(zmq.PUB)
@@ -412,11 +411,10 class ReceiverData(ProcessingUnit, Process):
412 411 conf_address = '{}:{}:{}'.format(dum, address, int(port)+1)
413 412 else:
414 413 conf_address = self.plot_address + '.config'
415 sender_web_config.bind(conf_address)
416
414 sender_web_config.bind(conf_address)
415
417 416 for kwargs in self.operationKwargs.values():
418 417 if 'plot' in kwargs:
419 418 sender_web_config.send_string(json.dumps(kwargs))
420 419 print kwargs
421 420 self.isWebConfig = True
422
@@ -61,6 +61,7 def fiber(cursor, skip, q, dt):
61 61 opObj12 = procUnitConfObj2.addOperation(name='PublishData', optype='other')
62 62 opObj12.addParameter(name='zeromq', value=1, format='int')
63 63
64
64 65 # opObj13 = procUnitConfObj3.addOperation(name='PublishData', optype='other')
65 66 # opObj13.addParameter(name='zeromq', value=1, format='int')
66 67 # opObj13.addParameter(name='server', value="juanca", format='str')
General Comments 0
You need to be logged in to leave comments. Login now