27 #include <ns3/lte-enb-rrc.h> 28 #include <ns3/lte-enb-net-device.h> 29 #include <ns3/lte-ue-rrc.h> 30 #include <ns3/lte-ue-net-device.h> 69 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
86 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
102 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
120 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
130 : m_connected (false)
156 Config::Connect (
"/NodeList/*/DeviceList/*/LteUeRrc/RandomAccessSuccessful",
158 Config::Connect (
"/NodeList/*/DeviceList/*/LteEnbRrc/ConnectionReconfiguration",
160 Config::Connect (
"/NodeList/*/DeviceList/*/LteUeRrc/ConnectionReconfiguration",
232 std::ostringstream ueManagerPath;
233 ueManagerPath << context.substr (0, context.rfind (
"/")) <<
"/UeMap/" << (uint32_t) rnti;
244 std::string ueRrcPath = context.substr (0, context.rfind (
"/"));
250 std::string ueManagerPath = it->second;
251 NS_LOG_LOGIC (
this <<
" ueManagerPath: " << ueManagerPath);
258 arg->cellId = cellId;
291 arg->cellId = cellId;
310 arg->cellId = cellId;
321 arg->cellId = cellId;
356 NS_LOG_LOGIC (
this <<
"expected context should match /NodeList/*/DeviceList/*/LteUeRrc/");
357 std::string basePath = context.substr (0, context.rfind (
"/"));
362 arg->cellId = cellId;
378 arg->cellId = cellId;
395 NS_LOG_LOGIC (
this <<
"expected context should match /NodeList/*/DeviceList/*/LteEnbRrc/");
396 std::ostringstream basePath;
397 basePath << context.substr (0, context.rfind (
"/")) <<
"/UeMap/" << (uint32_t) rnti;
402 arg->cellId = cellId;
404 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LteRlc/RxPDU",
406 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LteRlc/TxPDU",
421 arg->cellId = cellId;
423 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LtePdcp/TxPDU",
425 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LtePdcp/RxPDU",
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 comp...
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.
RadioBearerStatsConnector()
Constructor.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::set< uint64_t > m_imsiSeenUe
stores all UEs for which RLC and PDCP traces were connected
Struct used as key in m_ueManagerPathByCellIdRnti map.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
bool m_connected
true if traces are connected to sinks, initially set to false
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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 o...
void EnablePdcpStats(Ptr< RadioBearerStatsCalculator > pdcpStats)
Enables trace sinks for PDCP layer.
Ptr< RadioBearerStatsCalculator > m_pdcpStats
Calculator for PDCP Statistics.
Ptr< RadioBearerStatsCalculator > stats
statistics calculator
void EnsureConnected()
Connects trace sinks to appropriate trace sources.
void UlRxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Callback function for UL RX statistics for both RLC and PDCP.
bool operator<(const EventId &a, const EventId &b)
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.
This structure is used as interface between trace sources and RadioBearerStatsCalculator.
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.
void DlRxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Callback function for DL RX statistics for both RLC and PDCP.
void EnableRlcStats(Ptr< RadioBearerStatsCalculator > rlcStats)
Enables trace sinks for RLC layer.
std::set< uint64_t > m_imsiSeenEnb
stores all eNBs for which RLC and PDCP traces were connected
void Connect(std::string path, const CallbackBase &cb)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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 pro...
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 con...
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
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.
void DlTxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Callback function for DL TX statistics for both RLC and PDCP.
std::map< CellIdRnti, std::string > m_ueManagerPathByCellIdRnti
List UE Manager Paths by CellIdRnti.
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.
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 connect...
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 connecti...
void UlTxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Callback function for UL TX statistics for both RLC and PDCP.
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.
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 ...
static const uint32_t packetSize
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 proc...
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.
Ptr< RadioBearerStatsCalculator > m_rlcStats
Calculator for RLC Statistics.
void Disconnect(std::string path, const CallbackBase &cb)
This class is very useful when user needs to collect statistics from PDCP and RLC.
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.
A template-based reference counting class.
void StoreUeManagerPath(std::string ueManagerPath, uint16_t cellId, uint16_t rnti)
Creates UE Manager path and stores it in m_ueManagerPathByCellIdRnti.
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 ...