author | Tom Henderson <tomh@tomh.org> |
Mon, 04 Jan 2016 14:11:51 -0800 | |
changeset 11800 | bd9c9abd5d6e |
parent 9420 | cd49c7790894 |
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> |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8007
diff
changeset
|
19 |
* Marco Miozzo <mmiozzo@cttc.es> |
7886 | 20 |
*/ |
21 |
||
22 |
#ifndef LTE_ENB_CMAC_SAP_H |
|
23 |
#define LTE_ENB_CMAC_SAP_H |
|
24 |
||
25 |
#include <ns3/packet.h> |
|
26 |
#include <ns3/ff-mac-common.h> |
|
27 |
#include <ns3/eps-bearer.h> |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8007
diff
changeset
|
28 |
#include <ns3/lte-common.h> |
7886 | 29 |
|
30 |
namespace ns3 { |
|
31 |
||
32 |
||
33 |
class LteMacSapUser; |
|
34 |
||
35 |
/** |
|
36 |
* Service Access Point (SAP) offered by the eNB MAC to the eNB RRC |
|
37 |
* See Femto Forum MAC Scheduler Interface Specification v 1.11, Figure 1 |
|
38 |
* |
|
39 |
* This is the MAC SAP Provider, i.e., the part of the SAP that contains the MAC methods called by the RRC |
|
40 |
*/ |
|
41 |
class LteEnbCmacSapProvider |
|
42 |
{ |
|
43 |
public: |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
44 |
virtual ~LteEnbCmacSapProvider (); |
7886 | 45 |
/** |
46 |
* |
|
47 |
* |
|
48 |
* @param ulBandwidth |
|
49 |
* @param dlBandwidth |
|
50 |
*/ |
|
51 |
virtual void ConfigureMac (uint8_t ulBandwidth, |
|
52 |
uint8_t dlBandwidth) = 0; |
|
53 |
||
54 |
||
55 |
virtual void AddUe (uint16_t rnti) = 0; |
|
56 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
57 |
/** |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
58 |
* remove the UE, e.g., after handover or termination of the RRC connection |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
59 |
* |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
60 |
* \param rnti |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
61 |
*/ |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
8714
diff
changeset
|
62 |
virtual void RemoveUe (uint16_t rnti) = 0; |
7886 | 63 |
|
64 |
/** |
|
65 |
* Logical Channel information to be passed to CmacSapProvider::ConfigureLc |
|
66 |
* |
|
67 |
*/ |
|
68 |
struct LcInfo |
|
69 |
{ |
|
8007 | 70 |
uint16_t rnti; /**< C-RNTI identifying the UE */ |
7886 | 71 |
uint8_t lcId; /**< logical channel identifier */ |
72 |
uint8_t lcGroup; /**< logical channel group */ |
|
73 |
uint8_t qci; /**< QoS Class Identifier */ |
|
74 |
bool isGbr; /**< true if the bearer is GBR, false if the bearer is NON-GBR */ |
|
75 |
uint64_t mbrUl; /**< maximum bitrate in uplink */ |
|
76 |
uint64_t mbrDl; /**< maximum bitrate in downlink */ |
|
77 |
uint64_t gbrUl; /**< guaranteed bitrate in uplink */ |
|
78 |
uint64_t gbrDl; /**< guaranteed bitrate in downlink */ |
|
79 |
}; |
|
80 |
||
81 |
/** |
|
82 |
* Add a new logical channel |
|
83 |
* |
|
84 |
* \param lcinfo |
|
85 |
* \param msu |
|
86 |
*/ |
|
87 |
virtual void AddLc (LcInfo lcinfo, LteMacSapUser* msu) = 0; |
|
88 |
||
89 |
||
90 |
/** |
|
91 |
* Reconfigure an existing logical channel |
|
92 |
* |
|
93 |
* \param lcinfo |
|
94 |
*/ |
|
95 |
virtual void ReconfigureLc (LcInfo lcinfo) = 0; |
|
96 |
||
97 |
||
98 |
/** |
|
99 |
* release an existing logical channel |
|
100 |
* |
|
101 |
* \param rnti |
|
102 |
* \param lcid |
|
103 |
*/ |
|
104 |
virtual void ReleaseLc (uint16_t rnti, uint8_t lcid) = 0; |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8007
diff
changeset
|
105 |
|
9346 | 106 |
/** |
107 |
* \brief Parameters for [re]configuring the UE |
|
108 |
*/ |
|
109 |
struct UeConfig |
|
110 |
{ |
|
111 |
/** |
|
112 |
* UE id within this cell |
|
113 |
*/ |
|
114 |
uint16_t m_rnti; |
|
115 |
/** |
|
116 |
* Transmission mode [1..7] (i.e., SISO, MIMO, etc.) |
|
117 |
*/ |
|
118 |
uint8_t m_transmissionMode; |
|
119 |
}; |
|
120 |
||
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
121 |
/** |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
122 |
* update the configuration of the UE |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
123 |
* |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
124 |
* \param params |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
125 |
*/ |
9346 | 126 |
virtual void UeUpdateConfigurationReq (UeConfig params) = 0; |
7886 | 127 |
|
128 |
||
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
129 |
/** |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
130 |
* struct defining the RACH configuration of the MAC |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
131 |
* |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
132 |
*/ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
133 |
struct RachConfig |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
134 |
{ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
135 |
uint8_t numberOfRaPreambles; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
136 |
uint8_t preambleTransMax; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
137 |
uint8_t raResponseWindowSize; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
138 |
}; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
139 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
140 |
/** |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
141 |
* |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
142 |
* \return the current RACH configuration of the MAC |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
143 |
*/ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
144 |
virtual RachConfig GetRachConfig () = 0; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
145 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
146 |
/** |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
147 |
* |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
148 |
* |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
149 |
*/ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
150 |
struct AllocateNcRaPreambleReturnValue |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
151 |
{ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
152 |
bool valid; ///< true if a valid RA config was allocated, false otherwise |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
153 |
uint8_t raPreambleId; ///< random access preamble id |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
154 |
uint8_t raPrachMaskIndex; /// PRACH mask index |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
155 |
}; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
156 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
157 |
/** |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
158 |
* Allocate a random access preamble for non-contention based random access (e.g., for handover). |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
159 |
* |
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9413
diff
changeset
|
160 |
* \param rnti the RNTI of the UE who will perform non-contention based random access |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9413
diff
changeset
|
161 |
* |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9413
diff
changeset
|
162 |
* \return the newly allocated random access preamble |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
163 |
*/ |
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9413
diff
changeset
|
164 |
virtual AllocateNcRaPreambleReturnValue AllocateNcRaPreamble (uint16_t rnti) = 0; |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
165 |
|
7886 | 166 |
}; |
167 |
||
168 |
||
169 |
||
170 |
/** |
|
171 |
* Service Access Point (SAP) offered by the MAC to the RRC |
|
172 |
* See Femto Forum MAC Scheduler Interface Specification v 1.11, Figure 1 |
|
173 |
* |
|
174 |
* This is the MAC SAP User, i.e., the part of the SAP that contains the RRC methods called by the MAC |
|
175 |
*/ |
|
176 |
class LteEnbCmacSapUser |
|
177 |
{ |
|
178 |
public: |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
179 |
virtual ~LteEnbCmacSapUser (); |
9406 | 180 |
|
181 |
/** |
|
182 |
* request the allocation of a Temporary C-RNTI |
|
183 |
* |
|
184 |
* \return the T-C-RNTI |
|
185 |
*/ |
|
186 |
virtual uint16_t AllocateTemporaryCellRnti () = 0; |
|
187 |
||
7886 | 188 |
/** |
189 |
* notify the result of the last LC config operation |
|
190 |
* |
|
191 |
* \param rnti the rnti of the user |
|
192 |
* \param lcid the logical channel id |
|
193 |
* \param success true if the operation was successful, false otherwise |
|
194 |
*/ |
|
195 |
virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) = 0; |
|
9346 | 196 |
|
197 |
/** |
|
198 |
* \brief Parameters for [re]configuring the UE |
|
199 |
*/ |
|
200 |
struct UeConfig |
|
201 |
{ |
|
202 |
/** |
|
203 |
* UE id within this cell |
|
204 |
*/ |
|
205 |
uint16_t m_rnti; |
|
206 |
/** |
|
207 |
* Transmission mode [1..7] (i.e., SISO, MIMO, etc.) |
|
208 |
*/ |
|
209 |
uint8_t m_transmissionMode; |
|
210 |
}; |
|
211 |
||
212 |
/** |
|
213 |
* Notify the RRC of a UE config updated requested by the MAC (normally, by the scheduler) |
|
214 |
* |
|
215 |
* \param params |
|
216 |
*/ |
|
217 |
virtual void RrcConfigurationUpdateInd (UeConfig params) = 0; |
|
7886 | 218 |
}; |
219 |
||
220 |
||
221 |
||
222 |
||
223 |
||
224 |
||
225 |
||
226 |
} // namespace ns3 |
|
227 |
||
228 |
||
229 |
#endif // MAC_SAP_H |