|
||||||||||
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
hu.mta.sztaki.lpds.cloud.simulator.energy.AggregatedEnergyMeter
public class AggregatedEnergyMeter
Allows a group of energy meters to be operated simultaneously.
Field Summary | |
---|---|
List<EnergyMeter> |
supervised
The list of meters that supposed to be used together. |
Fields inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter |
---|
lastMetered |
Constructor Summary | |
---|---|
AggregatedEnergyMeter(List<EnergyMeter> toAggregate)
Constructs an aggregated meter with a list of energy meters to operate on top. |
Method Summary | |
---|---|
double |
getTotalConsumption()
Calculates the sum of total consumptions returned by each and every supervised meter |
boolean |
startMeter(long interval,
boolean dropPriorReading)
Dispatches start meter calls to all supervised meters. |
void |
stopMeter()
Dispatches stop meter calls to all supervised meters |
void |
tick(long fires)
This operation is ignored as the actual metering is done in the supervised meters, and the totalconsumption values are always calculated on demand. |
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter |
---|
getMeteringStarted, getMeteringStopped, increaseTotalConsumption, readjustMeter |
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.Timed |
---|
calcTimeJump, compareTo, fire, getFireCount, getFrequency, getNextEvent, getNextFire, isSubscribed, jumpTime, nextEventDistance, resetTimed, setBackPreference, simulateUntil, simulateUntilLastEvent, skipEventsTill, subscribe, toString, unsubscribe, updateFrequency |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final List<EnergyMeter> supervised
Constructor Detail |
---|
public AggregatedEnergyMeter(List<EnergyMeter> toAggregate)
toAggregate
- the list of energy meters to soperviseMethod Detail |
---|
public boolean startMeter(long interval, boolean dropPriorReading)
startMeter
in class EnergyMeter
interval
- The meter refresh frequency.dropPriorReading
- public void stopMeter()
stopMeter
in class EnergyMeter
public double getTotalConsumption()
getTotalConsumption
in class EnergyMeter
public void tick(long fires)
tick
in class Timed
fires
- The particular time instance when the function was called. The
time instance is passed so the tick functions will not need to
call getFireCount() if they need to operate on the actual
time.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |