From 8691e98c7f009c8d06e1c885f6ad28395031ac38 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 24 Sep 2022 11:24:17 +0200 Subject: [PATCH] Update energy plugin --- esds/plugins/power_states.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esds/plugins/power_states.py b/esds/plugins/power_states.py index 3b86cec..144deed 100644 --- a/esds/plugins/power_states.py +++ b/esds/plugins/power_states.py @@ -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")