5G-LENA nr-v3.3-161-gad18933f
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::PowerOutputStats Class Reference

Class to collect and store the transmission power values obtained from a simulation. More...

#include "power-output-stats.h"

Public Member Functions

 PowerOutputStats ()
 Constructor.
 
 PowerOutputStats ()
 Constructor.
 
void EmptyCache ()
 Force the cache write to disk, emptying the cache itself.
 
void EmptyCache ()
 Force the cache write to disk, emptying the cache itself.
 
void SavePower (const SfnSf &sfnSf, Ptr< const SpectrumValue > txPsd, const Time &t, uint16_t rnti, uint64_t imsi, uint16_t bwpId, uint16_t cellId)
 Store power values.
 
void SavePower (const SfnSf &sfnSf, Ptr< const SpectrumValue > txPsd, const Time &t, uint16_t rnti, uint64_t imsi, uint16_t bwpId, uint16_t cellId)
 Store power values.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="power")
 Install the output database.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="power")
 Install the output database.
 

Detailed Description

Class to collect and store the transmission power values obtained from a simulation.

The class is meant to store in a database the values from UE or GNB during a simulation. The class contains a cache, that after some time is written to the disk.

See also
SetDb
SavePower
EmptyCache

Definition at line 29 of file 3gpp-outdoor-calibration/power-output-stats.h.

Constructor & Destructor Documentation

◆ PowerOutputStats()

ns3::PowerOutputStats::PowerOutputStats ( )

Constructor.

Definition at line 13 of file 3gpp-outdoor-calibration/power-output-stats.cc.

Member Function Documentation

◆ EmptyCache()

void ns3::PowerOutputStats::EmptyCache ( )

Force the cache write to disk, emptying the cache itself.

Definition at line 97 of file 3gpp-outdoor-calibration/power-output-stats.cc.

◆ SavePower() [1/2]

void ns3::PowerOutputStats::SavePower ( const SfnSf sfnSf,
Ptr< const SpectrumValue >  txPsd,
const Time &  t,
uint16_t  rnti,
uint64_t  imsi,
uint16_t  bwpId,
uint16_t  cellId 
)

Store power values.

Parameters
sfnSfSlot number
txPsdTxPsd
tTime for the transmission
rntiRNTI
imsiIMSI
bwpIdBWP ID
cellIdcell ID

Please note that the values in txPsd will be summed before storing.

Definition at line 49 of file 3gpp-outdoor-calibration/power-output-stats.cc.

References ns3::SfnSf::GetFrame(), ns3::SfnSf::GetSlot(), and ns3::SfnSf::GetSubframe().

+ Here is the call graph for this function:

◆ SavePower() [2/2]

void ns3::PowerOutputStats::SavePower ( const SfnSf sfnSf,
Ptr< const SpectrumValue >  txPsd,
const Time &  t,
uint16_t  rnti,
uint64_t  imsi,
uint16_t  bwpId,
uint16_t  cellId 
)

Store power values.

Parameters
sfnSfSlot number
txPsdTxPsd
tTime for the transmission
rntiRNTI
imsiIMSI
bwpIdBWP ID
cellIdcell ID

Please note that the values in txPsd will be summed before storing.

◆ SetDb() [1/2]

void ns3::PowerOutputStats::SetDb ( SQLiteOutput *  db,
const std::string &  tableName = "power" 
)

Install the output database.

Parameters
dbdatabase pointer
tableNamename of the table where the values will be stored

The db pointer must be valid through all the lifespan of the class. The method creates, if not exists, a table for storing the values. The table will contain the following columns:

  • "Frame INTEGER NOT NULL, "
  • "SubFrame INTEGER NOT NULL,"
  • "Slot INTEGER NOT NULL,"
  • "Rnti INTEGER NOT NULL,"
  • "Imsi INTEGER NOT NULL,"
  • "BwpId INTEGER NOT NULL,"
  • "CellId INTEGER NOT NULL,"
  • "txPsdSum DOUBLE NOT NULL,"
  • "Seed INTEGER NOT NULL,"
  • "Run INTEGER NOT NULL);"

Please note that this method, if the db already contains a table with the same name, also clean existing values that has the same Seed/Run pair.

Definition at line 18 of file 3gpp-outdoor-calibration/power-output-stats.cc.

◆ SetDb() [2/2]

void ns3::PowerOutputStats::SetDb ( SQLiteOutput *  db,
const std::string &  tableName = "power" 
)

Install the output database.

Parameters
dbdatabase pointer
tableNamename of the table where the values will be stored

The db pointer must be valid through all the lifespan of the class. The method creates, if not exists, a table for storing the values. The table will contain the following columns:

  • "Frame INTEGER NOT NULL, "
  • "SubFrame INTEGER NOT NULL,"
  • "Slot INTEGER NOT NULL,"
  • "Rnti INTEGER NOT NULL,"
  • "Imsi INTEGER NOT NULL,"
  • "BwpId INTEGER NOT NULL,"
  • "CellId INTEGER NOT NULL,"
  • "txPsdSum DOUBLE NOT NULL,"
  • "Seed INTEGER NOT NULL,"
  • "Run INTEGER NOT NULL);"

Please note that this method, if the db already contains a table with the same name, also clean existing values that has the same Seed/Run pair.


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