ns3::NrBearerStatsCalculator class

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

Public static functions

static auto GetTypeId() -> TypeId

Constructors, destructors, conversion operators

NrBearerStatsCalculator()
NrBearerStatsCalculator(std::string protocolType)
~NrBearerStatsCalculator() override

Public functions

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
auto GetDlCellId(uint64_t imsi, uint8_t lcid) -> uint32_t
auto GetDlDelay(uint64_t imsi, uint8_t lcid) -> double
auto GetDlDelayStats(uint64_t imsi, uint8_t lcid) -> std::vector<double>
auto GetDlOutputFilename() -> std::string
auto GetDlPduSizeStats(uint64_t imsi, uint8_t lcid) -> std::vector<double>
auto GetDlRxData(uint64_t imsi, uint8_t lcid) -> uint64_t
auto GetDlRxPackets(uint64_t imsi, uint8_t lcid) -> uint32_t
auto GetDlTxData(uint64_t imsi, uint8_t lcid) -> uint64_t
auto GetDlTxPackets(uint64_t imsi, uint8_t lcid) -> uint32_t
auto GetEpoch() const -> Time
auto GetStartTime() const -> Time
auto GetUlCellId(uint64_t imsi, uint8_t lcid) -> uint32_t
auto GetUlDelay(uint64_t imsi, uint8_t lcid) -> double
auto GetUlDelayStats(uint64_t imsi, uint8_t lcid) -> std::vector<double>
auto GetUlOutputFilename() -> std::string
auto GetUlPduSizeStats(uint64_t imsi, uint8_t lcid) -> std::vector<double>
auto GetUlRxData(uint64_t imsi, uint8_t lcid) -> uint64_t
auto GetUlRxPackets(uint64_t imsi, uint8_t lcid) -> uint32_t
auto GetUlTxData(uint64_t imsi, uint8_t lcid) -> uint64_t
auto GetUlTxPackets(uint64_t imsi, uint8_t lcid) -> uint32_t
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

Function documentation

static TypeId ns3::NrBearerStatsCalculator::GetTypeId()

Returns The object TypeId.

Register this type.

ns3::NrBearerStatsCalculator::NrBearerStatsCalculator()

Class constructor

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

Class constructor

ns3::NrBearerStatsCalculator::~NrBearerStatsCalculator() override

Class destructor

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

Parameters
cellId CellId of the attached Enb
imsi IMSI of the UE who received the PDU
rnti C-RNTI of the UE who received the PDU
lcid LCID through which the PDU has been transmitted
packetSize size of the PDU in bytes
delay RLC to RLC delay in nanoseconds

Notifies the stats calculator that an downlink reception has occurred.

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

Parameters
cellId CellId of the attached Enb
imsi IMSI of the UE who is receiving the PDU
rnti C-RNTI of the UE who is receiving the PDU
lcid LCID through which the PDU has been transmitted
packetSize size of the PDU in bytes

Notifies the stats calculator that an downlink transmission has occurred.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns Enb cellId

Gets the attached Enb cellId.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns RLC to RLC delay in seconds

Gets the downlink RLC to RLC delay

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns RLC to RLC delay statistics average, min, max and standard deviation in seconds

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

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

return DL output file name

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns PDU size statistics average, min, max and standard deviation in seconds

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

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of received data bytes

Gets the number of received downlink data bytes.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of received data bytes

Gets the number of received downlink data bytes.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of transmitted data bytes

Gets the number of transmitted downlink data bytes.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of transmitted data bytes

Gets the number of transmitted downlink data bytes.

Time ns3::NrBearerStatsCalculator::GetEpoch() const

Returns the epoch duration

Time ns3::NrBearerStatsCalculator::GetStartTime() const

Returns the value of the StartTime attribute

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns Enb cellId

Gets the attached Enb cellId.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns RLC to RLC delay in seconds

Gets the uplink RLC to RLC delay

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns RLC to RLC delay statistics average, min, max and standard deviation in seconds

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

std::string ns3::NrBearerStatsCalculator::GetUlOutputFilename()

Returns UL output file name

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns PDU size statistics average, min, max and standard deviation in seconds

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

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of received data bytes

Gets the number of received uplink data bytes.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of received uplink packets

Gets the number of received uplink packets.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of transmitted data bytes

Gets the number of transmitted uplink data bytes.

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

Parameters
imsi IMSI of the UE
lcid LCID
Returns number of transmitted uplink packets

Gets the number of transmitted uplink packets.

void ns3::NrBearerStatsCalculator::SetEpoch(Time e)

Parameters
e the epoch duration

void ns3::NrBearerStatsCalculator::SetStartTime(Time t)

Parameters
t the value of the StartTime attribute

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

Parameters
cellId CellId of the attached Enb
imsi IMSI of the UE who received the PDU
rnti C-RNTI of the UE who received the PDU
lcid LCID through which the PDU has been received
packetSize size of the PDU in bytes
delay RLC to RLC delay in nanoseconds

Notifies the stats calculator that an uplink reception has occurred.

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

Parameters
cellId CellId of the attached Enb
imsi IMSI of the UE who transmitted the PDU
rnti C-RNTI of the UE who transmitted the PDU
lcid LCID through which the PDU has been transmitted
packetSize size of the PDU in bytes

Notifies the stats calculator that an uplink transmission has occurred.