author | Nicola Baldo <nbaldo@cttc.es> |
Wed, 19 Dec 2012 17:34:54 +0100 | |
changeset 9223 | 0037859c17c9 |
parent 9149 | 2580b67c83b3 |
child 9224 | 16af460a31ab |
permissions | -rw-r--r-- |
7886 | 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 |
#ifndef EPS_BEARER |
|
23 |
#define EPS_BEARER |
|
24 |
||
25 |
#include <ns3/uinteger.h> |
|
26 |
||
27 |
namespace ns3 { |
|
28 |
||
29 |
/** |
|
30 |
* 3GPP TS 36.143 9.2.1.18 GBR QoS Information |
|
31 |
* |
|
32 |
*/ |
|
33 |
struct GbrQosInformation |
|
34 |
{ |
|
9223
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
35 |
/** |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
36 |
* Default constructor, inizializes member variables to zero or equivalent |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
37 |
*/ |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
38 |
GbrQosInformation (); |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
39 |
|
7886 | 40 |
uint64_t gbrDl; /**< Guaranteed Bit Rate (bit/s) in downlink */ |
41 |
uint64_t gbrUl; /**< Guaranteed Bit Rate (bit/s) in uplink */ |
|
42 |
uint64_t mbrDl; /**< Maximum Bit Rate (bit/s) in downlink */ |
|
43 |
uint64_t mbrUl; /**< Maximum Bit Rate (bit/s) in uplink */ |
|
44 |
}; |
|
45 |
||
46 |
||
47 |
/** |
|
48 |
* 3GPP 23.203 Section 6.1.7.3 Allocation and Retention Priority characteristics |
|
49 |
* |
|
50 |
*/ |
|
51 |
struct AllocationRetentionPriority |
|
52 |
{ |
|
9223
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
53 |
/** |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
54 |
* Default constructor, inizializes member variables to zero or equivalent |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
55 |
*/ |
0037859c17c9
initialize member variables of EpsBearer upon construction
Nicola Baldo <nbaldo@cttc.es>
parents:
9149
diff
changeset
|
56 |
AllocationRetentionPriority (); |
7886 | 57 |
uint8_t priorityLevel; // /< 1-15; 1 = highest |
58 |
bool preemprionCapability; // /< true if bearer can preempt others |
|
59 |
bool preemprionVulnerability; // true if bearer can be preempted by others |
|
60 |
}; |
|
61 |
||
62 |
/** |
|
63 |
* This class contains the specification of EPS Bearers. |
|
64 |
* |
|
65 |
* See the following references: |
|
66 |
* 3GPP TS 23.203, Section 4.7.2 The EPS bearer |
|
67 |
* 3GPP TS 23.203, Section 4.7.3 Bearer level QoS parameters |
|
68 |
* 3GPP TS 36.413 Section 9.2.1.15 E-RAB Level QoS Parameters |
|
69 |
* |
|
70 |
*/ |
|
71 |
struct EpsBearer |
|
72 |
{ |
|
73 |
||
74 |
/** |
|
75 |
* QoS Class Indicator. See 3GPP 23.203 Section 6.1.7.2 for standard values. |
|
76 |
*/ |
|
77 |
enum Qci |
|
78 |
{ |
|
79 |
GBR_CONV_VOICE = 1, |
|
80 |
GBR_CONV_VIDEO = 2, |
|
81 |
GBR_GAMING = 3, |
|
82 |
GBR_NON_CONV_VIDEO = 4, |
|
83 |
NGBR_IMS = 5, |
|
84 |
NGBR_VIDEO_TCP_OPERATOR = 6, |
|
85 |
NGBR_VOICE_VIDEO_GAMING = 7, |
|
86 |
NGBR_VIDEO_TCP_PREMIUM = 8, |
|
87 |
NGBR_VIDEO_TCP_DEFAULT = 9, |
|
88 |
} qci; |
|
89 |
||
90 |
GbrQosInformation gbrQosInfo; |
|
91 |
AllocationRetentionPriority arp; |
|
92 |
||
93 |
/** |
|
94 |
* |
|
95 |
* @param x the QoS Class Indicator |
|
96 |
* |
|
97 |
*/ |
|
98 |
EpsBearer (Qci x); |
|
99 |
||
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
7886
diff
changeset
|
100 |
EpsBearer (Qci x, GbrQosInformation y); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
7886
diff
changeset
|
101 |
|
7886 | 102 |
/** |
103 |
* |
|
104 |
* @return true if the EPS Bearer is a Guaranteed Bit Rate bearer, false otherwise |
|
105 |
*/ |
|
106 |
bool IsGbr () const; |
|
107 |
||
108 |
/** |
|
109 |
* |
|
110 |
* @return the priority associated with the QCI of this bearer as per 3GPP 23.203 Section 6.1.7.2 |
|
111 |
*/ |
|
112 |
uint8_t GetPriority () const; |
|
113 |
||
114 |
/** |
|
115 |
* |
|
116 |
* |
|
117 |
* |
|
118 |
* @return the packet delay budget associated with the QCI of this bearer as per 3GPP 23.203 Section 6.1.7.2 |
|
119 |
*/ |
|
120 |
uint16_t GetPacketDelayBudgetMs () const; |
|
121 |
||
122 |
/** |
|
123 |
* |
|
124 |
* |
|
125 |
* |
|
126 |
* @return the packet error loss rate associated with the QCI of this bearer as per 3GPP 23.203 Section 6.1.7.2 |
|
127 |
*/ |
|
128 |
double GetPacketErrorLossRate () const; |
|
129 |
||
130 |
private: |
|
131 |
EpsBearer (); |
|
132 |
}; |
|
133 |
||
134 |
} // namespace ns3 |
|
135 |
||
136 |
||
137 |
#endif // EPS_BEARER |