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>
56 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
58 NS_LOG_LOGIC (path << rnti << (uint16_t)lcid << packetSize);
64 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
66 NS_LOG_LOGIC (path << rnti << (uint16_t)lcid << packetSize << delay);
67 arg->
stats->DlRxPdu (arg->
cellId, arg->
imsi, rnti, lcid, packetSize, delay);
74 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
76 NS_LOG_LOGIC (path << rnti << (uint16_t)lcid << packetSize);
83 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
85 NS_LOG_LOGIC (path << rnti << (uint16_t)lcid << packetSize << delay);
87 arg->
stats->UlRxPdu (arg->
cellId, arg->
imsi, rnti, lcid, packetSize, delay);
119 Config::Connect (
"/NodeList/*/DeviceList/*/LteUeRrc/RandomAccessSuccessful",
121 Config::Connect (
"/NodeList/*/DeviceList/*/LteEnbRrc/ConnectionReconfiguration",
123 Config::Connect (
"/NodeList/*/DeviceList/*/LteUeRrc/ConnectionReconfiguration",
195 std::ostringstream ueManagerPath;
196 ueManagerPath << context.substr (0, context.rfind (
"/")) <<
"/UeMap/" << (uint32_t) rnti;
207 std::string ueRrcPath = context.substr (0, context.rfind (
"/"));
213 std::string ueManagerPath = it->second;
214 NS_LOG_LOGIC (
this <<
" ueManagerPath: " << ueManagerPath);
221 arg->cellId = cellId;
254 arg->cellId = cellId;
273 arg->cellId = cellId;
284 arg->cellId = cellId;
319 NS_LOG_LOGIC (
this <<
"expected context should match /NodeList/*/DeviceList/*/LteUeRrc/");
320 std::string basePath = context.substr (0, context.rfind (
"/"));
325 arg->cellId = cellId;
341 arg->cellId = cellId;
358 NS_LOG_LOGIC (
this <<
"expected context should match /NodeList/*/DeviceList/*/LteEnbRrc/");
359 std::ostringstream basePath;
360 basePath << context.substr (0, context.rfind (
"/")) <<
"/UeMap/" << (uint32_t) rnti;
365 arg->cellId = cellId;
367 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LteRlc/RxPDU",
369 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LteRlc/TxPDU",
384 arg->cellId = cellId;
386 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LtePdcp/TxPDU",
388 Config::Connect (basePath.str () +
"/DataRadioBearerMap/*/LtePdcp/RxPDU",
static void NotifyRandomAccessSuccessfulUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void ConnectTracesEnbIfFirstTime(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
RadioBearerStatsConnector()
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
std::set< uint64_t > m_imsiSeenUe
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Build bound Callbacks which take varying numbers of arguments, and potentially returning a value...
void Disconnect(std::string path, const CallbackBase &cb)
#define NS_ASSERT(condition)
static void NotifyHandoverEndOkUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void EnablePdcpStats(Ptr< RadioBearerStatsCalculator > pdcpStats)
Ptr< RadioBearerStatsCalculator > m_pdcpStats
bool operator<(const Room &a, const Room &b)
Ptr< RadioBearerStatsCalculator > stats
void Connect(std::string path, const CallbackBase &cb)
void UlRxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
void DisconnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
NS_LOG_COMPONENT_DEFINE("RadioBearerStatsConnector")
void ConnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void DlRxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
void EnableRlcStats(Ptr< RadioBearerStatsCalculator > rlcStats)
std::set< uint64_t > m_imsiSeenEnb
#define NS_LOG_LOGIC(msg)
static void NotifyHandoverStartEnb(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
static void NotifyNewUeContextEnb(RadioBearerStatsConnector *c, std::string context, uint16_t cellid, uint16_t rnti)
void ConnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void DlTxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
std::map< CellIdRnti, std::string > m_ueManagerPathByCellIdRnti
static void NotifyConnectionSetupUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyConnectionReconfigurationEnb(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyConnectionReconfigurationUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void UlTxPduCallback(Ptr< BoundCallbackArgument > arg, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
void ConnectSrb1TracesUe(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti)
static void NotifyHandoverEndOkEnb(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyHandoverStartUe(RadioBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
void DisconnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Ptr< RadioBearerStatsCalculator > m_rlcStats
void ConnectTracesUeIfFirstTime(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
A template-based reference counting class.
void StoreUeManagerPath(std::string ueManagerPath, uint16_t cellId, uint16_t rnti)
void ConnectSrb0Traces(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti)