A Discrete-Event Network Simulator
API
ns3::RadioBearerStatsConnector Class Reference

This class is very useful when user needs to collect statistics from PDCD and RLC. More...

#include "radio-bearer-stats-connector.h"

+ Collaboration diagram for ns3::RadioBearerStatsConnector:

Classes

struct  CellIdRnti
 Struct used as key in m_ueManagerPathByCellIdRnti map. More...
 

Public Member Functions

 RadioBearerStatsConnector ()
 Constructor. More...
 
void EnablePdcpStats (Ptr< RadioBearerStatsCalculator > pdcpStats)
 Enables trace sinks for PDCP layer. More...
 
void EnableRlcStats (Ptr< RadioBearerStatsCalculator > rlcStats)
 Enables trace sinks for RLC layer. More...
 
void EnsureConnected ()
 Connects trace sinks to appropriate trace sources. More...
 

Static Public Member Functions

static void NotifyConnectionReconfigurationEnb (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Function hooked to ConnectionReconfiguration trace source at eNB RRC, which is fired upon RRC connection reconfiguration. More...
 
static void NotifyConnectionReconfigurationUe (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Function hooked to ConnectionReconfiguration trace source at UE RRC, which is fired upon RRC connection reconfiguration. More...
 
static void NotifyConnectionSetupUe (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Sink connected source of UE Connection Setup trace. More...
 
static void NotifyHandoverEndOkEnb (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Function hooked to HandoverEndOk trace source at eNB RRC, which is fired upon successful termination of a handover procedure. More...
 
static void NotifyHandoverEndOkUe (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Function hooked to HandoverStart trace source at UE RRC, which is fired upon successful termination of a handover procedure. More...
 
static void NotifyHandoverStartEnb (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
 Function hooked to HandoverStart trace source at eNB RRC, which is fired upon start of a handover procedure. More...
 
static void NotifyHandoverStartUe (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
 Function hooked to HandoverStart trace source at UE RRC, which is fired upon start of a handover procedure. More...
 
static void NotifyNewUeContextEnb (RadioBearerStatsConnector *c, std::string context, uint16_t cellid, uint16_t rnti)
 Function hooked to NewUeContext trace source at eNB RRC, which is fired upon creation of a new UE context. More...
 
static void NotifyRandomAccessSuccessfulUe (RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Function hooked to RandomAccessSuccessful trace source at UE RRC, which is fired upon successful completion of the random access procedure. More...
 

Private Member Functions

void ConnectSrb0Traces (std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 Connects Srb0 trace sources at UE and eNB to RLC and PDCP calculators, and Srb1 trace sources at eNB to RLC and PDCP calculators,. More...
 
void ConnectSrb1TracesUe (std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 Connects Srb1 trace sources at UE to RLC and PDCP calculators. More...
 
void ConnectTracesEnb (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Connects all trace sources at eNB to RLC and PDCP calculators. More...
 
void ConnectTracesEnbIfFirstTime (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Connects all trace sources at eNB to RLC and PDCP calculators. More...
 
void ConnectTracesUe (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Connects all trace sources at UE to RLC and PDCP calculators. More...
 
void ConnectTracesUeIfFirstTime (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Connects all trace sources at UE to RLC and PDCP calculators. More...
 
void DisconnectTracesEnb (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Disconnects all trace sources at eNB to RLC and PDCP calculators. More...
 
void DisconnectTracesUe (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 Disconnects all trace sources at UE to RLC and PDCP calculators. More...
 
void StoreUeManagerPath (std::string ueManagerPath, uint16_t cellId, uint16_t rnti)
 Creates UE Manager path and stores it in m_ueManagerPathByCellIdRnti. More...
 

Private Attributes

bool m_connected
 true if traces are connected to sinks, initially set to false More...
 
std::set< uint64_t > m_imsiSeenEnb
 stores all eNBs for which RLC and PDCP traces were connected More...
 
std::set< uint64_t > m_imsiSeenUe
 stores all UEs for which RLC and PDCP traces were connected More...
 
Ptr< RadioBearerStatsCalculatorm_pdcpStats
 Calculator for PDCP Statistics. More...
 
Ptr< RadioBearerStatsCalculatorm_rlcStats
 Calculator for RLC Statistics. More...
 
std::map< CellIdRnti, std::string > m_ueManagerPathByCellIdRnti
 List UE Manager Paths by CellIdRnti. More...
 

Friends

bool operator< (const CellIdRnti &a, const CellIdRnti &b)
 Less than operator for CellIdRnti, because it is used as key in map. More...
 

Detailed Description

This class is very useful when user needs to collect statistics from PDCD and RLC.

It automatically connects RadioBearerStatsCalculator to appropriate trace sinks. Usually user do not use this class. All he/she needs to to do is to call: LteHelper::EnablePdcpTraces() and/or LteHelper::EnableRlcTraces().

Definition at line 50 of file radio-bearer-stats-connector.h.

Constructor & Destructor Documentation

ns3::RadioBearerStatsConnector::RadioBearerStatsConnector ( )

Constructor.

Definition at line 129 of file radio-bearer-stats-connector.cc.

Member Function Documentation

void ns3::RadioBearerStatsConnector::ConnectSrb0Traces ( std::string  ueRrcPath,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

Connects Srb0 trace sources at UE and eNB to RLC and PDCP calculators, and Srb1 trace sources at eNB to RLC and PDCP calculators,.

Parameters
ueRrcPath
imsi
cellId
rnti

Definition at line 241 of file radio-bearer-stats-connector.cc.

References ns3::RadioBearerStatsConnector::CellIdRnti::cellId, ns3::Config::Connect(), ns3::Config::Disconnect(), ns3::DlRxPduCallback(), ns3::DlTxPduCallback(), m_pdcpStats, m_rlcStats, m_ueManagerPathByCellIdRnti, ns3::MakeBoundCallback(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::RadioBearerStatsConnector::CellIdRnti::rnti, ns3::UlRxPduCallback(), and ns3::UlTxPduCallback().

Referenced by NotifyRandomAccessSuccessfulUe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::ConnectSrb1TracesUe ( std::string  ueRrcPath,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

Connects Srb1 trace sources at UE to RLC and PDCP calculators.

Parameters
ueRrcPath
imsi
cellId
rnti

Definition at line 303 of file radio-bearer-stats-connector.cc.

References ns3::Config::Connect(), ns3::DlRxPduCallback(), m_pdcpStats, m_rlcStats, ns3::MakeBoundCallback(), NS_LOG_FUNCTION, and ns3::UlTxPduCallback().

Referenced by NotifyConnectionSetupUe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::ConnectTracesEnb ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Connects all trace sources at eNB to RLC and PDCP calculators.

Parameters
context
imsi
cellid
rnti

Definition at line 392 of file radio-bearer-stats-connector.cc.

References ns3::Config::Connect(), ns3::DlTxPduCallback(), m_pdcpStats, m_rlcStats, ns3::MakeBoundCallback(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::UlRxPduCallback().

Referenced by ConnectTracesEnbIfFirstTime(), and NotifyHandoverEndOkEnb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::ConnectTracesEnbIfFirstTime ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Connects all trace sources at eNB to RLC and PDCP calculators.

This function can connect traces only once for eNB.

Parameters
context
imsi
cellid
rnti

Definition at line 342 of file radio-bearer-stats-connector.cc.

References ConnectTracesEnb(), m_imsiSeenEnb, and NS_LOG_FUNCTION.

Referenced by NotifyConnectionReconfigurationEnb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::ConnectTracesUe ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Connects all trace sources at UE to RLC and PDCP calculators.

Parameters
context
imsi
cellid
rnti

Definition at line 353 of file radio-bearer-stats-connector.cc.

References ns3::Config::Connect(), ns3::DlRxPduCallback(), m_pdcpStats, m_rlcStats, ns3::MakeBoundCallback(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::UlTxPduCallback().

Referenced by ConnectTracesUeIfFirstTime(), and NotifyHandoverEndOkUe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::ConnectTracesUeIfFirstTime ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Connects all trace sources at UE to RLC and PDCP calculators.

This function can connect traces only once for UE.

Parameters
context
imsi
cellid
rnti

Definition at line 331 of file radio-bearer-stats-connector.cc.

References ConnectTracesUe(), m_imsiSeenUe, and NS_LOG_FUNCTION.

Referenced by NotifyConnectionReconfigurationUe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::DisconnectTracesEnb ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Disconnects all trace sources at eNB to RLC and PDCP calculators.

Function is not implemented.

Parameters
context
imsi
cellid
rnti

Definition at line 442 of file radio-bearer-stats-connector.cc.

References NS_LOG_FUNCTION.

Referenced by NotifyHandoverStartEnb().

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::DisconnectTracesUe ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
private

Disconnects all trace sources at UE to RLC and PDCP calculators.

Function is not implemented.

Parameters
context
imsi
cellid
rnti

Definition at line 435 of file radio-bearer-stats-connector.cc.

References NS_LOG_FUNCTION.

Referenced by NotifyHandoverStartUe().

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::EnablePdcpStats ( Ptr< RadioBearerStatsCalculator pdcpStats)

Enables trace sinks for PDCP layer.

Usually, this function is called by LteHelper::EnablePdcpTraces().

Parameters
pdcpStatsstatistics calculator for PDCP layer

Definition at line 142 of file radio-bearer-stats-connector.cc.

References EnsureConnected(), and m_pdcpStats.

Referenced by ns3::LteHelper::EnablePdcpTraces().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::EnableRlcStats ( Ptr< RadioBearerStatsCalculator rlcStats)

Enables trace sinks for RLC layer.

Usually, this function is called by LteHelper::EnableRlcTraces().

Parameters
rlcStatsstatistics calculator for RLC layer

Definition at line 135 of file radio-bearer-stats-connector.cc.

References EnsureConnected(), and m_rlcStats.

Referenced by ns3::LteHelper::EnableRlcTraces().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::EnsureConnected ( )
void ns3::RadioBearerStatsConnector::NotifyConnectionReconfigurationEnb ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to ConnectionReconfiguration trace source at eNB RRC, which is fired upon RRC connection reconfiguration.

Parameters
c
context
imsi
cellid
rnti

Definition at line 211 of file radio-bearer-stats-connector.cc.

References ConnectTracesEnbIfFirstTime().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyConnectionReconfigurationUe ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to ConnectionReconfiguration trace source at UE RRC, which is fired upon RRC connection reconfiguration.

Parameters
c
context
imsi
cellid
rnti

Definition at line 187 of file radio-bearer-stats-connector.cc.

References ConnectTracesUeIfFirstTime().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyConnectionSetupUe ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Sink connected source of UE Connection Setup trace.

Not used.

Parameters
c
context
imsi
cellid
rnti

Definition at line 181 of file radio-bearer-stats-connector.cc.

References ConnectSrb1TracesUe().

+ Here is the call graph for this function:

void ns3::RadioBearerStatsConnector::NotifyHandoverEndOkEnb ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to HandoverEndOk trace source at eNB RRC, which is fired upon successful termination of a handover procedure.

Parameters
c
context
imsi
cellid
rnti

Definition at line 223 of file radio-bearer-stats-connector.cc.

References ConnectTracesEnb().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyHandoverEndOkUe ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to HandoverStart trace source at UE RRC, which is fired upon successful termination of a handover procedure.

Parameters
c
context
imsi
cellid
rnti

Definition at line 199 of file radio-bearer-stats-connector.cc.

References ConnectTracesUe().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyHandoverStartEnb ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti,
uint16_t  targetCellId 
)
static

Function hooked to HandoverStart trace source at eNB RRC, which is fired upon start of a handover procedure.

Parameters
c
context
imsi
cellid
rnti
targetCellId

Definition at line 217 of file radio-bearer-stats-connector.cc.

References DisconnectTracesEnb().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyHandoverStartUe ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti,
uint16_t  targetCellId 
)
static

Function hooked to HandoverStart trace source at UE RRC, which is fired upon start of a handover procedure.

Parameters
c
context
imsi
cellid
rnti
targetCellId

Definition at line 193 of file radio-bearer-stats-connector.cc.

References DisconnectTracesUe().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyNewUeContextEnb ( RadioBearerStatsConnector c,
std::string  context,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to NewUeContext trace source at eNB RRC, which is fired upon creation of a new UE context.

Parameters
c
context
cellid
rnti

Definition at line 205 of file radio-bearer-stats-connector.cc.

References StoreUeManagerPath().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::NotifyRandomAccessSuccessfulUe ( RadioBearerStatsConnector c,
std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)
static

Function hooked to RandomAccessSuccessful trace source at UE RRC, which is fired upon successful completion of the random access procedure.

Parameters
c
context
imsi
cellid
rnti

Definition at line 175 of file radio-bearer-stats-connector.cc.

References ConnectSrb0Traces().

Referenced by EnsureConnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RadioBearerStatsConnector::StoreUeManagerPath ( std::string  ueManagerPath,
uint16_t  cellId,
uint16_t  rnti 
)
private

Creates UE Manager path and stores it in m_ueManagerPathByCellIdRnti.

Parameters
ueManagerPath
cellId
rnti

Definition at line 229 of file radio-bearer-stats-connector.cc.

References ns3::RadioBearerStatsConnector::CellIdRnti::cellId, m_ueManagerPathByCellIdRnti, NS_LOG_FUNCTION, and ns3::RadioBearerStatsConnector::CellIdRnti::rnti.

Referenced by NotifyNewUeContextEnb().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

bool operator< ( const CellIdRnti a,
const CellIdRnti b 
)
friend

Less than operator for CellIdRnti, because it is used as key in map.

Definition at line 40 of file radio-bearer-stats-connector.cc.

Member Data Documentation

bool ns3::RadioBearerStatsConnector::m_connected
private

true if traces are connected to sinks, initially set to false

Definition at line 266 of file radio-bearer-stats-connector.h.

Referenced by EnsureConnected().

std::set<uint64_t> ns3::RadioBearerStatsConnector::m_imsiSeenEnb
private

stores all eNBs for which RLC and PDCP traces were connected

Definition at line 268 of file radio-bearer-stats-connector.h.

Referenced by ConnectTracesEnbIfFirstTime().

std::set<uint64_t> ns3::RadioBearerStatsConnector::m_imsiSeenUe
private

stores all UEs for which RLC and PDCP traces were connected

Definition at line 267 of file radio-bearer-stats-connector.h.

Referenced by ConnectTracesUeIfFirstTime().

Ptr<RadioBearerStatsCalculator> ns3::RadioBearerStatsConnector::m_pdcpStats
private

Calculator for PDCP Statistics.

Definition at line 264 of file radio-bearer-stats-connector.h.

Referenced by ConnectSrb0Traces(), ConnectSrb1TracesUe(), ConnectTracesEnb(), ConnectTracesUe(), and EnablePdcpStats().

Ptr<RadioBearerStatsCalculator> ns3::RadioBearerStatsConnector::m_rlcStats
private

Calculator for RLC Statistics.

Definition at line 263 of file radio-bearer-stats-connector.h.

Referenced by ConnectSrb0Traces(), ConnectSrb1TracesUe(), ConnectTracesEnb(), ConnectTracesUe(), and EnableRlcStats().

std::map<CellIdRnti, std::string> ns3::RadioBearerStatsConnector::m_ueManagerPathByCellIdRnti
private

List UE Manager Paths by CellIdRnti.

Definition at line 287 of file radio-bearer-stats-connector.h.

Referenced by ConnectSrb0Traces(), and StoreUeManagerPath().


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