A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
model
eps-bearer.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Nicola Baldo <nbaldo@cttc.es>
19
*/
20
21
22
#include "
eps-bearer.h
"
23
24
#include <ns3/fatal-error.h>
25
26
27
namespace
ns3
{
28
29
30
GbrQosInformation::GbrQosInformation
()
31
: gbrDl (0),
32
gbrUl (0),
33
mbrDl (0),
34
mbrUl (0)
35
{
36
}
37
38
AllocationRetentionPriority::AllocationRetentionPriority
()
39
: priorityLevel (0),
40
preemptionCapability (false),
41
preemptionVulnerability (false)
42
{
43
}
44
45
EpsBearer::EpsBearer
()
46
: qci (NGBR_VIDEO_TCP_DEFAULT)
47
{
48
}
49
50
EpsBearer::EpsBearer
(
Qci
x
)
51
: qci (
x
)
52
{
53
}
54
55
EpsBearer::EpsBearer
(
Qci
x
,
struct
GbrQosInformation
y)
56
: qci (
x
), gbrQosInfo (y)
57
{
58
}
59
60
bool
61
EpsBearer::IsGbr
()
const
62
{
63
// 3GPP 23.203 Section 6.1.7.2
64
switch
(
qci
)
65
{
66
case
GBR_CONV_VOICE
:
67
case
GBR_CONV_VIDEO
:
68
case
GBR_GAMING
:
69
case
GBR_NON_CONV_VIDEO
:
70
return
true
;
71
case
NGBR_IMS
:
72
case
NGBR_VIDEO_TCP_OPERATOR
:
73
case
NGBR_VOICE_VIDEO_GAMING
:
74
case
NGBR_VIDEO_TCP_PREMIUM
:
75
case
NGBR_VIDEO_TCP_DEFAULT
:
76
return
false
;
77
default
:
78
NS_FATAL_ERROR
(
"unknown QCI value "
<<
qci
);
79
return
false
;
80
}
81
}
82
83
uint8_t
84
EpsBearer::GetPriority
()
const
85
{
86
// 3GPP 23.203 Section 6.1.7.2
87
switch
(
qci
)
88
{
89
case
GBR_CONV_VOICE
:
90
return
2;
91
case
GBR_CONV_VIDEO
:
92
return
4;
93
case
GBR_GAMING
:
94
return
3;
95
case
GBR_NON_CONV_VIDEO
:
96
return
5;
97
case
NGBR_IMS
:
98
return
1;
99
case
NGBR_VIDEO_TCP_OPERATOR
:
100
return
6;
101
case
NGBR_VOICE_VIDEO_GAMING
:
102
return
7;
103
case
NGBR_VIDEO_TCP_PREMIUM
:
104
return
8;
105
case
NGBR_VIDEO_TCP_DEFAULT
:
106
return
9;
107
default
:
108
NS_FATAL_ERROR
(
"unknown QCI value "
<<
qci
);
109
return
0;
110
}
111
}
112
113
uint16_t
114
EpsBearer::GetPacketDelayBudgetMs
()
const
115
{
116
// 3GPP 23.203 Section 6.1.7.2
117
switch
(
qci
)
118
{
119
case
GBR_CONV_VOICE
:
120
return
100;
121
case
GBR_CONV_VIDEO
:
122
return
150;
123
case
GBR_GAMING
:
124
return
50;
125
case
GBR_NON_CONV_VIDEO
:
126
return
300;
127
case
NGBR_IMS
:
128
return
100;
129
case
NGBR_VIDEO_TCP_OPERATOR
:
130
return
300;
131
case
NGBR_VOICE_VIDEO_GAMING
:
132
return
100;
133
case
NGBR_VIDEO_TCP_PREMIUM
:
134
return
300;
135
case
NGBR_VIDEO_TCP_DEFAULT
:
136
return
300;
137
default
:
138
NS_FATAL_ERROR
(
"unknown QCI value "
<<
qci
);
139
return
0;
140
}
141
}
142
143
double
144
EpsBearer::GetPacketErrorLossRate
()
const
145
{
146
// 3GPP 23.203 Section 6.1.7.2
147
switch
(
qci
)
148
{
149
case
GBR_CONV_VOICE
:
150
return
1.0e-2;
151
case
GBR_CONV_VIDEO
:
152
return
1.0e-3;
153
case
GBR_GAMING
:
154
return
1.0e-3;
155
case
GBR_NON_CONV_VIDEO
:
156
return
1.0e-6;
157
case
NGBR_IMS
:
158
return
1.0e-6;
159
case
NGBR_VIDEO_TCP_OPERATOR
:
160
return
1.0e-6;
161
case
NGBR_VOICE_VIDEO_GAMING
:
162
return
1.0e-3;
163
case
NGBR_VIDEO_TCP_PREMIUM
:
164
return
1.0e-6;
165
case
NGBR_VIDEO_TCP_DEFAULT
:
166
return
1.0e-6;
167
default
:
168
NS_FATAL_ERROR
(
"unknown QCI value "
<<
qci
);
169
return
0;
170
}
171
}
172
173
174
175
}
// namespace ns3
ns3::EpsBearer::GetPacketDelayBudgetMs
uint16_t GetPacketDelayBudgetMs() const
Definition:
eps-bearer.cc:114
ns3::EpsBearer::GBR_CONV_VIDEO
Definition:
eps-bearer.h:80
ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT
Definition:
eps-bearer.h:87
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition:
fatal-error.h:162
ns3::EpsBearer::NGBR_VOICE_VIDEO_GAMING
Definition:
eps-bearer.h:85
ns3::EpsBearer::IsGbr
bool IsGbr() const
Definition:
eps-bearer.cc:61
ns3::EpsBearer::NGBR_IMS
Definition:
eps-bearer.h:83
ns3::EpsBearer::GetPriority
uint8_t GetPriority() const
Definition:
eps-bearer.cc:84
ns3::EpsBearer::NGBR_VIDEO_TCP_PREMIUM
Definition:
eps-bearer.h:86
eps-bearer.h
ns3::EpsBearer::GetPacketErrorLossRate
double GetPacketErrorLossRate() const
Definition:
eps-bearer.cc:144
ns3::AllocationRetentionPriority::AllocationRetentionPriority
AllocationRetentionPriority()
Default constructor, initializes member variables to zero or equivalent.
Definition:
eps-bearer.cc:38
ns3::EpsBearer::GBR_GAMING
Definition:
eps-bearer.h:81
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::EpsBearer::qci
enum ns3::EpsBearer::Qci qci
Qos class indicator.
ns3::GbrQosInformation::GbrQosInformation
GbrQosInformation()
Default constructor, initializes member variables to zero or equivalent.
Definition:
eps-bearer.cc:30
ns3::EpsBearer::EpsBearer
EpsBearer()
Default constructor.
Definition:
eps-bearer.cc:45
ns3::EpsBearer::NGBR_VIDEO_TCP_OPERATOR
Definition:
eps-bearer.h:84
ns3::GbrQosInformation
3GPP TS 36.413 9.2.1.18 GBR QoS Information
Definition:
eps-bearer.h:33
ns3::EpsBearer::GBR_NON_CONV_VIDEO
Definition:
eps-bearer.h:82
ns3::EpsBearer::GBR_CONV_VOICE
Definition:
eps-bearer.h:79
ns3::EpsBearer::Qci
Qci
QoS Class Indicator.
Definition:
eps-bearer.h:77
sample-rng-plot.x
list x
Definition:
sample-rng-plot.py:34
Generated on Wed Nov 7 2018 10:01:59 for ns-3 by
1.8.14