INET Framework for OMNeT++/OMNEST
inet::power::IEnergySink Class Referenceabstract

This class is a base interface that must be implemented by energy sink models to integrate with other parts of the power model. More...

#include <IEnergySink.h>

Inheritance diagram for inet::power::IEnergySink:
inet::power::EnergySinkBase inet::power::ICcEnergySink inet::power::IEnergyStorage inet::power::IEpEnergySink inet::power::CcEnergySinkBase inet::power::EnergyStorageBase inet::power::EpEnergySinkBase inet::power::CcEnergySinkBase inet::power::ICcEnergyStorage inet::power::EnergyStorageBase inet::power::ICcEnergyStorage inet::power::IEpEnergyStorage inet::power::EpEnergySinkBase inet::power::IEpEnergyStorage

Public Member Functions

virtual ~IEnergySink ()
 
virtual int getNumEnergyGenerators () const =0
 Returns the number of energy generators in the range [0, +infinity). More...
 
virtual const IEnergyGeneratorgetEnergyGenerator (int index) const =0
 Returns the energy generator for the provided index. More...
 
virtual void addEnergyGenerator (const IEnergyGenerator *energyGenerator)=0
 Adds a new energy generator to the energy sink. More...
 
virtual void removeEnergyGenerator (const IEnergyGenerator *energyGenerator)=0
 Removes a previously added energy generator from this energy sink. More...
 

Detailed Description

This class is a base interface that must be implemented by energy sink models to integrate with other parts of the power model.

Energy generators connect to an energy sink, and they notify the energy sink when their energy generation changes. This interface is extended by various energy sink interfaces. Actual energy sink implementations should implement one of the derived interfaces.

See the corresponding NED file for more details.

Author
Levente Meszaros

Constructor & Destructor Documentation

virtual inet::power::IEnergySink::~IEnergySink ( )
inlinevirtual
42 {}

Member Function Documentation

virtual void inet::power::IEnergySink::addEnergyGenerator ( const IEnergyGenerator energyGenerator)
pure virtual

Adds a new energy generator to the energy sink.

The energyGenerator parameter must not be nullptr.

Implemented in inet::power::CcEnergySinkBase, inet::power::CcEnergyStorageBase, inet::power::EpEnergySinkBase, inet::power::EpEnergyStorageBase, and inet::power::EnergySinkBase.

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

virtual const IEnergyGenerator* inet::power::IEnergySink::getEnergyGenerator ( int  index) const
pure virtual

Returns the energy generator for the provided index.

This functions throws an exception if the index is out of range, and it never returns nullptr.

Implemented in inet::power::EnergySinkBase.

virtual int inet::power::IEnergySink::getNumEnergyGenerators ( ) const
pure virtual

Returns the number of energy generators in the range [0, +infinity).

Implemented in inet::power::EnergySinkBase.

virtual void inet::power::IEnergySink::removeEnergyGenerator ( const IEnergyGenerator energyGenerator)
pure virtual

Removes a previously added energy generator from this energy sink.

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

Implemented in inet::power::CcEnergySinkBase, inet::power::CcEnergyStorageBase, inet::power::EpEnergySinkBase, inet::power::EpEnergyStorageBase, and inet::power::EnergySinkBase.


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