##// END OF EJS Templates
merge voltage ftp
José Chávez -
r1037:2fe9a199ea60
parent child
Show More
@@ -180,17 +180,10 class VoltageReader(JRODataReader, ProcessingUnit):
180
180
181 def getBlockDimension(self):
181 def getBlockDimension(self):
182 """
182 """
183 <<<<<<< HEAD
184 Obtiene la cantidad de puntos a leer por cada bloque de datos
183 Obtiene la cantidad de puntos a leer por cada bloque de datos
185
184
186 Affected:
185 Affected:
187 self.blocksize
186 self.blocksize
188 =======
189 Obtiene la cantidad de puntos a leer por cada bloque de datos
190
191 Affected:
192 self.blocksize
193 >>>>>>> online_data_hour
194
187
195 Return:
188 Return:
196 None
189 None
@@ -202,28 +195,6 class VoltageReader(JRODataReader, ProcessingUnit):
202
195
203 def readBlock(self):
196 def readBlock(self):
204 """
197 """
205 <<<<<<< HEAD
206 readBlock lee el bloque de datos desde la posicion actual del puntero del archivo
207 (self.fp) y actualiza todos los parametros relacionados al bloque de datos
208 (metadata + data). La data leida es almacenada en el buffer y el contador del buffer
209 es seteado a 0
210
211 Inputs:
212 None
213
214 Return:
215 None
216
217 Affected:
218 self.profileIndex
219 self.datablock
220 self.flagIsNewFile
221 self.flagIsNewBlock
222 self.nTotalBlocks
223
224 Exceptions:
225 Si un bloque leido no es un bloque valido
226 =======
227 readBlock lee el bloque de datos desde la posicion actual del puntero del archivo
198 readBlock lee el bloque de datos desde la posicion actual del puntero del archivo
228 (self.fp) y actualiza todos los parametros relacionados al bloque de datos
199 (self.fp) y actualiza todos los parametros relacionados al bloque de datos
229 (metadata + data). La data leida es almacenada en el buffer y el contador del buffer
200 (metadata + data). La data leida es almacenada en el buffer y el contador del buffer
@@ -244,7 +215,6 class VoltageReader(JRODataReader, ProcessingUnit):
244
215
245 Exceptions:
216 Exceptions:
246 Si un bloque leido no es un bloque valido
217 Si un bloque leido no es un bloque valido
247 >>>>>>> online_data_hour
248 """
218 """
249
219
250 # if self.server is not None:
220 # if self.server is not None:
@@ -438,41 +408,6 class VoltageReader(JRODataReader, ProcessingUnit):
438
408
439 def getData(self):
409 def getData(self):
440 """
410 """
441 <<<<<<< HEAD
442 getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut
443 del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos
444 en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando
445 "readNextBlock"
446
447 Ademas incrementa el contador del buffer "self.profileIndex" en 1.
448
449 Return:
450
451 Si el flag self.getByBlock ha sido seteado el bloque completo es copiado a self.dataOut y el self.profileIndex
452 es igual al total de perfiles leidos desde el archivo.
453
454 Si self.getByBlock == False:
455
456 self.dataOut.data = buffer[:, thisProfile, :]
457
458 shape = [nChannels, nHeis]
459
460 Si self.getByBlock == True:
461
462 self.dataOut.data = buffer[:, :, :]
463
464 shape = [nChannels, nProfiles, nHeis]
465
466 Variables afectadas:
467 self.dataOut
468 self.profileIndex
469
470 Affected:
471 self.dataOut
472 self.profileIndex
473 self.flagDiscontinuousBlock
474 self.flagIsNewBlock
475 =======
476 getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut
411 getData obtiene una unidad de datos del buffer de lectura, un perfil, y la copia al objeto self.dataOut
477 del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos
412 del tipo "Voltage" con todos los parametros asociados a este (metadata). cuando no hay datos
478 en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando
413 en el buffer de lectura es necesario hacer una nueva lectura de los bloques de datos usando
@@ -506,7 +441,6 class VoltageReader(JRODataReader, ProcessingUnit):
506 self.profileIndex
441 self.profileIndex
507 self.flagDiscontinuousBlock
442 self.flagDiscontinuousBlock
508 self.flagIsNewBlock
443 self.flagIsNewBlock
509 >>>>>>> online_data_hour
510 """
444 """
511 if self.flagNoMoreFiles:
445 if self.flagNoMoreFiles:
512 self.dataOut.flagNoData = True
446 self.dataOut.flagNoData = True
@@ -528,36 +462,16 class VoltageReader(JRODataReader, ProcessingUnit):
528 if not self.getByBlock:
462 if not self.getByBlock:
529
463
530 """
464 """
531 <<<<<<< HEAD
532 Return profile by profile
465 Return profile by profile
533
466
534 If nTxs > 1 then one profile is divided by nTxs and number of total
467 If nTxs > 1 then one profile is divided by nTxs and number of total
535 blocks is increased by nTxs (nProfiles *= nTxs)
468 blocks is increased by nTxs (nProfiles *= nTxs)
536 =======
537 Return profile by profile
538
539 If nTxs > 1 then one profile is divided by nTxs and number of total
540 blocks is increased by nTxs (nProfiles *= nTxs)
541 >>>>>>> online_data_hour
542 """
469 """
543 self.dataOut.flagDataAsBlock = False
470 self.dataOut.flagDataAsBlock = False
544 self.dataOut.data = self.datablock[:,self.profileIndex,:]
471 self.dataOut.data = self.datablock[:,self.profileIndex,:]
545 self.dataOut.profileIndex = self.profileIndex
472 self.dataOut.profileIndex = self.profileIndex
546
473
547 self.profileIndex += 1
474 self.profileIndex += 1
548 <<<<<<< HEAD
549
550 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
551 # """
552 # Return all block
553 # """
554 # self.dataOut.flagDataAsBlock = True
555 # self.dataOut.data = self.datablock
556 # self.dataOut.profileIndex = self.dataOut.nProfiles - 1
557 #
558 # self.profileIndex = self.dataOut.nProfiles
559
560 =======
561
475
562 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
476 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
563 # """
477 # """
@@ -569,7 +483,6 class VoltageReader(JRODataReader, ProcessingUnit):
569 #
483 #
570 # self.profileIndex = self.dataOut.nProfiles
484 # self.profileIndex = self.dataOut.nProfiles
571
485
572 >>>>>>> online_data_hour
573 else:
486 else:
574 """
487 """
575 Return a block
488 Return a block
@@ -166,21 +166,12 class Remote(Thread):
166 return 0
166 return 0
167
167
168 self.mutex.acquire()
168 self.mutex.acquire()
169 <<<<<<< HEAD
170 # init = time.time()
169 # init = time.time()
171 #
170 #
172 # while(self.bussy):
171 # while(self.bussy):
173 # sleep(0.1)
172 # sleep(0.1)
174 # if time.time() - init > 2*self.period:
173 # if time.time() - init > 2*self.period:
175 # return 0
174 # return 0
176 =======
177 # init = time.time()
178 #
179 # while(self.bussy):
180 # sleep(0.1)
181 # if time.time() - init > 2*self.period:
182 # return 0
183 >>>>>>> online_data_hour
184
175
185 self.fileList = fileList
176 self.fileList = fileList
186 self.mutex.release()
177 self.mutex.release()
@@ -205,11 +196,7 class Remote(Thread):
205 if self.stopFlag:
196 if self.stopFlag:
206 break
197 break
207
198
208 <<<<<<< HEAD
209 # self.bussy = True
210 =======
211 # self.bussy = True
199 # self.bussy = True
212 >>>>>>> online_data_hour
213 self.mutex.acquire()
200 self.mutex.acquire()
214
201
215 print "[Remote Server] Opening %s" %self.__server
202 print "[Remote Server] Opening %s" %self.__server
General Comments 0
You need to be logged in to leave comments. Login now