|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthu.mta.sztaki.lpds.cloud.simulator.Timed
hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter
public abstract class EnergyMeter
Field Summary | |
---|---|
protected long |
lastMetered
|
private long |
meteringStarted
|
private long |
meteringStopped
|
private double |
totalConsumption
|
Constructor Summary | |
---|---|
EnergyMeter()
|
Method Summary | |
---|---|
long |
getMeteringStarted()
Allows the reading of the beginning time instance of the metering session If there were several metering sessions done by this meter, then this function reports the time instance when a hypothetical single continuous metering session would have started |
long |
getMeteringStopped()
Enables access to the time when the last reading was stored for the last stopped metering session. |
double |
getTotalConsumption()
Allows the reading of the meter's current consumption report. |
protected void |
increaseTotalConsumption(double amount)
|
protected void |
readjustMeter()
Allows internal realignment to new metering situations that need an immediate utilization reading |
boolean |
startMeter(long interval,
boolean dropPriorReading)
Initiates an energy metering session. |
void |
stopMeter()
Terminates the metering session, the totalconsumption values will no longer be updated! |
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.Timed |
---|
compareTo, fire, getFireCount, getFrequency, getNextEvent, getNextFire, isSubscribed, jumpTime, nextEventDistance, resetTimed, setBackPreference, simulateUntil, simulateUntilLastEvent, skipEventsTill, subscribe, tick, toString, unsubscribe, updateFrequency |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double totalConsumption
private long meteringStarted
protected long lastMetered
private long meteringStopped
Constructor Detail |
---|
public EnergyMeter()
Method Detail |
---|
public boolean startMeter(long interval, boolean dropPriorReading)
interval
- The meter refresh frequency.dropPriorReading
- public void stopMeter()
public double getTotalConsumption()
public long getMeteringStarted()
public long getMeteringStopped()
protected void increaseTotalConsumption(double amount)
protected void readjustMeter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |