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

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

#include "slot-output-stats.h"

Public Member Functions

 SlotOutputStats ()
 Constructor.
 
 SlotOutputStats ()
 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 SaveSlotStats (const SfnSf &sfnSf, uint32_t scheduledUe, uint32_t usedReg, uint32_t usedSym, uint32_t availableRb, uint32_t availableSym, uint16_t bwpId, uint16_t cellId)
 Save the slot statistics.
 
void SaveSlotStats (const SfnSf &sfnSf, uint32_t scheduledUe, uint32_t usedReg, uint32_t usedSym, uint32_t availableRb, uint32_t availableSym, uint16_t bwpId, uint16_t cellId)
 Save the slot statistics.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="slotStats")
 Install the output database.
 
void SetDb (SQLiteOutput *db, const std::string &tableName="slotStats")
 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 27 of file 3gpp-outdoor-calibration/slot-output-stats.h.

Constructor & Destructor Documentation

◆ SlotOutputStats()

ns3::SlotOutputStats::SlotOutputStats ( )

Constructor.

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

Member Function Documentation

◆ EmptyCache()

void ns3::SlotOutputStats::EmptyCache ( )

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

Definition at line 76 of file 3gpp-outdoor-calibration/slot-output-stats.cc.

◆ SaveSlotStats() [1/2]

void ns3::SlotOutputStats::SaveSlotStats ( const SfnSf sfnSf,
uint32_t  scheduledUe,
uint32_t  usedReg,
uint32_t  usedSym,
uint32_t  availableRb,
uint32_t  availableSym,
uint16_t  bwpId,
uint16_t  cellId 
)

Save the slot statistics.

Parameters
[in]sfnSfSlot number
[in]scheduledUeThe number of scheduled UE in the slot
[in]usedRegUsed Resource Element Group (1 sym x 1 RB)
[in]usedSymUsed symbols
[in]availableRbAvailable RBs
[in]availableSymAvailable symbols
[in]bwpIdBWP ID
[in]cellIdCell ID

Definition at line 47 of file 3gpp-outdoor-calibration/slot-output-stats.cc.

◆ SaveSlotStats() [2/2]

void ns3::SlotOutputStats::SaveSlotStats ( const SfnSf sfnSf,
uint32_t  scheduledUe,
uint32_t  usedReg,
uint32_t  usedSym,
uint32_t  availableRb,
uint32_t  availableSym,
uint16_t  bwpId,
uint16_t  cellId 
)

Save the slot statistics.

Parameters
[in]sfnSfSlot number
[in]scheduledUeThe number of scheduled UE in the slot
[in]usedRegUsed Resource Element Group (1 sym x 1 RB)
[in]usedSymUsed symbols
[in]availableRbAvailable RBs
[in]availableSymAvailable symbols
[in]bwpIdBWP ID
[in]cellIdCell ID

◆ SetDb() [1/2]

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

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,"
  • "BwpId INTEGER NOT NULL,"
  • "CellId INTEGER NOT NULL,"
  • "ActiveUe INTEGER NOT NULL,"
  • "UsedReg INTEGER NOT NULL,"
  • "AvailableRb INTEGER NOT NULL,"
  • "AvailableSym INTEGER 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/slot-output-stats.cc.

◆ SetDb() [2/2]

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

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,"
  • "BwpId INTEGER NOT NULL,"
  • "CellId INTEGER NOT NULL,"
  • "ActiveUe INTEGER NOT NULL,"
  • "UsedReg INTEGER NOT NULL,"
  • "AvailableRb INTEGER NOT NULL,"
  • "AvailableSym INTEGER 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: