A Discrete-Event Network Simulator
API
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 } qci;
136
139
144 EpsBearer();
145
151 EpsBearer(Qci x);
152
160
165 EpsBearer(const EpsBearer& o);
166
170 ~EpsBearer() override
171 {
172 }
173
186 void SetRelease(uint8_t release);
187
192 uint8_t GetRelease() const
193 {
194 return m_release;
195 }
196
201 bool IsGbr() const;
202
208 uint8_t GetPriority() const;
209
217 uint16_t GetPacketDelayBudgetMs() const;
218
226 double GetPacketErrorLossRate() const;
227
228 private:
235 struct QciHash
236 {
242 std::size_t operator()(const Qci& s) const noexcept
243 {
244 return std::hash<uint8_t>{}(s);
245 }
246 };
247
254 typedef std::
255 unordered_map<Qci, std::tuple<bool, uint8_t, uint16_t, double, uint32_t, uint32_t>, QciHash>
257
265 {
266 return std::get<0>(map.at(qci));
267 }
268
275 static uint8_t GetPriority(const BearerRequirementsMap& map, Qci qci)
276 {
277 return std::get<1>(map.at(qci));
278 }
279
287 {
288 return std::get<2>(map.at(qci));
289 }
290
298 {
299 return std::get<3>(map.at(qci));
300 }
301
309 {
310 return std::get<4>(map.at(qci));
311 }
312
320 {
321 return std::get<5>(map.at(qci));
322 }
323
336
349
356
357 uint8_t m_release{30};
358};
359
360} // namespace ns3
361
362#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:319
static double GetPacketErrorLossRate(const BearerRequirementsMap &map, Qci qci)
Get packet error rate for the selected QCI.
Definition: eps-bearer.h:297
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:138
BearerRequirementsMap * m_requirements
Requirements pointer per bearer.
Definition: eps-bearer.h:355
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:256
uint8_t GetPriority() const
Definition: eps-bearer.cc:128
uint8_t GetRelease() const
GetRelease.
Definition: eps-bearer.h:192
static uint32_t GetMaxDataBurst(const BearerRequirementsMap &map, Qci qci)
Get maximum data burst for the selected QCI.
Definition: eps-bearer.h:308
enum ns3::EpsBearer::Qci qci
Qos class indicator.
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:275
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:286
GbrQosInformation gbrQosInfo
GBR QOS information.
Definition: eps-bearer.h:137
~EpsBearer() override
Deconstructor.
Definition: eps-bearer.h:170
uint8_t m_release
Release (10 or 15)
Definition: eps-bearer.h:357
static uint32_t IsGbr(const BearerRequirementsMap &map, Qci qci)
Is the selected QCI GBR?
Definition: eps-bearer.h:264
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:170
a unique identifier for an interface.
Definition: type-id.h:60
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:242
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