コード例 #1
0
 def get(self):
     result = []
     for ch in self.psuChannels:
         result.append(
             DataPassthru(time_now_formatted(), self.displayName+str(ch),
                          uniform(1, 2)))
     return result
コード例 #2
0
ファイル: Current.py プロジェクト: bflaggs/NeoBurnIn
 def get(self):
     result = []
     for ch in self.psuChannels:
         curr = self.psu.ChCurrent(ch)
         result.append(
             DataPassthru(time_now_formatted(), self.displayName+str(ch),
                          curr[2]))
     return result
コード例 #3
0
    def run(self):
        self.initial_sampling()

        while not self.stop_event.wait(self.interval):
            therm = self.get()
            logger.debug('{} readout: {}'.format(self.displayName, therm))

            recent_mean = mean(self.sample)
            logger.debug('{} recent mean: {}'.format(self.displayName,
                                                     recent_mean))
            if abs(therm - recent_mean) > self.rejectThresh:
                logger.debug(
                    '{} readout {} rejected, with recent mean {}'.format(
                        self.displayName, therm, recent_mean))
            else:
                self.sample.append(therm)
                msg = DataPassthru(time_now_formatted(), self.displayName,
                                   therm)
                self.queue.put(msg)
コード例 #4
0
 def get(self):
     return DataPassthru(time_now_formatted(), self.chName, uniform(1, 10))
コード例 #5
0
 def alarm(self):
     self.queue.put(
         DataPassthru(time_now_formatted(), self.displayName, 'WATER'))
コード例 #6
0
ファイル: Therm.py プロジェクト: bflaggs/NeoBurnIn
 def get(self):
     therm = super().get()
     return DataPassthru(time_now_formatted(), self.displayName, therm)
コード例 #7
0
 def run(self):
     while not self.stop_event.wait(self.interval):
         therm = self.get()
         logger.debug('{} readout: {}'.format(self.displayName, therm))
         msg = DataPassthru(time_now_formatted(), self.displayName, therm)
         self.queue.put(msg)