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