Update energy plugin

This commit is contained in:
Loic Guegan 2022-09-24 11:24:17 +02:00
parent 11c5ffcdc7
commit 8691e98c7f

View file

@ -149,5 +149,9 @@ class PowerStatesComms(NodePlugin):
consumption+=self.power[interface]["consumption_idle"]+self.power[interface]["consumption_dynamic"]
return consumption
def get_idle(self,interface):
self.sync_idle()
return(self.power[interface]["consumption_idle"])
def report_energy(self):
self.log("Communications consumed "+str(round(self.get_energy(),2))+"J")