5G-LENA nr-v3.1-14-g738b08bc
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-bearer-stats-connector.h
1// Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2// Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering, New York University
3//
4// SPDX-License-Identifier: GPL-2.0-only
5
6#ifndef NR_BEARER_STATS_CONNECTOR_H
7#define NR_BEARER_STATS_CONNECTOR_H
8
9#include <ns3/ptr.h>
10#include <ns3/simple-ref-count.h>
11
12#include <map>
13#include <set>
14
15namespace ns3
16{
17
18class NrBearerStatsBase;
19
32{
33 public:
36
41 void EnableRlcStats(Ptr<NrBearerStatsBase> rlcStats);
42
47 void EnablePdcpStats(Ptr<NrBearerStatsBase> pdcpStats);
48
52 void EnsureConnected();
53
54 // trace sinks, to be used with MakeBoundCallback
55
66 std::string context,
67 uint64_t imsi,
68 uint16_t cellid,
69 uint16_t rnti);
70
80 std::string context,
81 uint64_t imsi,
82 uint16_t cellid,
83 uint16_t rnti);
84
95 std::string context,
96 uint64_t imsi,
97 uint16_t cellid,
98 uint16_t rnti);
99
111 std::string context,
112 uint64_t imsi,
113 uint16_t cellid,
114 uint16_t rnti,
115 uint16_t targetCellId);
116
127 std::string context,
128 uint64_t imsi,
129 uint16_t cellid,
130 uint16_t rnti);
131
141 std::string context,
142 uint16_t cellid,
143 uint16_t rnti);
144
155 std::string context,
156 uint64_t imsi,
157 uint16_t cellid,
158 uint16_t rnti);
159
171 std::string context,
172 uint64_t imsi,
173 uint16_t cellid,
174 uint16_t rnti,
175 uint16_t targetCellId);
176
187 std::string context,
188 uint64_t imsi,
189 uint16_t cellid,
190 uint16_t rnti);
191
195 Ptr<NrBearerStatsBase> GetRlcStats();
199 Ptr<NrBearerStatsBase> GetPdcpStats();
200
201 private:
208 void StoreUeManagerPath(std::string ueManagerPath, uint16_t cellId, uint16_t rnti);
209
218 void ConnectSrb0Traces(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti);
219
227 void ConnectSrb1TracesUe(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti);
228
237 void ConnectTracesUeIfFirstTime(std::string context,
238 uint64_t imsi,
239 uint16_t cellid,
240 uint16_t rnti);
241
250 void ConnectTracesEnbIfFirstTime(std::string context,
251 uint64_t imsi,
252 uint16_t cellid,
253 uint16_t rnti);
254
262 void ConnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
263
272 void DisconnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
273
281 void ConnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
282
291 void DisconnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
292
293 Ptr<NrBearerStatsBase> m_rlcStats;
294 Ptr<NrBearerStatsBase> m_pdcpStats;
295
296 bool m_connected;
297 std::set<uint64_t>
298 m_imsiSeenUe;
299 std::set<uint64_t>
300 m_imsiSeenEnb;
301
305 struct CellIdRnti
306 {
307 uint16_t cellId;
308 uint16_t rnti;
309 };
310
314 friend bool operator<(const CellIdRnti& a, const CellIdRnti& b);
315
319 std::map<CellIdRnti, std::string> m_ueManagerPathByCellIdRnti;
320};
321
322} // namespace ns3
323
324#endif // NR_BEARER_STATS_CONNECTOR_H
static void NotifyHandoverStartEnb(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
static void NotifyConnectionSetupUe(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyRandomAccessSuccessfulUe(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyConnectionReconfigurationEnb(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Ptr< NrBearerStatsBase > GetPdcpStats()
static void NotifyHandoverEndOkUe(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
void EnablePdcpStats(Ptr< NrBearerStatsBase > pdcpStats)
static void NotifyHandoverStartUe(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
void EnableRlcStats(Ptr< NrBearerStatsBase > rlcStats)
Ptr< NrBearerStatsBase > GetRlcStats()
static void NotifyHandoverEndOkEnb(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
static void NotifyConnectionReconfigurationUe(NrBearerStatsConnector *c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
friend bool operator<(const CellIdRnti &a, const CellIdRnti &b)
static void NotifyNewUeContextEnb(NrBearerStatsConnector *c, std::string context, uint16_t cellid, uint16_t rnti)