def __init__(self, target, resistor_values, labels=None, device_entry='/dev/ttyACM0', res_dir=None): super().__init__(target, res_dir) logger = self.get_logger() # Configure channels for energy measurements self._instrument = devlib.EnergyProbeInstrument( self._target, resistor_values=resistor_values, labels=labels, device_entry=device_entry, ) # Configure channels for energy measurements logger.debug('Enabling channels') self._instrument.reset() # Logging enabled channels logger.info( f'Channels selected for energy sampling: {self._instrument.active_channels}' ) logger.debug(f'Results dir: {self._res_dir}')
def __init__(self, target, conf, res_dir): super(AEP, self).__init__(target, res_dir) # Configure channels for energy measurements self._log.info('AEP configuration') self._log.info(' %s', conf) self._instrument = devlib.EnergyProbeInstrument( self._target, labels=conf.get('channel_map'), **conf['conf']) # Configure channels for energy measurements self._log.debug('Enabling channels') self._instrument.reset() # Logging enabled channels self._log.info('Channels selected for energy sampling:') self._log.info(' %s', str(self._instrument.active_channels)) self._log.debug('Results dir: %s', self._res_dir)
def __init__(self, target): super(Aep, self).__init__(target) # Energy readings self.readings = {} # Time (start and diff) for power measurment self.time = {} # Initialize instrument # Only one channel (first AEP channel: pc1 ... probe channel 1) is used self._aep = devlib.EnergyProbeInstrument(self._target, labels=["pc1"], resistor_values=[0.033]) # Configure channels for energy measurements logging.debug('EnergyMeter - Enabling channels') self._aep.reset() # Logging enabled channels logging.info('%14s - Channels selected for energy sampling:\n%s', 'EnergyMeter', str(self._aep.active_channels))
def __init__(self, target, aep_conf, res_dir): super(AEP, self).__init__(target, res_dir) # Energy channels self.channels = [] # Time (start and diff) for power measurment self.time = {} # Configure channels for energy measurements logging.info('%14s - AEP configuration', 'EnergyMeter') logging.info('%14s - %s', 'EnergyMeter', aep_conf) self._aep = devlib.EnergyProbeInstrument(self._target, **aep_conf) # Configure channels for energy measurements logging.debug('EnergyMeter - Enabling channels') self._aep.reset() # Logging enabled channels logging.info('%14s - Channels selected for energy sampling:\n%s', 'EnergyMeter', str(self._aep.active_channels)) logging.debug('%14s - Results dir: %s', 'EnergyMeter', self._res_dir)
def __init__(self, target, conf, res_dir): super(AEP, self).__init__(target, res_dir) # Energy channels self.channels = [] # Time (start and diff) for power measurment self.time = {} # Configure channels for energy measurements self._log.info('AEP configuration') self._log.info(' %s', conf) self._aep = devlib.EnergyProbeInstrument( self._target, labels=conf['channel_map'], **conf['conf']) # Configure channels for energy measurements self._log.debug('Enabling channels') self._aep.reset() # Logging enabled channels self._log.info('Channels selected for energy sampling:') self._log.info(' %s', str(self._aep.active_channels)) self._log.debug('Results dir: %s', self._res_dir)