1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

adding device_entry parameter to energy probe instrument

This commit is contained in:
Vasilis Flouris 2015-04-29 10:42:32 +01:00
parent e87e4c582c
commit cd6babeab1

View File

@ -53,6 +53,8 @@ class EnergyProbe(Instrument):
description="""The value of shunt resistors. This is a mandatory parameter."""),
Parameter('labels', kind=list, default=[],
description="""Meaningful labels for each of the monitored rails."""),
Parameter('device_entry', kind=str, default='/dev/ttyACM0',
description="""Path to /dev entry for the energy probe (it should be /dev/ttyACMx)"""),
]
MAX_CHANNELS = 3
@ -84,7 +86,7 @@ class EnergyProbe(Instrument):
rstring = ""
for i, rval in enumerate(self.resistor_values):
rstring += '-r {}:{} '.format(i, rval)
self.command = 'caiman -l {} {}'.format(rstring, self.output_directory)
self.command = 'caiman -d {} -l {} {}'.format(self.device_entry, rstring, self.output_directory)
os.makedirs(self.output_directory)
def start(self, context):