A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
li-ion-energy-source-example.cc File Reference
#include "ns3/command-line.h"
#include "ns3/energy-source-container.h"
#include "ns3/li-ion-energy-source.h"
#include "ns3/log.h"
#include "ns3/simple-device-energy-model.h"
#include "ns3/simulator.h"
+ Include dependency graph for li-ion-energy-source-example.cc:

Go to the source code of this file.

Functions

static void PrintCellInfo (Ptr< LiIonEnergySource > es)
 

Variables

 NS_WARNING_PUSH_DEPRECATED
 In this simple example, we show how to create and drain energy from a LiIonEnergySource.
 

Function Documentation

◆ PrintCellInfo()

static void PrintCellInfo ( Ptr< LiIonEnergySource > es)
static

Definition at line 47 of file li-ion-energy-source-example.cc.

References ns3::Time::As(), ns3::Simulator::IsFinished(), ns3::Simulator::Now(), NS_WARNING_POP, PrintCellInfo(), ns3::Time::S, ns3::Simulator::Schedule(), and ns3::Seconds().

Referenced by PrintCellInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ NS_WARNING_PUSH_DEPRECATED

NS_WARNING_PUSH_DEPRECATED

In this simple example, we show how to create and drain energy from a LiIonEnergySource.

We make a series of discharge calls to the energy source class with different current drain and duration until all the energy is depleted from the cell.

Every 20 seconds it is printed out the actual cell voltage to verify that it follows the discharge curve of the datasheet [1].

At the end of the example it is verified that after the energy depletion call, the cell voltage is below the threshold voltage.

References: [1] Panasonic CGR18650DA Datasheet, http://www.panasonic.com/industrial/includes/pdf/Panasonic_LiIon_CGR18650DA.pdf

Definition at line 44 of file li-ion-energy-source-example.cc.