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