A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
eps-bearer.cc
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#include "eps-bearer.h"
21
22#include <ns3/attribute-construction-list.h>
23#include <ns3/fatal-error.h>
24
25namespace ns3
26{
27
29
31 : gbrDl(0),
32 gbrUl(0),
33 mbrDl(0),
34 mbrUl(0)
35{
36}
37
39 : priorityLevel(0),
40 preemptionCapability(false),
41 preemptionVulnerability(false)
42{
43}
44
47{
48 static TypeId tid =
49 TypeId("ns3::EpsBearer")
51 .SetGroupName("Lte")
52 .AddConstructor<EpsBearer>()
53 .AddAttribute(
54 "Release",
55 "Change from 11 to 18 if you need bearer definition as per newer Releases."
56 " Reference document: TS 23.203. The change does not impact other LTE code than "
57 " bearers definition.",
58 UintegerValue(11),
60 MakeUintegerChecker<uint32_t>());
61 return tid;
62}
63
66{
67 return EpsBearer::GetTypeId();
68}
69
71 : ObjectBase(),
72 qci(NGBR_VIDEO_TCP_DEFAULT)
73{
75}
76
78 : ObjectBase(),
79 qci(x)
80{
82}
83
85 : ObjectBase(),
86 qci(x),
87 gbrQosInfo(y)
88{
90}
91
93 : ObjectBase(o)
94{
95 qci = o.qci;
98}
99
100void
102{
103 switch (release)
104 {
105 case 8:
106 case 9:
107 case 10:
108 case 11:
110 break;
111 case 15:
113 break;
114 case 18:
116 break;
117 default:
118 NS_FATAL_ERROR("Not recognized release " << static_cast<uint32_t>(release)
119 << " please choose a value between"
120 " 8 and 11, or 15 or 18");
121 }
123}
124
125uint8_t
127{
129}
130
131uint8_t
133{
135}
136
137uint16_t
139{
141}
142
143double
145{
147}
148
151{
152 /* Needed to support GCC 4.9. Otherwise, use list constructors, for example:
153 * EpsBearer::BearerRequirementsMap
154 * EpsBearer::GetRequirementsRel15 ()
155 * {
156 * return
157 * {
158 * { GBR_CONV_VOICE , { 1, 20, 100, 1.0e-2, 0, 2000} },
159 * ...
160 * };
161 * }
162 */
164 {GBR_CONV_VOICE, std::make_tuple(1, 2, 100, 1.0e-2, 0, 0)},
165 {GBR_CONV_VIDEO, std::make_tuple(1, 4, 150, 1.0e-3, 0, 0)},
166 {GBR_GAMING, std::make_tuple(1, 3, 50, 1.0e-3, 0, 0)},
167 {GBR_NON_CONV_VIDEO, std::make_tuple(1, 5, 300, 1.0e-6, 0, 0)},
168 {NGBR_IMS, std::make_tuple(0, 1, 100, 1.0e-6, 0, 0)},
169 {NGBR_VIDEO_TCP_OPERATOR, std::make_tuple(0, 6, 300, 1.0e-6, 0, 0)},
170 {NGBR_VOICE_VIDEO_GAMING, std::make_tuple(0, 7, 100, 1.0e-3, 0, 0)},
171 {NGBR_VIDEO_TCP_PREMIUM, std::make_tuple(0, 8, 300, 1.0e-6, 0, 0)},
172 {NGBR_VIDEO_TCP_DEFAULT, std::make_tuple(0, 9, 300, 1.0e-6, 0, 0)},
173 };
174 return ret;
175}
176
179{
180 // Needed to support GCC 4.9. Otherwise, use list constructors (see GetRequirementsRel10)
182 {GBR_CONV_VOICE, std::make_tuple(1, 20, 100, 1.0e-2, 0, 2000)},
183 {GBR_CONV_VIDEO, std::make_tuple(1, 40, 150, 1.0e-3, 0, 2000)},
184 {GBR_GAMING, std::make_tuple(1, 30, 50, 1.0e-3, 0, 2000)},
185 {GBR_NON_CONV_VIDEO, std::make_tuple(1, 50, 300, 1.0e-6, 0, 2000)},
186 {GBR_MC_PUSH_TO_TALK, std::make_tuple(1, 7, 75, 1.0e-2, 0, 2000)},
187 {GBR_NMC_PUSH_TO_TALK, std::make_tuple(1, 20, 100, 1.0e-2, 0, 2000)},
188 {GBR_MC_VIDEO, std::make_tuple(1, 15, 100, 1.0e-3, 0, 2000)},
189 {GBR_V2X, std::make_tuple(1, 25, 50, 1.0e-2, 0, 2000)},
190 {NGBR_IMS, std::make_tuple(0, 10, 100, 1.0e-6, 0, 0)},
191 {NGBR_VIDEO_TCP_OPERATOR, std::make_tuple(0, 60, 300, 1.0e-6, 0, 0)},
192 {NGBR_VOICE_VIDEO_GAMING, std::make_tuple(0, 70, 100, 1.0e-3, 0, 0)},
193 {NGBR_VIDEO_TCP_PREMIUM, std::make_tuple(0, 80, 300, 1.0e-6, 0, 0)},
194 {NGBR_VIDEO_TCP_DEFAULT, std::make_tuple(0, 90, 300, 1.0e-6, 0, 0)},
195 {NGBR_MC_DELAY_SIGNAL, std::make_tuple(0, 5, 60, 1.0e-6, 0, 0)},
196 {NGBR_MC_DATA, std::make_tuple(0, 55, 200, 1.0e-6, 0, 0)},
197 {NGBR_V2X, std::make_tuple(0, 65, 5, 1.0e-2, 0, 0)},
198 {NGBR_LOW_LAT_EMBB, std::make_tuple(0, 68, 10, 1.0e-6, 0, 0)},
199 {DGBR_DISCRETE_AUT_SMALL, std::make_tuple(2, 19, 10, 1.0e-4, 255, 2000)},
200 {DGBR_DISCRETE_AUT_LARGE, std::make_tuple(2, 22, 10, 1.0e-4, 1358, 2000)},
201 {DGBR_ITS, std::make_tuple(2, 24, 30, 1.0e-5, 1354, 2000)},
202 {DGBR_ELECTRICITY, std::make_tuple(2, 21, 5, 1.0e-5, 255, 2000)},
203 };
204 return ret;
205}
206
209{
210 // Needed to support GCC 4.9. Otherwise, use list constructors (see GetRequirementsRel10)
212 {GBR_CONV_VOICE, std::make_tuple(1, 20, 100, 1.0e-2, 0, 2000)},
213 {GBR_CONV_VIDEO, std::make_tuple(1, 40, 150, 1.0e-3, 0, 2000)},
214 {GBR_GAMING, std::make_tuple(1, 30, 50, 1.0e-3, 0, 2000)},
215 {GBR_NON_CONV_VIDEO, std::make_tuple(1, 50, 300, 1.0e-6, 0, 2000)},
216 {GBR_MC_PUSH_TO_TALK, std::make_tuple(1, 7, 75, 1.0e-2, 0, 2000)},
217 {GBR_NMC_PUSH_TO_TALK, std::make_tuple(1, 20, 100, 1.0e-2, 0, 2000)},
218 {GBR_MC_VIDEO, std::make_tuple(1, 15, 100, 1.0e-3, 0, 2000)},
219 {GBR_V2X, std::make_tuple(1, 25, 50, 1.0e-2, 0, 2000)},
220 {NGBR_IMS, std::make_tuple(0, 10, 100, 1.0e-6, 0, 0)},
221 {NGBR_VIDEO_TCP_OPERATOR, std::make_tuple(0, 60, 300, 1.0e-6, 0, 0)},
222 {NGBR_VOICE_VIDEO_GAMING, std::make_tuple(0, 70, 100, 1.0e-3, 0, 0)},
223 {NGBR_VIDEO_TCP_PREMIUM, std::make_tuple(0, 80, 300, 1.0e-6, 0, 0)},
224 {NGBR_VIDEO_TCP_DEFAULT, std::make_tuple(0, 90, 300, 1.0e-6, 0, 0)},
225 {NGBR_MC_DELAY_SIGNAL, std::make_tuple(0, 5, 60, 1.0e-6, 0, 0)},
226 {NGBR_MC_DATA, std::make_tuple(0, 55, 200, 1.0e-6, 0, 0)},
227 {NGBR_V2X, std::make_tuple(0, 65, 5, 1.0e-2, 0, 0)},
228 {NGBR_LOW_LAT_EMBB, std::make_tuple(0, 68, 10, 1.0e-6, 0, 0)},
229 {GBR_LIVE_UL_71, std::make_tuple(1, 56, 150, 1.0e-6, 0, 0)},
230 {GBR_LIVE_UL_72, std::make_tuple(1, 56, 300, 1.0e-4, 0, 0)},
231 {GBR_LIVE_UL_73, std::make_tuple(1, 56, 300, 1.0e-8, 0, 0)},
232 {GBR_LIVE_UL_74, std::make_tuple(1, 56, 500, 1.0e-8, 0, 0)},
233 {GBR_LIVE_UL_76, std::make_tuple(1, 56, 500, 1.0e-4, 0, 0)},
234 {DGBR_DISCRETE_AUT_SMALL, std::make_tuple(2, 19, 10, 1.0e-4, 255, 2000)},
235 {DGBR_DISCRETE_AUT_LARGE, std::make_tuple(2, 22, 10, 1.0e-4, 1358, 2000)},
236 {DGBR_ITS, std::make_tuple(2, 24, 30, 1.0e-5, 1354, 2000)},
237 {DGBR_ELECTRICITY, std::make_tuple(2, 21, 5, 1.0e-5, 255, 2000)},
238 {DGBR_V2X, std::make_tuple(2, 18, 5, 1.0e-4, 1354, 2000)},
239 {DGBR_INTER_SERV_87, std::make_tuple(2, 25, 5, 1.0e-3, 500, 2000)},
240 {DGBR_INTER_SERV_88, std::make_tuple(2, 25, 10, 1.0e-3, 1125, 2000)},
241 {DGBR_VISUAL_CONTENT_89, std::make_tuple(2, 25, 15, 1.0e-4, 17000, 2000)},
242 {DGBR_VISUAL_CONTENT_90, std::make_tuple(2, 25, 20, 1.0e-4, 63000, 2000)},
243 };
244 return ret;
245}
246
247} // namespace ns3
List of Attribute name, value and checker triples used to construct Objects.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
void SetRelease(uint8_t release)
SetRelease.
Definition: eps-bearer.cc:101
BearerRequirementsMap m_requirements
Requirements pointer per bearer.
Definition: eps-bearer.h:357
static const BearerRequirementsMap & GetRequirementsRel15()
Retrieve requirements for Rel.
Definition: eps-bearer.cc:178
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: eps-bearer.cc:65
static const BearerRequirementsMap & GetRequirementsRel18()
Retrieve requirements for Rel.
Definition: eps-bearer.cc:208
uint8_t GetPriority() const
Definition: eps-bearer.cc:132
uint8_t GetRelease() const
GetRelease.
Definition: eps-bearer.h:208
uint8_t GetResourceType() const
Definition: eps-bearer.cc:126
uint16_t GetPacketDelayBudgetMs() const
Definition: eps-bearer.cc:138
double GetPacketErrorLossRate() const
Definition: eps-bearer.cc:144
static const BearerRequirementsMap & GetRequirementsRel11()
Retrieve requirements for Rel.
Definition: eps-bearer.cc:150
std::unordered_map< Qci, std::tuple< uint8_t, uint8_t, uint16_t, double, uint32_t, uint32_t > > BearerRequirementsMap
Map between QCI and requirements.
Definition: eps-bearer.h:252
Qci qci
Qos class indicator.
Definition: eps-bearer.h:151
GbrQosInformation gbrQosInfo
GBR QOS information.
Definition: eps-bearer.h:153
uint8_t m_release
Release (10 or 15 or 18)
Definition: eps-bearer.h:359
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
@ DGBR_VISUAL_CONTENT_90
Delay-Critical GBR Visual Content for cloud/edge/split rendering (TS 23.501)
Definition: eps-bearer.h:147
@ 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:126
@ DGBR_DISCRETE_AUT_LARGE
Delay-Critical GBR Discrete Automation Large Packets (TS 22.261)
Definition: eps-bearer.h:135
@ 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
@ GBR_LIVE_UL_76
GBR Live UL streaming.
Definition: eps-bearer.h:119
@ DGBR_ITS
Delay-Critical GBR Intelligent Transport Systems (TS 22.261)
Definition: eps-bearer.h:137
@ NGBR_V2X
Non-GBR V2X Messages.
Definition: eps-bearer.h:131
@ NGBR_LOW_LAT_EMBB
Non-GBR Low Latency eMBB applications.
Definition: eps-bearer.h:132
@ 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:133
@ DGBR_ELECTRICITY
Delay-Critical GBR Electricity Distribution High Voltage (TS 22.261)
Definition: eps-bearer.h:138
@ DGBR_INTER_SERV_88
Delay-Critical GBR Interactive Service - Motion tracking data (TS 23.501)
Definition: eps-bearer.h:143
@ NGBR_VOICE_VIDEO_GAMING
Non-GBR Voice, Video, Interactive Streaming.
Definition: eps-bearer.h:123
@ NGBR_MC_DATA
Non-GBR Mission Critical Data.
Definition: eps-bearer.h:130
@ GBR_LIVE_UL_72
GBR Live UL streaming.
Definition: eps-bearer.h:116
@ NGBR_VIDEO_TCP_OPERATOR
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:121
@ NGBR_MC_DELAY_SIGNAL
Non-GBR Mission Critical Delay Sensitive Signalling (e.g., MC-PTT)
Definition: eps-bearer.h:128
@ NGBR_IMS
Non-GBR IMS Signalling.
Definition: eps-bearer.h:120
@ NGBR_VIDEO_TCP_PREMIUM
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:124
@ GBR_LIVE_UL_73
GBR Live UL streaming.
Definition: eps-bearer.h:117
@ DGBR_V2X
Delay-Critical GBR V2X Messages (TS 23.501)
Definition: eps-bearer.h:140
@ DGBR_VISUAL_CONTENT_89
Delay-Critical GBR Visual Content for cloud/edge/split rendering (TS 23.501)
Definition: eps-bearer.h:145
@ DGBR_INTER_SERV_87
Delay-Critical GBR Interactive Service - Motion tracking data (TS 23.501)
Definition: eps-bearer.h:141
@ GBR_NMC_PUSH_TO_TALK
GBR Non-Mission-Critical User Plane Push To Talk voice.
Definition: eps-bearer.h:112
@ GBR_LIVE_UL_74
GBR Live UL streaming.
Definition: eps-bearer.h:118
@ GBR_LIVE_UL_71
GBR Live UL streaming.
Definition: eps-bearer.h:115
Anchor the ns-3 type and attribute system.
Definition: object-base.h:173
void ConstructSelf(const AttributeConstructionList &attributes)
Complete construction of ObjectBase; invoked by derived classes.
Definition: object-base.cc:92
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
Hold an unsigned integer type.
Definition: uinteger.h:45
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition: uinteger.h:46
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ release
Definition: ff-mac-common.h:70
AllocationRetentionPriority()
Default constructor, initializes member variables to zero or equivalent.
Definition: eps-bearer.cc:38
3GPP TS 36.413 9.2.1.18 GBR QoS Information
Definition: eps-bearer.h:36
GbrQosInformation()
Default constructor, initializes member variables to zero or equivalent.
Definition: eps-bearer.cc:30