ns-3
ns3::BasicEnergySource Class Reference

#include <basic-energy-source.h>

Inheritance diagram for ns3::BasicEnergySource:
Collaboration diagram for ns3::BasicEnergySource:

List of all members.

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.

Detailed Description

BasicEnergySource decreases/increases remaining energy stored in itself in linearly.


Member Function Documentation

double ns3::BasicEnergySource::GetEnergyFraction ( void  ) [virtual]
Returns:
Energy fraction.

Implements GetEnergyFraction.

Implements ns3::EnergySource.

References NS_LOG_FUNCTION, and UpdateEnergySource().

Returns:
The interval between each energy update.

Referenced by GetTypeId().

double ns3::BasicEnergySource::GetInitialEnergy ( void  ) const [virtual]
Returns:
Initial energy stored in energy source, in Joules.

Implements GetInitialEnergy.

Implements ns3::EnergySource.

Referenced by GetTypeId().

double ns3::BasicEnergySource::GetRemainingEnergy ( void  ) [virtual]
Returns:
Remaining energy in energy source, in Joules

Implements GetRemainingEnergy.

Implements ns3::EnergySource.

References NS_LOG_FUNCTION, and UpdateEnergySource().

double ns3::BasicEnergySource::GetSupplyVoltage ( void  ) const [virtual]
Returns:
Supply voltage at the energy source.

Implements GetSupplyVoltage.

Implements ns3::EnergySource.

Referenced by GetTypeId().

This method returns the TypeId associated to ns3::BasicEnergySource.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::BasicEnergySource
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::EnergySource/$ns3::BasicEnergySource
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::BasicEnergySource
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::EnergySource/$ns3::BasicEnergySource

Attributes defined for this type:

  • BasicEnergySourceInitialEnergyJ: Initial energy stored in basic energy source.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: construct write read
  • BasicEnergySupplyVoltageV: Initial supply voltage for basic energy source.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 3
    • Flags: construct write read
  • PeriodicEnergyUpdateInterval: Time between two consecutive periodic energy updates.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +1000000000.0ns
    • Flags: construct write read

TraceSources defined for this type:

Reimplemented from ns3::EnergySource.

References GetEnergyUpdateInterval(), GetInitialEnergy(), GetSupplyVoltage(), ns3::MakeTraceSourceAccessor(), ns3::Seconds(), SetEnergyUpdateInterval(), SetInitialEnergy(), ns3::TypeId::SetParent(), and SetSupplyVoltage().

Parameters:
intervalEnergy update interval.

This function sets the interval between each energy update.

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

void ns3::BasicEnergySource::SetInitialEnergy ( double  initialEnergyJ)
Parameters:
initialEnergyJInitial 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)
Parameters:
supplyVoltageVSupply voltage at the energy source, in Volts.

Sets supply voltage of the energy source.

References NS_LOG_FUNCTION.

Referenced by GetTypeId().


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