INET Framework for OMNeT++/OMNEST
|
#include <EpEnergySourceBase.h>
Public Member Functions | |
virtual W | getTotalPowerConsumption () const override |
Returns the total power consumption in the range [0, +infinity). More... | |
virtual void | addEnergyConsumer (const IEnergyConsumer *energyConsumer) override |
Adds a new energy consumer to the energy source. More... | |
virtual void | removeEnergyConsumer (const IEnergyConsumer *energyConsumer) override |
Removes a previously added energy consumer from this energy source. More... | |
Public Member Functions inherited from inet::power::EnergySourceBase | |
virtual int | getNumEnergyConsumers () const override |
Returns the number of energy consumers in the range [0, +infinity). More... | |
virtual const IEnergyConsumer * | getEnergyConsumer (int index) const override |
Returns the energy consumer for the provided index. More... | |
Public Member Functions inherited from inet::power::IEnergySource | |
virtual | ~IEnergySource () |
Protected Member Functions | |
virtual W | computeTotalPowerConsumption () const |
virtual void | updateTotalPowerConsumption () |
Protected Attributes | |
W | totalPowerConsumption = W(NaN) |
Protected Attributes inherited from inet::power::EnergySourceBase | |
std::vector< const IEnergyConsumer * > | energyConsumers |
Additional Inherited Members | |
Static Public Attributes inherited from inet::power::IEpEnergySource | |
static simsignal_t | powerConsumptionChangedSignal = cComponent::registerSignal("powerConsumptionChanged") |
The signal that is used to publish power consumption changes. More... | |
|
overridevirtual |
Adds a new energy consumer to the energy source.
The energyConsumer parameter must not be nullptr.
Reimplemented from inet::power::EnergySourceBase.
Reimplemented in inet::power::EpEnergyStorageBase.
Referenced by inet::power::EpEnergyStorageBase::addEnergyConsumer().
|
protectedvirtual |
Referenced by inet::power::EpEnergyStorageBase::initialize(), and updateTotalPowerConsumption().
|
inlineoverridevirtual |
Returns the total power consumption in the range [0, +infinity).
Implements inet::power::IEpEnergySource.
|
overridevirtual |
Removes a previously added energy consumer from this energy source.
This functions throws an exception if the consumer is not found.
Reimplemented from inet::power::EnergySourceBase.
Reimplemented in inet::power::EpEnergyStorageBase.
Referenced by inet::power::EpEnergyStorageBase::removeEnergyConsumer().
|
protectedvirtual |
Reimplemented in inet::power::SimpleEpEnergyStorage, inet::power::IdealEpEnergyStorage, and inet::power::EpEnergyStorageBase.
Referenced by addEnergyConsumer(), removeEnergyConsumer(), and inet::power::EpEnergyStorageBase::updateTotalPowerConsumption().
Referenced by computeTotalPowerConsumption(), inet::power::EpEnergyStorageBase::initialize(), inet::power::SimpleEpEnergyStorage::scheduleTimer(), inet::power::IdealEpEnergyStorage::updateEnergyBalance(), inet::power::SimpleEpEnergyStorage::updateResidualCapacity(), inet::power::EpEnergyStorageBase::updateTotalPowerConsumption(), and updateTotalPowerConsumption().