|
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 |
Public Member Functions inherited from ns3::EnergySource | |
| void | SetNode (Ptr< Node > node) |
| Sets pointer to node containing this EnergySource. | |
| Ptr< Node > | GetNode (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) | |
| SimpleRefCount & | operator= (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) | |
BasicEnergySource decreases/increases remaining energy stored in itself in linearly.
|
virtual |
Implements GetEnergyFraction.
Implements ns3::EnergySource.
References NS_LOG_FUNCTION, and UpdateEnergySource().
| Time ns3::BasicEnergySource::GetEnergyUpdateInterval | ( | void | ) | const |
Referenced by GetTypeId().
|
virtual |
Implements GetInitialEnergy.
Implements ns3::EnergySource.
Referenced by GetTypeId().
|
virtual |
Implements GetRemainingEnergy.
Implements ns3::EnergySource.
References NS_LOG_FUNCTION, and UpdateEnergySource().
|
virtual |
Implements GetSupplyVoltage.
Implements ns3::EnergySource.
Referenced by GetTypeId().
|
static |
This method returns the TypeId associated to ns3::BasicEnergySource.
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().
|
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().