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
- Public Member Functions inherited from ns3::EnergySource
void SetNode (Ptr< Node > node)
 Sets pointer to node containing this EnergySource.
Ptr< NodeGetNode (void) const
void AppendDeviceEnergyModel (Ptr< DeviceEnergyModel > deviceEnergyModelPtr)
DeviceEnergyModelContainer FindDeviceEnergyModels (TypeId tid)
DeviceEnergyModelContainer FindDeviceEnergyModels (std::string name)
void StartDeviceModels (void)
void DisposeDeviceModels (void)
- Public Member Functions inherited from ns3::Object
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Dispose (void)
void AggregateObject (Ptr< Object > other)
AggregateIterator GetAggregateIterator (void) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
uint32_t GetReferenceCount (void) const
- Public Member Functions inherited from ns3::ObjectBase
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::BasicEnergySource.

Additional Inherited Members

- Protected Member Functions inherited from ns3::EnergySource
double CalculateTotalCurrent (void)
void NotifyEnergyDrained (void)
void BreakDeviceEnergyModelRefCycle (void)
- Protected Member Functions inherited from ns3::Object
virtual void NotifyNewAggregate (void)
 Object (const Object &o)

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().

Time ns3::BasicEnergySource::GetEnergyUpdateInterval ( void  ) const
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().

TypeId ns3::BasicEnergySource::GetTypeId ( void  )
static

This method returns the TypeId associated to 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().

void ns3::BasicEnergySource::SetEnergyUpdateInterval ( Time  interval)
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().

void ns3::BasicEnergySource::UpdateEnergySource ( void  )
virtual

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