A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
eps-bearer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef EPS_BEARER
21#define EPS_BEARER
22
23#include <ns3/object-base.h>
24#include <ns3/uinteger.h>
25
26#include <unordered_map>
27
28namespace ns3
29{
30
36{
41
42 uint64_t gbrDl;
43 uint64_t gbrUl;
44 uint64_t mbrDl;
45 uint64_t mbrUl;
46};
47
53{
58 uint8_t priorityLevel;
61};
62
90class EpsBearer : public ObjectBase
91{
92 public:
97 static TypeId GetTypeId();
98
99 TypeId GetInstanceTypeId() const override;
100
105 enum Qci : uint8_t
106 {
114 GBR_V2X = 75,
117 6,
120 8,
122 9,
124 69,
126 NGBR_V2X = 79,
129 82,
131 83,
132 DGBR_ITS = 84,
134 85,
135 };
136
138
141
146 EpsBearer();
147
153 EpsBearer(Qci x);
154
162
167 EpsBearer(const EpsBearer& o);
168
172 ~EpsBearer() override
173 {
174 }
175
188 void SetRelease(uint8_t release);
189
194 uint8_t GetRelease() const
195 {
196 return m_release;
197 }
198
203 bool IsGbr() const;
204
210 uint8_t GetPriority() const;
211
219 uint16_t GetPacketDelayBudgetMs() const;
220
228 double GetPacketErrorLossRate() const;
229
230 private:
237 struct QciHash
238 {
244 std::size_t operator()(const Qci& s) const noexcept
245 {
246 return std::hash<uint8_t>{}(s);
247 }
248 };
249
256 typedef std::
257 unordered_map<Qci, std::tuple<bool, uint8_t, uint16_t, double, uint32_t, uint32_t>, QciHash>
259
267 {
268 return std::get<0>(map.at(qci));
269 }
270
277 static uint8_t GetPriority(const BearerRequirementsMap& map, Qci qci)
278 {
279 return std::get<1>(map.at(qci));
280 }
281
289 {
290 return std::get<2>(map.at(qci));
291 }
292
300 {
301 return std::get<3>(map.at(qci));
302 }
303
311 {
312 return std::get<4>(map.at(qci));
313 }
314
322 {
323 return std::get<5>(map.at(qci));
324 }
325
338
351
358
359 uint8_t m_release{30};
360};
361
362} // namespace ns3
363
364#endif // EPS_BEARER
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
static uint32_t GetAvgWindow(const BearerRequirementsMap &map, Qci qci)
Get default averaging window for the selected QCI.
Definition: eps-bearer.h:321
static double GetPacketErrorLossRate(const BearerRequirementsMap &map, Qci qci)
Get packet error rate for the selected QCI.
Definition: eps-bearer.h:299
static BearerRequirementsMap * GetRequirementsRel15()
Retrieve requirements for Rel.
Definition: eps-bearer.cc:181
void SetRelease(uint8_t release)
SetRelease.
Definition: eps-bearer.cc:101
static BearerRequirementsMap * GetRequirementsRel11()
Retrieve requirements for Rel.
Definition: eps-bearer.cc:146
AllocationRetentionPriority arp
allocation retention priority
Definition: eps-bearer.h:140
BearerRequirementsMap * m_requirements
Requirements pointer per bearer.
Definition: eps-bearer.h:357
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: eps-bearer.cc:65
std::unordered_map< Qci, std::tuple< bool, uint8_t, uint16_t, double, uint32_t, uint32_t >, QciHash > BearerRequirementsMap
Map between QCI and requirements.
Definition: eps-bearer.h:258
uint8_t GetPriority() const
Definition: eps-bearer.cc:128
uint8_t GetRelease() const
GetRelease.
Definition: eps-bearer.h:194
static uint32_t GetMaxDataBurst(const BearerRequirementsMap &map, Qci qci)
Get maximum data burst for the selected QCI.
Definition: eps-bearer.h:310
uint16_t GetPacketDelayBudgetMs() const
Definition: eps-bearer.cc:134
double GetPacketErrorLossRate() const
Definition: eps-bearer.cc:140
static uint8_t GetPriority(const BearerRequirementsMap &map, Qci qci)
Get priority for the selected QCI.
Definition: eps-bearer.h:277
Qci qci
Qos class indicator.
Definition: eps-bearer.h:137
bool IsGbr() const
Definition: eps-bearer.cc:122
static uint16_t GetPacketDelayBudgetMs(const BearerRequirementsMap &map, Qci qci)
Get packet delay in ms for the selected QCI.
Definition: eps-bearer.h:288
GbrQosInformation gbrQosInfo
GBR QOS information.
Definition: eps-bearer.h:139
~EpsBearer() override
Deconstructor.
Definition: eps-bearer.h:172
uint8_t m_release
Release (10 or 15)
Definition: eps-bearer.h:359
static uint32_t IsGbr(const BearerRequirementsMap &map, Qci qci)
Is the selected QCI GBR?
Definition: eps-bearer.h:266
static TypeId GetTypeId()
Get the type ID.
Definition: eps-bearer.cc:46
EpsBearer()
Default constructor.
Definition: eps-bearer.cc:70
Qci
QoS Class Indicator.
Definition: eps-bearer.h:106
@ GBR_CONV_VOICE
GBR Conversational Voice.
Definition: eps-bearer.h:107
@ NGBR_VIDEO_TCP_DEFAULT
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:121
@ DGBR_DISCRETE_AUT_LARGE
Delay-Critical GBR Discrete Automation Large Packets (TS 22.261)
Definition: eps-bearer.h:130
@ GBR_MC_PUSH_TO_TALK
GBR Mission Critical User Plane Push To Talk voice.
Definition: eps-bearer.h:111
@ GBR_NON_CONV_VIDEO
GBR Non-Conversational Video (Buffered Streaming)
Definition: eps-bearer.h:110
@ GBR_V2X
GBR V2X Messages.
Definition: eps-bearer.h:114
@ GBR_GAMING
GBR Real Time Gaming.
Definition: eps-bearer.h:109
@ GBR_MC_VIDEO
GBR Mission Critical Video User Plane.
Definition: eps-bearer.h:113
@ DGBR_ITS
Delay-Critical GBR Intelligent Transport Systems (TS 22.261)
Definition: eps-bearer.h:132
@ NGBR_V2X
Non-GBR V2X Messages.
Definition: eps-bearer.h:126
@ NGBR_LOW_LAT_EMBB
Non-GBR Low Latency eMBB applications.
Definition: eps-bearer.h:127
@ GBR_CONV_VIDEO
GBR Conversational Video (Live streaming)
Definition: eps-bearer.h:108
@ DGBR_DISCRETE_AUT_SMALL
Delay-Critical GBR Discrete Automation Small Packets (TS 22.261)
Definition: eps-bearer.h:128
@ DGBR_ELECTRICITY
Delay-Critical GBR Electricity Distribution High Voltage (TS 22.261)
Definition: eps-bearer.h:133
@ NGBR_VOICE_VIDEO_GAMING
Non-GBR Voice, Video, Interactive Streaming.
Definition: eps-bearer.h:118
@ NGBR_MC_DATA
Non-GBR Mission Critical Data.
Definition: eps-bearer.h:125
@ NGBR_VIDEO_TCP_OPERATOR
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:116
@ NGBR_MC_DELAY_SIGNAL
Non-GBR Mission Critical Delay Sensitive Signalling (e.g., MC-PTT)
Definition: eps-bearer.h:123
@ NGBR_IMS
Non-GBR IMS Signalling.
Definition: eps-bearer.h:115
@ NGBR_VIDEO_TCP_PREMIUM
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:119
@ GBR_NMC_PUSH_TO_TALK
GBR Non-Mission-Critical User Plane Push To Talk voice.
Definition: eps-bearer.h:112
Anchor the ns-3 type and attribute system.
Definition: object-base.h:173
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ release
Definition: ff-mac-common.h:70
3GPP 23.203 Section 6.1.7.3 Allocation and Retention Priority characteristics
Definition: eps-bearer.h:53
bool preemptionVulnerability
true if bearer can be preempted by others
Definition: eps-bearer.h:60
bool preemptionCapability
true if bearer can preempt others
Definition: eps-bearer.h:59
uint8_t priorityLevel
1-15; 1 = highest
Definition: eps-bearer.h:58
AllocationRetentionPriority()
Default constructor, initializes member variables to zero or equivalent.
Definition: eps-bearer.cc:38
std::size_t operator()(const Qci &s) const noexcept
Hash the QCI like a normal uint8_t.
Definition: eps-bearer.h:244
3GPP TS 36.413 9.2.1.18 GBR QoS Information
Definition: eps-bearer.h:36
uint64_t gbrDl
Guaranteed Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:42
GbrQosInformation()
Default constructor, initializes member variables to zero or equivalent.
Definition: eps-bearer.cc:30
uint64_t gbrUl
Guaranteed Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:43
uint64_t mbrDl
Maximum Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:44
uint64_t mbrUl
Maximum Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:45