This class is very useful when user needs to collect statistics from PDCD and RLC. More...
#include <radio-bearer-stats-connector.h>
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< RadioBearerStatsCalculator > | m_pdcpStats |
Calculator for PDCP Statistics. More... | |
Ptr< RadioBearerStatsCalculator > | m_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... | |
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.
ns3::RadioBearerStatsConnector::RadioBearerStatsConnector | ( | ) |
Constructor.
Definition at line 129 of file radio-bearer-stats-connector.cc.
|
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,.
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().
|
private |
Connects Srb1 trace sources at UE to RLC and PDCP calculators.
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().
|
private |
Connects all trace sources at eNB to RLC and PDCP calculators.
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().
|
private |
Connects all trace sources at eNB to RLC and PDCP calculators.
This function can connect traces only once for eNB.
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().
|
private |
Connects all trace sources at UE to RLC and PDCP calculators.
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().
|
private |
Connects all trace sources at UE to RLC and PDCP calculators.
This function can connect traces only once for UE.
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().
|
private |
Disconnects all trace sources at eNB to RLC and PDCP calculators.
Function is not implemented.
context | |
imsi | |
cellid | |
rnti |
Definition at line 442 of file radio-bearer-stats-connector.cc.
References NS_LOG_FUNCTION.
Referenced by NotifyHandoverStartEnb().
|
private |
Disconnects all trace sources at UE to RLC and PDCP calculators.
Function is not implemented.
context | |
imsi | |
cellid | |
rnti |
Definition at line 435 of file radio-bearer-stats-connector.cc.
References NS_LOG_FUNCTION.
Referenced by NotifyHandoverStartUe().
void ns3::RadioBearerStatsConnector::EnablePdcpStats | ( | Ptr< RadioBearerStatsCalculator > | pdcpStats | ) |
Enables trace sinks for PDCP layer.
Usually, this function is called by LteHelper::EnablePdcpTraces().
pdcpStats | statistics 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().
void ns3::RadioBearerStatsConnector::EnableRlcStats | ( | Ptr< RadioBearerStatsCalculator > | rlcStats | ) |
Enables trace sinks for RLC layer.
Usually, this function is called by LteHelper::EnableRlcTraces().
rlcStats | statistics 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().
void ns3::RadioBearerStatsConnector::EnsureConnected | ( | ) |
Connects trace sinks to appropriate trace sources.
Definition at line 149 of file radio-bearer-stats-connector.cc.
References ns3::Config::Connect(), m_connected, ns3::MakeBoundCallback(), NotifyConnectionReconfigurationEnb(), NotifyConnectionReconfigurationUe(), NotifyHandoverEndOkEnb(), NotifyHandoverEndOkUe(), NotifyHandoverStartEnb(), NotifyHandoverStartUe(), NotifyNewUeContextEnb(), NotifyRandomAccessSuccessfulUe(), and NS_LOG_FUNCTION.
Referenced by EnablePdcpStats(), and EnableRlcStats().
|
static |
Function hooked to ConnectionReconfiguration trace source at eNB RRC, which is fired upon RRC connection reconfiguration.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 211 of file radio-bearer-stats-connector.cc.
References ConnectTracesEnbIfFirstTime().
Referenced by EnsureConnected().
|
static |
Function hooked to ConnectionReconfiguration trace source at UE RRC, which is fired upon RRC connection reconfiguration.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 187 of file radio-bearer-stats-connector.cc.
References ConnectTracesUeIfFirstTime().
Referenced by EnsureConnected().
|
static |
Sink connected source of UE Connection Setup trace.
Not used.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 181 of file radio-bearer-stats-connector.cc.
References ConnectSrb1TracesUe().
|
static |
Function hooked to HandoverEndOk trace source at eNB RRC, which is fired upon successful termination of a handover procedure.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 223 of file radio-bearer-stats-connector.cc.
References ConnectTracesEnb().
Referenced by EnsureConnected().
|
static |
Function hooked to HandoverStart trace source at UE RRC, which is fired upon successful termination of a handover procedure.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 199 of file radio-bearer-stats-connector.cc.
References ConnectTracesUe().
Referenced by EnsureConnected().
|
static |
Function hooked to HandoverStart trace source at eNB RRC, which is fired upon start of a handover procedure.
c | |
context | |
imsi | |
cellid | |
rnti | |
targetCellId |
Definition at line 217 of file radio-bearer-stats-connector.cc.
References DisconnectTracesEnb().
Referenced by EnsureConnected().
|
static |
Function hooked to HandoverStart trace source at UE RRC, which is fired upon start of a handover procedure.
c | |
context | |
imsi | |
cellid | |
rnti | |
targetCellId |
Definition at line 193 of file radio-bearer-stats-connector.cc.
References DisconnectTracesUe().
Referenced by EnsureConnected().
|
static |
Function hooked to NewUeContext trace source at eNB RRC, which is fired upon creation of a new UE context.
c | |
context | |
cellid | |
rnti |
Definition at line 205 of file radio-bearer-stats-connector.cc.
References StoreUeManagerPath().
Referenced by EnsureConnected().
|
static |
Function hooked to RandomAccessSuccessful trace source at UE RRC, which is fired upon successful completion of the random access procedure.
c | |
context | |
imsi | |
cellid | |
rnti |
Definition at line 175 of file radio-bearer-stats-connector.cc.
References ConnectSrb0Traces().
Referenced by EnsureConnected().
|
private |
Creates UE Manager path and stores it in m_ueManagerPathByCellIdRnti.
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().
|
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.
|
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().
|
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().
|
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().
|
private |
Calculator for PDCP Statistics.
Definition at line 264 of file radio-bearer-stats-connector.h.
Referenced by ConnectSrb0Traces(), ConnectSrb1TracesUe(), ConnectTracesEnb(), ConnectTracesUe(), and EnablePdcpStats().
|
private |
Calculator for RLC Statistics.
Definition at line 263 of file radio-bearer-stats-connector.h.
Referenced by ConnectSrb0Traces(), ConnectSrb1TracesUe(), ConnectTracesEnb(), ConnectTracesUe(), and EnableRlcStats().
|
private |
List UE Manager Paths by CellIdRnti.
Definition at line 287 of file radio-bearer-stats-connector.h.
Referenced by ConnectSrb0Traces(), and StoreUeManagerPath().