INET Framework for OMNeT++/OMNEST
inet::power::CcEnergyStorageBase Class Reference

#include <CcEnergyStorageBase.h>

Inheritance diagram for inet::power::CcEnergyStorageBase:
inet::power::CcEnergySourceBase inet::power::CcEnergySinkBase inet::power::ICcEnergyStorage inet::power::IEnergyStorage inet::power::ICcEnergySink inet::power::ICcEnergySource inet::power::ICcEnergySink inet::power::EnergySinkBase inet::power::ICcEnergySource inet::power::EnergySourceBase inet::power::SimpleCcBattery

Public Member Functions

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...
 
virtual void addEnergyGenerator (const IEnergyGenerator *energyGenerator) override
 Adds a new energy generator to the energy sink. More...
 
virtual void removeEnergyGenerator (const IEnergyGenerator *energyGenerator) override
 Removes a previously added energy generator from this energy sink. More...
 
virtual void receiveSignal (cComponent *source, simsignal_t signal, double value, cObject *details) override
 
- Public Member Functions inherited from inet::power::CcEnergySourceBase
virtual A getTotalCurrentConsumption () const override
 Returns the total current consumption in the range [0, +infinity). 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 IEnergyConsumergetEnergyConsumer (int index) const override
 Returns the energy consumer for the provided index. More...
 
- Public Member Functions inherited from inet::power::IEnergySource
virtual ~IEnergySource ()
 
- Public Member Functions inherited from inet::power::ICcEnergySource
virtual V getNominalVoltage () const =0
 Returns the open circuit voltage in the range [0, +infinity). More...
 
virtual V getOutputVoltage () const =0
 Returns the output voltage in the ragne [0, +infinity). More...
 
- Public Member Functions inherited from inet::power::CcEnergySinkBase
virtual A getTotalCurrentGeneration () const override
 Returns the total current generation in the range [0, +infinity). More...
 
- Public Member Functions inherited from inet::power::EnergySinkBase
virtual int getNumEnergyGenerators () const override
 Returns the number of energy generators in the range [0, +infinity). More...
 
virtual const IEnergyGeneratorgetEnergyGenerator (int index) const override
 Returns the energy generator for the provided index. More...
 
- Public Member Functions inherited from inet::power::IEnergySink
virtual ~IEnergySink ()
 
- Public Member Functions inherited from inet::power::ICcEnergyStorage
virtual C getNominalChargeCapacity () const =0
 Returns the nominal charge capacity in the range [0, +infinity). More...
 
virtual C getResidualChargeCapacity () const =0
 Returns the residual charge capacity in the range [0, nominalCapacity]. More...
 

Protected Member Functions

void initialize (int stage) override
 
virtual void updateTotalCurrentConsumption () override
 
virtual void updateTotalCurrentGeneration () override
 
- Protected Member Functions inherited from inet::power::CcEnergySourceBase
virtual A computeTotalCurrentConsumption () const
 
- Protected Member Functions inherited from inet::power::CcEnergySinkBase
virtual A computeTotalCurrentGeneration () const
 

Additional Inherited Members

- Static Public Attributes inherited from inet::power::ICcEnergySource
static simsignal_t currentConsumptionChangedSignal = cComponent::registerSignal("currentConsumptionChanged")
 The signal that is used to publish current consumption changes. More...
 
- Static Public Attributes inherited from inet::power::ICcEnergySink
static simsignal_t currentGenerationChangedSignal = cComponent::registerSignal("currentGenerationChanged")
 The signal that is used to publish current generation changes. More...
 
- Static Public Attributes inherited from inet::power::ICcEnergyStorage
static simsignal_t residualChargeCapacityChangedSignal = cComponent::registerSignal("residualChargeCapacityChanged")
 The signal that is used to publish residual charge capacity changes also including when the energy storage becomes completely depleted or charged. More...
 
- Protected Attributes inherited from inet::power::CcEnergySourceBase
A totalCurrentConsumption = A(NaN)
 
- Protected Attributes inherited from inet::power::EnergySourceBase
std::vector< const IEnergyConsumer * > energyConsumers
 
- Protected Attributes inherited from inet::power::CcEnergySinkBase
A totalCurrentGeneration = A(NaN)
 
- Protected Attributes inherited from inet::power::EnergySinkBase
std::vector< const IEnergyGenerator * > energyGenerators
 

Member Function Documentation

void inet::power::CcEnergyStorageBase::addEnergyConsumer ( const IEnergyConsumer energyConsumer)
overridevirtual

Adds a new energy consumer to the energy source.

The energyConsumer parameter must not be nullptr.

Reimplemented from inet::power::CcEnergySourceBase.

47 {
48  Enter_Method("addEnergyConsumer");
50 }
virtual void addEnergyConsumer(const IEnergyConsumer *energyConsumer) override
Adds a new energy consumer to the energy source.
Definition: CcEnergySourceBase.cc:37
void inet::power::CcEnergyStorageBase::addEnergyGenerator ( const IEnergyGenerator energyGenerator)
overridevirtual

Adds a new energy generator to the energy sink.

The energyGenerator parameter must not be nullptr.

Reimplemented from inet::power::CcEnergySinkBase.

59 {
60  Enter_Method("addEnergyGenerator");
61  CcEnergySinkBase::addEnergyGenerator(energyGenerator);
62 }
virtual void addEnergyGenerator(const IEnergyGenerator *energyGenerator) override
Adds a new energy generator to the energy sink.
Definition: CcEnergySinkBase.cc:37
void inet::power::CcEnergyStorageBase::initialize ( int  stage)
overrideprotected

Referenced by inet::power::SimpleCcBattery::initialize().

25 {
26  if (stage == INITSTAGE_LOCAL) {
31  }
32 }
virtual A computeTotalCurrentGeneration() const
Definition: CcEnergySinkBase.cc:24
A totalCurrentGeneration
Definition: CcEnergySinkBase.h:32
Local initializations.
Definition: InitStages.h:35
virtual A computeTotalCurrentConsumption() const
Definition: CcEnergySourceBase.cc:24
A totalCurrentConsumption
Definition: CcEnergySourceBase.h:32
void inet::power::CcEnergyStorageBase::receiveSignal ( cComponent *  source,
simsignal_t  signal,
double  value,
cObject *  details 
)
overridevirtual
71 {
72  Enter_Method("receiveSignal");
77 }
static simsignal_t currentGenerationChangedSignal
The signal that is used to publish current generation changes.
Definition: ICcEnergyGenerator.h:40
virtual void updateTotalCurrentGeneration() override
Definition: CcEnergyStorageBase.cc:40
virtual void updateTotalCurrentConsumption() override
Definition: CcEnergyStorageBase.cc:34
static simsignal_t currentConsumptionChangedSignal
The signal that is used to publish current consumption changes.
Definition: ICcEnergyConsumer.h:40
void inet::power::CcEnergyStorageBase::removeEnergyConsumer ( const IEnergyConsumer energyConsumer)
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::CcEnergySourceBase.

53 {
54  Enter_Method("removeEnergyConsumer");
56 }
virtual void removeEnergyConsumer(const IEnergyConsumer *energyConsumer) override
Removes a previously added energy consumer from this energy source.
Definition: CcEnergySourceBase.cc:45
void inet::power::CcEnergyStorageBase::removeEnergyGenerator ( const IEnergyGenerator energyGenerator)
overridevirtual

Removes a previously added energy generator from this energy sink.

This functions throws an exception if the generator is not found.

Reimplemented from inet::power::CcEnergySinkBase.

65 {
66  Enter_Method("removeEnergyGenerator");
68 }
virtual void removeEnergyGenerator(const IEnergyGenerator *energyGenerator) override
Removes a previously added energy generator from this energy sink.
Definition: CcEnergySinkBase.cc:45
void inet::power::CcEnergyStorageBase::updateTotalCurrentConsumption ( )
overrideprotectedvirtual

Reimplemented from inet::power::CcEnergySourceBase.

Reimplemented in inet::power::SimpleCcBattery.

Referenced by receiveSignal(), and inet::power::SimpleCcBattery::updateTotalCurrentConsumption().

35 {
38 }
const value_type & get() const
Definition: Units.h:89
static simsignal_t currentConsumptionChangedSignal
The signal that is used to publish current consumption changes.
Definition: ICcEnergySource.h:40
A totalCurrentConsumption
Definition: CcEnergySourceBase.h:32
virtual void updateTotalCurrentConsumption()
Definition: CcEnergySourceBase.cc:32
void inet::power::CcEnergyStorageBase::updateTotalCurrentGeneration ( )
overrideprotectedvirtual

Reimplemented from inet::power::CcEnergySinkBase.

Reimplemented in inet::power::SimpleCcBattery.

Referenced by receiveSignal(), and inet::power::SimpleCcBattery::updateTotalCurrentGeneration().

41 {
44 }
virtual void updateTotalCurrentGeneration()
Definition: CcEnergySinkBase.cc:32
A totalCurrentGeneration
Definition: CcEnergySinkBase.h:32
const value_type & get() const
Definition: Units.h:89
static simsignal_t currentGenerationChangedSignal
The signal that is used to publish current generation changes.
Definition: ICcEnergySink.h:40

The documentation for this class was generated from the following files: