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

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

#include "sinr-output-stats.h"

Public Member Functions

 SinrOutputStats ()
 Constructor.
 
 SinrOutputStats ()
 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 SaveSinr (uint16_t cellId, uint16_t rnti, double avgSinr, uint16_t bwpId)
 Store the SINR values.
 
void SaveSinr (uint16_t cellId, uint16_t rnti, double avgSinr, uint16_t bwpId)
 Store the SINR values.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="sinr")
 Install the output database.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="sinr")
 Install the output database.
 

Detailed Description

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

The class is meant to store in a database the SINR 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
SaveSinr
EmptyCache

Definition at line 26 of file 3gpp-outdoor-calibration/sinr-output-stats.h.

Constructor & Destructor Documentation

◆ SinrOutputStats()

ns3::SinrOutputStats::SinrOutputStats ( )

Constructor.

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

Member Function Documentation

◆ EmptyCache()

void ns3::SinrOutputStats::EmptyCache ( )

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

Definition at line 54 of file 3gpp-outdoor-calibration/sinr-output-stats.cc.

◆ SaveSinr() [1/2]

void ns3::SinrOutputStats::SaveSinr ( uint16_t  cellId,
uint16_t  rnti,
double  avgSinr,
uint16_t  bwpId 
)

Store the SINR values.

Parameters
cellIdCell ID
rntiRNTI
avgSinrAverage SINR
bwpIdBWP ID

The method saves the result in a cache, and if it is necessary, writes the cache to disk before emptying it.

Definition at line 42 of file 3gpp-outdoor-calibration/sinr-output-stats.cc.

◆ SaveSinr() [2/2]

void ns3::SinrOutputStats::SaveSinr ( uint16_t  cellId,
uint16_t  rnti,
double  avgSinr,
uint16_t  bwpId 
)

Store the SINR values.

Parameters
cellIdCell ID
rntiRNTI
avgSinrAverage SINR
bwpIdBWP ID

The method saves the result in a cache, and if it is necessary, writes the cache to disk before emptying it.

◆ SetDb() [1/2]

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

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:

  • "CellId INTEGER NOT NULL, "
  • "BwpId INTEGER NOT NULL,"
  • "Rnti INTEGER NOT NULL,"
  • "AvgSinr 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/sinr-output-stats.cc.

◆ SetDb() [2/2]

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

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:

  • "CellId INTEGER NOT NULL, "
  • "BwpId INTEGER NOT NULL,"
  • "Rnti INTEGER NOT NULL,"
  • "AvgSinr 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: