示例#1
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._file = None
     self._fname = None
     self._semicolon = sink.semicolon
     self._commentc = sink.commentchar
     self._template = sink.filenametemplate
示例#2
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._datafile = self._headerfile = None
     self._subdir = sink.subdir
     self._template = sink.filenametemplate
     self._headertemplate = self._template[0].replace('.raw', '.header')
     self._logtemplate = self._template[0].replace('.raw', '.log')
     # determine which index of the detector value is our data array
     # XXX support more than one array
     arrayinfo = self.detector.arrayInfo()
     if len(arrayinfo) > 1:
         self.log.warning('image sink only supports one array per detector')
     self._arraydesc = arrayinfo[0]
示例#3
0
 def end(self):
     DataSinkHandler.end(self)
     if self.dataset == self._startdataset:
         message = 'QUIECK/' + self._startdataset.filepaths[0]
         try:
             with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as socke:
                 socke.sendto(bytes(message, 'utf-8'),
                              (self.sink.host, self.sink.port))
         except Exception:
             # In no event shall the failure to send this message break
             # something
             pass
         self._startdataset = None
示例#4
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
示例#5
0
文件: kafka.py 项目: umithardal/nicos
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._lastmetadata = 0
示例#6
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._template = sink.filenametemplate
     self._data = None
示例#7
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._last_saved = 0
示例#8
0
 def __init__(self, sink, dataset, detector):
     DataSinkHandler.__init__(self, sink, dataset, detector)
     self._indent = '' if self.dataset.settype != SUBSCAN else ' ' * 6
     self._colwidths = []
     self._rulerlen = 100
示例#9
0
 def begin(self):
     DataSinkHandler.begin(self)
     if not self._startdataset:
         self._startdataset = self.dataset