5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-bearer-stats-simple.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2022 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef NR_RADIO_BEARER_STATS_SIMPLE_H_
8#define NR_RADIO_BEARER_STATS_SIMPLE_H_
9
10#include "ns3/basic-data-calculators.h"
11#include "ns3/lte-common.h"
12#include "ns3/lte-stats-calculator.h"
13#include "ns3/object.h"
14#include "ns3/uinteger.h"
15
16#include <fstream>
17#include <string>
18
19namespace ns3
20{
21
22/*
23 * \ingroup helpers
24 *
25 * Defines the minimum set of functions that RLC or PDC stats class should implement.
26 * See also NrBearerStatsSimple and NrBearerStatsSimple.
27 */
28class NrBearerStatsBase : public Object
29{
30 public:
31 // Inherited from ns3::Object
36 static TypeId GetTypeId();
37 void DoDispose() override;
46 virtual void UlTxPdu(uint16_t cellId,
47 uint64_t imsi,
48 uint16_t rnti,
49 uint8_t lcid,
50 uint32_t packetSize) = 0;
60 virtual void UlRxPdu(uint16_t cellId,
61 uint64_t imsi,
62 uint16_t rnti,
63 uint8_t lcid,
64 uint32_t packetSize,
65 uint64_t delay) = 0;
74 virtual void DlTxPdu(uint16_t cellId,
75 uint64_t imsi,
76 uint16_t rnti,
77 uint8_t lcid,
78 uint32_t packetSize) = 0;
88 virtual void DlRxPdu(uint16_t cellId,
89 uint64_t imsi,
90 uint16_t rnti,
91 uint8_t lcid,
92 uint32_t packetSize,
93 uint64_t delay) = 0;
94};
95
108{
109 public:
114
118 NrBearerStatsSimple(std::string protocolType);
119
123 ~NrBearerStatsSimple() override;
124
125 // Inherited from ns3::Object
130 static TypeId GetTypeId();
131 void DoDispose() override;
132
137 std::string GetUlTxOutputFilename();
138
143 std::string GetUlRxOutputFilename();
144
149 std::string GetDlTxOutputFilename();
150
155 std::string GetDlRxOutputFilename();
156
165 void UlTxPdu(uint16_t cellId,
166 uint64_t imsi,
167 uint16_t rnti,
168 uint8_t lcid,
169 uint32_t packetSize) override;
170
180 void UlRxPdu(uint16_t cellId,
181 uint64_t imsi,
182 uint16_t rnti,
183 uint8_t lcid,
184 uint32_t packetSize,
185 uint64_t delay) override;
186
195 void DlTxPdu(uint16_t cellId,
196 uint64_t imsi,
197 uint16_t rnti,
198 uint8_t lcid,
199 uint32_t packetSize) override;
200
210 void DlRxPdu(uint16_t cellId,
211 uint64_t imsi,
212 uint16_t rnti,
213 uint8_t lcid,
214 uint32_t packetSize,
215 uint64_t delay) override;
216
217 private:
221 std::string m_protocolType;
222 std::string m_dlRlcTxOutputFilename;
223 std::string m_dlRlcRxOutputFilename;
224 std::string m_ulRlcTxOutputFilename;
225 std::string m_ulRlcRxOutputFilename;
226 std::string m_dlPdcpTxOutputFilename;
227 std::string m_dlPdcpRxOutputFilename;
228 std::string m_ulPdcpTxOutputFilename;
229 std::string m_ulPdcpRxOutputFilename;
230 std::ofstream m_dlTxOutFile;
231 std::ofstream m_dlRxOutFile;
232 std::ofstream m_ulTxOutFile;
233 std::ofstream m_ulRxOutFile;
234};
235
236} // namespace ns3
237
238#endif /* NR_RADIO_BEARER_STATS_SIMPLE_H_ */
virtual void UlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)=0
virtual void DlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)=0
virtual void UlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)=0
virtual void DlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)=0
This class writes RLC or PDC statistics to separate files:
void UlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) override
void DlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) override
void UlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize) override
void DlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay) override