|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
63 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
80 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
96 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
113 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
121 : m_connected (false)
148 Config::Connect (
"/NodeList/*/DeviceList/*/LteUeRrc/RandomAccessSuccessful",
165 std::string ueManagerPath;
166 ueManagerPath = context.substr (0, context.rfind (
"/")) +
"/UeMap/" + std::to_string (rnti);
194 NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
208 NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
216 std::string ueRrcPath = context.substr (0, context.rfind (
"/"));
223 std::string ueManagerPath = it->second;
229 arg->cellId = cellId;
246 std::string ueRrcPath = context.substr (0, context.rfind (
"/"));
253 std::string ueManagerPath = it->second;
259 arg->cellId = cellId;
274 arg->cellId = cellId;
290 NS_LOG_FUNCTION (
this << context << imsi << cellId << rnti << (uint16_t)lcid);
291 NS_LOG_LOGIC (
"expected context should match /NodeList/*/DeviceList/*/LteEnbRrc/");
292 std::string basePath;
293 basePath = context.substr (0, context.rfind (
"/")) +
"/DataRadioBearerMap/" + std::to_string (lcid - 2);
299 arg->cellId = cellId;
310 arg->cellId = cellId;
316 if (!foundTxPdcp && !foundRxPdcp)
318 NS_LOG_WARN (
"Unable to connect PDCP traces. This may happen if RlcSm is used");
326 NS_LOG_FUNCTION (
this << context << imsi << cellId << rnti << (uint16_t)lcid);
327 NS_LOG_LOGIC (
"expected context should match /NodeList/*/DeviceList/*/LteUeRrc/");
328 std::string basePath;
329 basePath = context.substr (0, context.rfind (
"/")) +
"/DataRadioBearerMap/" + std::to_string (lcid);
335 arg->cellId = cellId;
346 arg->cellId = cellId;
352 if (!foundTxPdcp && !foundRxPdcp)
354 NS_LOG_WARN (
"Unable to connect PDCP traces. This may happen if RlcSm is used");
static void CreatedDrbUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid)
Function hooked to DrbCreated trace source at UE RRC, which is fired when DRB is created,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void ConnectTracesDrbUe(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
Connects DRB trace sources at UE to RLC and PDCP calculators.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< RadioBearerStatsCalculator > m_pdcpStats
Calculator for PDCP Statistics.
std::map< CellIdRnti, std::string > m_ueManagerPathByCellIdRnti
List UE Manager Paths by CellIdRnti.
void EnablePdcpStats(Ptr< RadioBearerStatsCalculator > pdcpStats)
Enables trace sinks for PDCP layer.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator<(const EventId &a, const EventId &b)
This class is very useful when user needs to collect statistics from PDCP and RLC.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
A template-based reference counting class.
Ptr< RadioBearerStatsCalculator > m_rlcStats
Calculator for RLC Statistics.
static void CreatedSrb1Ue(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Function hooked to Srb1Created trace source at UE RRC, which is fired when SRB1 is created,...
static void CreatedDrbEnb(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid)
Function hooked to DrbCreated trace source at UE manager in eNB RRC, which is fired when DRB is creat...
void EnableRlcStats(Ptr< RadioBearerStatsCalculator > rlcStats)
Enables trace sinks for RLC layer.
void ConnectTracesSrb0(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connects SRB0 trace sources at UE and eNB 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.
void ConnectTracesDrbEnb(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
Connects DRB trace sources at eNB to RLC and PDCP calculators.
void StoreUeManagerPath(std::string ueManagerPath, uint16_t cellId, uint16_t rnti)
Creates UE Manager path and stores it in m_ueManagerPathByCellIdRnti.
Smart pointer class similar to boost::intrusive_ptr.
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.
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.
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 ConnectTracesSrb1(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connects SRB1 trace sources at UE and eNB to RLC and PDCP calculators.
bool ConnectFailSafe(std::string path, const CallbackBase &cb)
This function will attempt to find all trace sources which match the input path and will then connect...
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 EnsureConnected()
Connects trace sinks to appropriate trace sources.
bool m_connected
true if traces are connected to sinks, initially set to false
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void Connect(std::string path, const CallbackBase &cb)
RadioBearerStatsConnector()
Constructor.
static const uint32_t packetSize
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
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...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
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...
Ptr< RadioBearerStatsCalculator > stats
statistics calculator
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.
Struct used as key in m_ueManagerPathByCellIdRnti map.
This structure is used as interface between trace sources and RadioBearerStatsCalculator.