INET Framework for OMNeT++/OMNEST
|
This class implements a simple power based alternating energy consumer. More...
#include <AlternatingEpEnergyConsumer.h>
Public Member Functions | |
virtual | ~AlternatingEpEnergyConsumer () |
virtual IEnergySource * | getEnergySource () const override |
Returns the energy source that provides energy for this energy consumer. More... | |
virtual W | getPowerConsumption () const override |
Returns the power consumption in the range [0, +infinity). More... | |
Public Member Functions inherited from inet::power::IEnergyConsumer | |
virtual | ~IEnergyConsumer () |
Protected Member Functions | |
virtual void | initialize (int stage) override |
virtual void | handleMessage (cMessage *message) override |
virtual void | updatePowerConsumption () |
virtual void | scheduleIntervalTimer () |
Protected Attributes | |
IEpEnergySource * | energySource = nullptr |
cMessage * | timer = nullptr |
bool | isSleeping = false |
W | powerConsumption = W(NaN) |
Additional Inherited Members | |
Static Public Attributes inherited from inet::power::IEpEnergyConsumer | |
static simsignal_t | powerConsumptionChangedSignal = cComponent::registerSignal("powerConsumptionChanged") |
The signal that is used to publish power consumption changes. More... | |
This class implements a simple power based alternating energy consumer.
See the corresponding NED file for more details.
|
virtual |
|
inlineoverridevirtual |
Returns the energy source that provides energy for this energy consumer.
This function never returns nullptr.
Implements inet::power::IEnergyConsumer.
|
inlineoverridevirtual |
Returns the power consumption in the range [0, +infinity).
Implements inet::power::IEpEnergyConsumer.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage(), and initialize().
|
protectedvirtual |
Referenced by handleMessage(), and initialize().
|
protected |
Referenced by initialize().
|
protected |
Referenced by handleMessage(), initialize(), scheduleIntervalTimer(), and updatePowerConsumption().
Referenced by initialize(), and updatePowerConsumption().
|
protected |
Referenced by handleMessage(), initialize(), scheduleIntervalTimer(), and ~AlternatingEpEnergyConsumer().