Exemple #1
0
 def take_measurement(self):
     result = []
     for chan in self.active_channels:
         convert = self.measure_map[chan.sensor.kind][1]
         value = convert(chan.sensor.get('input'))
         result.append(Measurement(value, chan))
     return result
Exemple #2
0
 def take_measurement(self):
     result = []
     output = self.target.execute(self.command2).split()
     with csvreader(output) as reader:
         headings = next(reader)
         values = next(reader)
         for chan in self.active_channels:
             value = values[headings.index(chan.name)]
             result.append(Measurement(value, chan))
     return result
Exemple #3
0
 def take_measurement(self):
     result = []
     output = self.target.execute(self.command2).split()
     reader = csv.reader(output)
     headings = reader.next()
     values = reader.next()
     for chan in self.active_channels:
         value = values[headings.index(chan.name)]
         result.append(Measurement(value, chan))
     print result
     return result