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