ns-3
|
#include <basic-energy-source.h>
Public Member Functions | |
virtual double | GetInitialEnergy (void) const |
virtual double | GetSupplyVoltage (void) const |
virtual double | GetRemainingEnergy (void) |
virtual double | GetEnergyFraction (void) |
virtual void | UpdateEnergySource (void) |
void | SetInitialEnergy (double initialEnergyJ) |
void | SetSupplyVoltage (double supplyVoltageV) |
void | SetEnergyUpdateInterval (Time interval) |
Time | GetEnergyUpdateInterval (void) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::BasicEnergySource. |
BasicEnergySource decreases/increases remaining energy stored in itself in linearly.
double ns3::BasicEnergySource::GetEnergyFraction | ( | void | ) | [virtual] |
Implements GetEnergyFraction.
Implements ns3::EnergySource.
References NS_LOG_FUNCTION, and UpdateEnergySource().
Time ns3::BasicEnergySource::GetEnergyUpdateInterval | ( | void | ) | const |
Referenced by GetTypeId().
double ns3::BasicEnergySource::GetInitialEnergy | ( | void | ) | const [virtual] |
Implements GetInitialEnergy.
Implements ns3::EnergySource.
Referenced by GetTypeId().
double ns3::BasicEnergySource::GetRemainingEnergy | ( | void | ) | [virtual] |
Implements GetRemainingEnergy.
Implements ns3::EnergySource.
References NS_LOG_FUNCTION, and UpdateEnergySource().
double ns3::BasicEnergySource::GetSupplyVoltage | ( | void | ) | const [virtual] |
Implements GetSupplyVoltage.
Implements ns3::EnergySource.
Referenced by GetTypeId().
TypeId ns3::BasicEnergySource::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::BasicEnergySource.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::EnergySource.
References GetEnergyUpdateInterval(), GetInitialEnergy(), GetSupplyVoltage(), ns3::MakeTraceSourceAccessor(), ns3::Seconds(), SetEnergyUpdateInterval(), SetInitialEnergy(), ns3::TypeId::SetParent(), and SetSupplyVoltage().
void ns3::BasicEnergySource::SetEnergyUpdateInterval | ( | Time | interval | ) |
interval | Energy update interval. |
This function sets the interval between each energy update.
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::BasicEnergySource::SetInitialEnergy | ( | double | initialEnergyJ | ) |
initialEnergyJ | Initial energy, in Joules |
Sets initial energy stored in the energy source. Note that initial energy is assumed to be set before simulation starts and is set only once per simulation.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::BasicEnergySource::SetSupplyVoltage | ( | double | supplyVoltageV | ) |
supplyVoltageV | Supply voltage at the energy source, in Volts. |
Sets supply voltage of the energy source.
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::BasicEnergySource::UpdateEnergySource | ( | void | ) | [virtual] |
Implements UpdateEnergySource.
Implements ns3::EnergySource.
References ns3::EventId::Cancel(), ns3::Simulator::IsFinished(), ns3::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by GetEnergyFraction(), and GetRemainingEnergy().