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

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

#include <IEnergySource.h>

Inheritance diagram for inet::power::IEnergySource:
inet::power::EnergySourceBase inet::power::ICcEnergySource inet::power::IEnergyStorage inet::power::IEpEnergySource inet::power::CcEnergySourceBase inet::power::EnergyStorageBase inet::power::EpEnergySourceBase inet::power::CcEnergySourceBase inet::power::ICcEnergyStorage inet::power::EnergyStorageBase inet::power::ICcEnergyStorage inet::power::IEpEnergyStorage inet::power::EpEnergySourceBase inet::power::IEpEnergyStorage

Public Member Functions

virtual ~IEnergySource ()
 
virtual int getNumEnergyConsumers () const =0
 Returns the number of energy consumers in the range [0, +infinity). More...
 
virtual const IEnergyConsumergetEnergyConsumer (int index) const =0
 Returns the energy consumer for the provided index. More...
 
virtual void addEnergyConsumer (const IEnergyConsumer *energyConsumer)=0
 Adds a new energy consumer to the energy source. More...
 
virtual void removeEnergyConsumer (const IEnergyConsumer *energyConsumer)=0
 Removes a previously added energy consumer from this energy source. More...
 

Detailed Description

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

This interface is extended by various energy source interfaces. Actual energy source 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::IEnergySource::~IEnergySource ( )
inlinevirtual
40 {}

Member Function Documentation

virtual void inet::power::IEnergySource::addEnergyConsumer ( const IEnergyConsumer energyConsumer)
pure virtual
virtual const IEnergyConsumer* inet::power::IEnergySource::getEnergyConsumer ( int  index) const
pure virtual

Returns the energy consumer 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::EnergySourceBase.

virtual int inet::power::IEnergySource::getNumEnergyConsumers ( ) const
pure virtual

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

Implemented in inet::power::EnergySourceBase.

virtual void inet::power::IEnergySource::removeEnergyConsumer ( const IEnergyConsumer energyConsumer)
pure virtual

Removes a previously added energy consumer from this energy source.

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

Implemented in inet::power::CcEnergySourceBase, inet::power::EpEnergySourceBase, inet::power::CcEnergyStorageBase, inet::power::EpEnergyStorageBase, and inet::power::EnergySourceBase.


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