27 #ifndef ENERGY_SOURCE_H
28 #define ENERGY_SOURCE_H
30 #include "ns3/object.h"
32 #include "ns3/type-id.h"
35 #include "ns3/energy-harvester.h"
84 class EnergyHarvester;
Holds a vector of ns3::DeviceEnergyModel pointers.
Introspection did not find any typical Config paths.
void AppendDeviceEnergyModel(Ptr< DeviceEnergyModel > deviceEnergyModelPtr)
void ConnectEnergyHarvester(Ptr< EnergyHarvester > energyHarvesterPtr)
void NotifyEnergyRecharged(void)
This function notifies all DeviceEnergyModel of energy recharged event.
void DisposeDeviceModels(void)
Calls Dispose () method of the device energy models.
void NotifyEnergyChanged(void)
This function notifies all DeviceEnergyModel of energy changed event.
virtual void UpdateEnergySource(void)=0
This function goes through the list of DeviceEnergyModels to obtain total current draw at the energy ...
virtual double GetRemainingEnergy(void)=0
std::vector< Ptr< EnergyHarvester > > m_harvesters
Vector of EnergyHarvester pointer connected to the same energy source.
Ptr< Node > GetNode(void) const
void BreakDeviceEnergyModelRefCycle(void)
This function is called to break reference cycle between EnergySource and DeviceEnergyModel.
DeviceEnergyModelContainer m_models
List of device energy models installed on the same node.
virtual double GetSupplyVoltage(void) const =0
Ptr< Node > m_node
Pointer to node containing this EnergySource.
void InitializeDeviceModels(void)
Calls Start () method of the device energy models.
double CalculateTotalCurrent(void)
virtual double GetEnergyFraction(void)=0
DeviceEnergyModelContainer FindDeviceEnergyModels(TypeId tid)
virtual void DoDispose(void)
All child's implementation must call BreakDeviceEnergyModelRefCycle to ensure reference cycles to Dev...
void SetNode(Ptr< Node > node)
Sets pointer to node containing this EnergySource.
virtual double GetInitialEnergy(void) const =0
void NotifyEnergyDrained(void)
This function notifies all DeviceEnergyModel of energy depletion event.
static TypeId GetTypeId(void)
Get the type ID.
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.