5G-LENA  nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
ns3::NrBearerStatsCalculator Class Reference

#include "nr-bearer-stats-calculator.h"

+ Inheritance diagram for ns3::NrBearerStatsCalculator:
+ Collaboration diagram for ns3::NrBearerStatsCalculator:

Public Member Functions

 NrBearerStatsCalculator ()
 
 NrBearerStatsCalculator (std::string protocolType)
 
 ~NrBearerStatsCalculator () override
 
void DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) override
 
void DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) override
 
void DoDispose () override
 
uint32_t GetDlCellId (uint64_t imsi, uint8_t lcid)
 
double GetDlDelay (uint64_t imsi, uint8_t lcid)
 
std::vector< double > GetDlDelayStats (uint64_t imsi, uint8_t lcid)
 
std::string GetDlOutputFilename ()
 
std::vector< double > GetDlPduSizeStats (uint64_t imsi, uint8_t lcid)
 
uint64_t GetDlRxData (uint64_t imsi, uint8_t lcid)
 
uint32_t GetDlRxPackets (uint64_t imsi, uint8_t lcid)
 
uint64_t GetDlTxData (uint64_t imsi, uint8_t lcid)
 
uint32_t GetDlTxPackets (uint64_t imsi, uint8_t lcid)
 
Time GetEpoch () const
 
Time GetStartTime () const
 
uint32_t GetUlCellId (uint64_t imsi, uint8_t lcid)
 
double GetUlDelay (uint64_t imsi, uint8_t lcid)
 
std::vector< double > GetUlDelayStats (uint64_t imsi, uint8_t lcid)
 
std::string GetUlOutputFilename ()
 
std::vector< double > GetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
 
uint64_t GetUlRxData (uint64_t imsi, uint8_t lcid)
 
uint32_t GetUlRxPackets (uint64_t imsi, uint8_t lcid)
 
uint64_t GetUlTxData (uint64_t imsi, uint8_t lcid)
 
uint32_t GetUlTxPackets (uint64_t imsi, uint8_t lcid)
 
void SetEpoch (Time e)
 
void SetStartTime (Time t)
 
void UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) override
 
void UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) override
 
- Public Member Functions inherited from ns3::NrBearerStatsBase
void DoDispose () override
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::NrBearerStatsBase
static TypeId GetTypeId ()
 

Detailed Description

This class is an ns-3 trace sink that performs the calculation of RLC and PDCP statistics for uplink and downlink.

Statistics are generated on a per radio bearer basis.

The statistics are calculated at consecutive time windows and periodically written to a file. The calculated statistics are:

  • Number of transmitted PDUs
  • Number of received PDUs
  • Number of transmitted bytes
  • Number of received bytes
  • Average, min, max and standard deviation of PDU delay (delay is calculated from the generation of the PDU to its reception)
  • Average, min, max and standard deviation of PDU size

Definition at line 57 of file nr-bearer-stats-calculator.h.

Constructor & Destructor Documentation

◆ NrBearerStatsCalculator() [1/2]

ns3::NrBearerStatsCalculator::NrBearerStatsCalculator ( )

Class constructor

Definition at line 24 of file nr-bearer-stats-calculator.cc.

◆ NrBearerStatsCalculator() [2/2]

ns3::NrBearerStatsCalculator::NrBearerStatsCalculator ( std::string  protocolType)

Class constructor

Definition at line 32 of file nr-bearer-stats-calculator.cc.

◆ ~NrBearerStatsCalculator()

ns3::NrBearerStatsCalculator::~NrBearerStatsCalculator ( )
override

Class destructor

Definition at line 40 of file nr-bearer-stats-calculator.cc.

Member Function Documentation

◆ DlRxPdu()

void ns3::NrBearerStatsCalculator::DlRxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize,
uint64_t  delay 
)
overridevirtual

Notifies the stats calculator that an downlink reception has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who received the PDU
rntiC-RNTI of the UE who received the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes
delayRLC to RLC delay in nanoseconds

Implements ns3::NrBearerStatsBase.

Definition at line 196 of file nr-bearer-stats-calculator.cc.

◆ DlTxPdu()

void ns3::NrBearerStatsCalculator::DlTxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize 
)
overridevirtual

Notifies the stats calculator that an downlink transmission has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who is receiving the PDU
rntiC-RNTI of the UE who is receiving the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes

Implements ns3::NrBearerStatsBase.

Definition at line 145 of file nr-bearer-stats-calculator.cc.

◆ GetDlCellId()

uint32_t ns3::NrBearerStatsCalculator::GetDlCellId ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the attached Enb cellId.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
Enb cellId

Definition at line 547 of file nr-bearer-stats-calculator.cc.

◆ GetDlDelay()

double ns3::NrBearerStatsCalculator::GetDlDelay ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink RLC to RLC delay

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay in seconds

Definition at line 555 of file nr-bearer-stats-calculator.cc.

◆ GetDlDelayStats()

std::vector< double > ns3::NrBearerStatsCalculator::GetDlDelayStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink RLC to RLC statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay statistics average, min, max and standard deviation in seconds

Definition at line 569 of file nr-bearer-stats-calculator.cc.

◆ GetDlOutputFilename()

std::string ns3::NrBearerStatsCalculator::GetDlOutputFilename ( )

return DL output file name

Definition at line 626 of file nr-bearer-stats-calculator.cc.

◆ GetDlPduSizeStats()

std::vector< double > ns3::NrBearerStatsCalculator::GetDlPduSizeStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the downlink PDU size statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
PDU size statistics average, min, max and standard deviation in seconds

Definition at line 591 of file nr-bearer-stats-calculator.cc.

◆ GetDlRxData()

uint64_t ns3::NrBearerStatsCalculator::GetDlRxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 531 of file nr-bearer-stats-calculator.cc.

◆ GetDlRxPackets()

uint32_t ns3::NrBearerStatsCalculator::GetDlRxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 515 of file nr-bearer-stats-calculator.cc.

◆ GetDlTxData()

uint64_t ns3::NrBearerStatsCalculator::GetDlTxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 523 of file nr-bearer-stats-calculator.cc.

◆ GetDlTxPackets()

uint32_t ns3::NrBearerStatsCalculator::GetDlTxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted downlink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 507 of file nr-bearer-stats-calculator.cc.

◆ GetEpoch()

Time ns3::NrBearerStatsCalculator::GetEpoch ( ) const
Returns
the epoch duration

Definition at line 119 of file nr-bearer-stats-calculator.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetStartTime()

Time ns3::NrBearerStatsCalculator::GetStartTime ( ) const
Returns
the value of the StartTime attribute

Definition at line 106 of file nr-bearer-stats-calculator.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrBearerStatsCalculator::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 46 of file nr-bearer-stats-calculator.cc.

References GetEpoch(), GetStartTime(), SetEpoch(), and SetStartTime().

+ Here is the call graph for this function:

◆ GetUlCellId()

uint32_t ns3::NrBearerStatsCalculator::GetUlCellId ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the attached Enb cellId.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
Enb cellId

Definition at line 539 of file nr-bearer-stats-calculator.cc.

◆ GetUlDelay()

double ns3::NrBearerStatsCalculator::GetUlDelay ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink RLC to RLC delay

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay in seconds

Definition at line 449 of file nr-bearer-stats-calculator.cc.

◆ GetUlDelayStats()

std::vector< double > ns3::NrBearerStatsCalculator::GetUlDelayStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink RLC to RLC statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
RLC to RLC delay statistics average, min, max and standard deviation in seconds

Definition at line 463 of file nr-bearer-stats-calculator.cc.

◆ GetUlOutputFilename()

std::string ns3::NrBearerStatsCalculator::GetUlOutputFilename ( )
Returns
UL output file name

Definition at line 613 of file nr-bearer-stats-calculator.cc.

◆ GetUlPduSizeStats()

std::vector< double > ns3::NrBearerStatsCalculator::GetUlPduSizeStats ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the uplink PDU size statistics: average, min, max and standard deviation.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
PDU size statistics average, min, max and standard deviation in seconds

Definition at line 485 of file nr-bearer-stats-calculator.cc.

◆ GetUlRxData()

uint64_t ns3::NrBearerStatsCalculator::GetUlRxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received uplink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received data bytes

Definition at line 441 of file nr-bearer-stats-calculator.cc.

◆ GetUlRxPackets()

uint32_t ns3::NrBearerStatsCalculator::GetUlRxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of received uplink packets.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of received uplink packets

Definition at line 425 of file nr-bearer-stats-calculator.cc.

◆ GetUlTxData()

uint64_t ns3::NrBearerStatsCalculator::GetUlTxData ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted uplink data bytes.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted data bytes

Definition at line 433 of file nr-bearer-stats-calculator.cc.

◆ GetUlTxPackets()

uint32_t ns3::NrBearerStatsCalculator::GetUlTxPackets ( uint64_t  imsi,
uint8_t  lcid 
)

Gets the number of transmitted uplink packets.

Parameters
imsiIMSI of the UE
lcidLCID
Returns
number of transmitted uplink packets

Definition at line 417 of file nr-bearer-stats-calculator.cc.

◆ SetEpoch()

void ns3::NrBearerStatsCalculator::SetEpoch ( Time  e)
Parameters
ethe epoch duration

Definition at line 112 of file nr-bearer-stats-calculator.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetStartTime()

void ns3::NrBearerStatsCalculator::SetStartTime ( Time  t)
Parameters
tthe value of the StartTime attribute

Definition at line 99 of file nr-bearer-stats-calculator.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ UlRxPdu()

void ns3::NrBearerStatsCalculator::UlRxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize,
uint64_t  delay 
)
overridevirtual

Notifies the stats calculator that an uplink reception has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who received the PDU
rntiC-RNTI of the UE who received the PDU
lcidLCID through which the PDU has been received
packetSizesize of the PDU in bytes
delayRLC to RLC delay in nanoseconds

Implements ns3::NrBearerStatsBase.

Definition at line 165 of file nr-bearer-stats-calculator.cc.

◆ UlTxPdu()

void ns3::NrBearerStatsCalculator::UlTxPdu ( uint16_t  cellId,
uint64_t  imsi,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  packetSize 
)
overridevirtual

Notifies the stats calculator that an uplink transmission has occurred.

Parameters
cellIdCellId of the attached Enb
imsiIMSI of the UE who transmitted the PDU
rntiC-RNTI of the UE who transmitted the PDU
lcidLCID through which the PDU has been transmitted
packetSizesize of the PDU in bytes

Implements ns3::NrBearerStatsBase.

Definition at line 125 of file nr-bearer-stats-calculator.cc.


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