5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-bearer-stats-connector.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4// Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering, New York University
5//
6// SPDX-License-Identifier: GPL-2.0-only
7
8#ifndef NR_BEARER_STATS_CONNECTOR_H
9#define NR_BEARER_STATS_CONNECTOR_H
10
11#include <ns3/ptr.h>
12#include <ns3/simple-ref-count.h>
13
14#include <map>
15#include <set>
16
17namespace ns3
18{
19
20class NrBearerStatsBase;
21
34{
35 public:
38
43 void EnableRlcStats(Ptr<NrBearerStatsBase> rlcStats);
44
49 void EnablePdcpStats(Ptr<NrBearerStatsBase> pdcpStats);
50
54 void EnsureConnected();
55
56 // trace sinks, to be used with MakeBoundCallback
57
68 std::string context,
69 uint64_t imsi,
70 uint16_t cellid,
71 uint16_t rnti);
72
82 std::string context,
83 uint64_t imsi,
84 uint16_t cellid,
85 uint16_t rnti);
86
97 std::string context,
98 uint64_t imsi,
99 uint16_t cellid,
100 uint16_t rnti);
101
113 std::string context,
114 uint64_t imsi,
115 uint16_t cellid,
116 uint16_t rnti,
117 uint16_t targetCellId);
118
129 std::string context,
130 uint64_t imsi,
131 uint16_t cellid,
132 uint16_t rnti);
133
143 std::string context,
144 uint16_t cellid,
145 uint16_t rnti);
146
157 std::string context,
158 uint64_t imsi,
159 uint16_t cellid,
160 uint16_t rnti);
161
173 std::string context,
174 uint64_t imsi,
175 uint16_t cellid,
176 uint16_t rnti,
177 uint16_t targetCellId);
178
189 std::string context,
190 uint64_t imsi,
191 uint16_t cellid,
192 uint16_t rnti);
193
197 Ptr<NrBearerStatsBase> GetRlcStats();
201 Ptr<NrBearerStatsBase> GetPdcpStats();
202
203 private:
210 void StoreUeManagerPath(std::string ueManagerPath, uint16_t cellId, uint16_t rnti);
211
220 void ConnectSrb0Traces(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti);
221
229 void ConnectSrb1TracesUe(std::string ueRrcPath, uint64_t imsi, uint16_t cellId, uint16_t rnti);
230
239 void ConnectTracesUeIfFirstTime(std::string context,
240 uint64_t imsi,
241 uint16_t cellid,
242 uint16_t rnti);
243
252 void ConnectTracesEnbIfFirstTime(std::string context,
253 uint64_t imsi,
254 uint16_t cellid,
255 uint16_t rnti);
256
264 void ConnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
265
274 void DisconnectTracesUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
275
283 void ConnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
284
293 void DisconnectTracesEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
294
295 Ptr<NrBearerStatsBase> m_rlcStats;
296 Ptr<NrBearerStatsBase> m_pdcpStats;
297
298 bool m_connected;
299 std::set<uint64_t>
300 m_imsiSeenUe;
301 std::set<uint64_t>
302 m_imsiSeenEnb;
303
307 struct CellIdRnti
308 {
309 uint16_t cellId;
310 uint16_t rnti;
311 };
312
316 friend bool operator<(const CellIdRnti& a, const CellIdRnti& b);
317
321 std::map<CellIdRnti, std::string> m_ueManagerPathByCellIdRnti;
322};
323
324} // namespace ns3
325
326#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)