Terminal.println("Node lifetime: " + cycles + " cycles, " + simulator.getMicrocontroller().cyclesToMillis(cycles) / 1000.0+ " seconds\n");
// get energy information for each device
Iterator it = instance.consumer.iterator();
while( it.hasNext() ){
//get energy information
Energy en = (Energy)it.next();
int modes = en.getModeNumber();
Terminal.println(en.getName() + ": " + en.getTotalConsumedEnergy() + " Joule");
// get information for each state
for (int j = 0; j < modes; j++)
//when there are more than 10 modes, only print the ones the system was in
if (modes <= 10 || en.getCycles(j) > 0)
Terminal.println(" " + en.getModeName(j) + ": " + en.getConsumedEnergy(j) + " Joule, " + en.getCycles(j) + " cycles");
Terminal.nextln();
}
}