author | Manuel Requena <manuel.requena@cttc.es> |
Fri, 14 Dec 2012 16:51:34 +0100 | |
changeset 9555 | 2fc5d91bb366 |
parent 9479 | a647c4d9b6e7 |
child 9556 | 29b3091d8fb8 |
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:
8462
diff
changeset
|
19 |
* Marco Miozzo <mmiozzo@cttc.es> |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
20 |
* Manuel Requena <manuel.requena@cttc.es> |
7886 | 21 |
*/ |
22 |
||
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
23 |
#include "ns3/fatal-error.h" |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
24 |
#include "ns3/log.h" |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
25 |
#include "ns3/abort.h" |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
26 |
#include "ns3/pointer.h" |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
27 |
#include "ns3/object-map.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
28 |
#include "ns3/object-factory.h" |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
29 |
#include "ns3/simulator.h" |
7886 | 30 |
|
9406 | 31 |
#include "lte-enb-rrc.h" |
32 |
||
33 |
#include "lte-enb-net-device.h" |
|
34 |
#include "lte-radio-bearer-info.h" |
|
35 |
#include "eps-bearer-tag.h" |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
36 |
#include "ff-mac-csched-sap.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
37 |
#include "epc-enb-s1-sap.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
38 |
|
7886 | 39 |
#include "lte-rlc.h" |
9406 | 40 |
#include "lte-rlc-tm.h" |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
41 |
#include "lte-rlc-um.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
42 |
#include "lte-rlc-am.h" |
9406 | 43 |
#include "lte-pdcp.h" |
44 |
#include "lte-pdcp-sap.h" |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
45 |
|
9036 | 46 |
#include <ns3/simulator.h> |
47 |
||
7886 | 48 |
|
49 |
||
9036 | 50 |
|
7886 | 51 |
NS_LOG_COMPONENT_DEFINE ("LteEnbRrc"); |
52 |
||
9406 | 53 |
|
7886 | 54 |
namespace ns3 { |
55 |
||
56 |
||
57 |
// /////////////////////////// |
|
58 |
// CMAC SAP forwarder |
|
59 |
// /////////////////////////// |
|
60 |
||
7888 | 61 |
class EnbRrcMemberLteEnbCmacSapUser : public LteEnbCmacSapUser |
7886 | 62 |
{ |
63 |
public: |
|
7888 | 64 |
EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc); |
7886 | 65 |
|
9406 | 66 |
virtual uint16_t AllocateTemporaryCellRnti (); |
7886 | 67 |
virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success); |
9346 | 68 |
virtual void RrcConfigurationUpdateInd (UeConfig params); |
7886 | 69 |
|
70 |
private: |
|
71 |
LteEnbRrc* m_rrc; |
|
72 |
}; |
|
73 |
||
7888 | 74 |
EnbRrcMemberLteEnbCmacSapUser::EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc) |
7886 | 75 |
: m_rrc (rrc) |
76 |
{ |
|
77 |
} |
|
78 |
||
9406 | 79 |
uint16_t |
80 |
EnbRrcMemberLteEnbCmacSapUser::AllocateTemporaryCellRnti () |
|
81 |
{ |
|
82 |
return m_rrc->DoAllocateTemporaryCellRnti (); |
|
83 |
} |
|
84 |
||
7886 | 85 |
void |
7888 | 86 |
EnbRrcMemberLteEnbCmacSapUser::NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
7886 | 87 |
{ |
88 |
m_rrc->DoNotifyLcConfigResult (rnti, lcid, success); |
|
89 |
} |
|
90 |
||
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
91 |
void |
9346 | 92 |
EnbRrcMemberLteEnbCmacSapUser::RrcConfigurationUpdateInd (UeConfig params) |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
93 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
94 |
m_rrc->DoRrcConfigurationUpdateInd (params); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
95 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
96 |
|
7886 | 97 |
|
9406 | 98 |
const char* g_ueManagerStateName[UeManager::NUM_STATES] = |
99 |
{ |
|
100 |
"INITIAL_RANDOM_ACCESS", |
|
101 |
"CONNECTION_SETUP", |
|
102 |
"CONNECTED_NORMALLY", |
|
103 |
"CONNECTION_RECONFIGURATION", |
|
104 |
"CONNECTION_REESTABLISHMENT", |
|
105 |
"HANDOVER_JOINING", |
|
106 |
"HANDOVER_LEAVING", |
|
107 |
}; |
|
108 |
||
109 |
std::string ToString (UeManager::State s) |
|
110 |
{ |
|
111 |
return std::string (g_ueManagerStateName[s]); |
|
112 |
} |
|
113 |
||
114 |
||
115 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
116 |
/////////////////////////////////////////// |
9406 | 117 |
// UeManager |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
118 |
/////////////////////////////////////////// |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
119 |
|
7886 | 120 |
|
9406 | 121 |
NS_OBJECT_ENSURE_REGISTERED (UeManager); |
122 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
123 |
|
9406 | 124 |
UeManager::UeManager () |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
125 |
{ |
9406 | 126 |
NS_FATAL_ERROR ("this constructor is not espected to be used"); |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
127 |
} |
7886 | 128 |
|
8007 | 129 |
|
9406 | 130 |
UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s) |
131 |
: m_lastAllocatedDrbid (0), |
|
132 |
m_rnti (rnti), |
|
133 |
m_imsi (0), |
|
134 |
m_lastRrcTransactionIdentifier (0), |
|
135 |
m_rrc (rrc), |
|
136 |
m_state (s), |
|
9407 | 137 |
m_pendingRrcConnectionReconfiguration (false), |
138 |
m_sourceX2apId (0), |
|
139 |
m_sourceCellId (0) |
|
9406 | 140 |
{ |
141 |
NS_LOG_FUNCTION (this); |
|
142 |
||
143 |
m_pdcpSapUser = new LtePdcpSpecificLtePdcpSapUser<UeManager> (this); |
|
144 |
||
145 |
m_physicalConfigDedicated.haveAntennaInfoDedicated = true; |
|
146 |
m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTransmissionMode; |
|
147 |
m_physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true; |
|
148 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = m_rrc->GetNewSrsConfigurationIndex (); |
|
149 |
||
150 |
m_rrc->m_cmacSapProvider->AddUe (rnti); |
|
151 |
m_rrc->m_cphySapProvider->AddUe (rnti); |
|
152 |
||
153 |
// setup the eNB side of SRB0 |
|
154 |
{ |
|
155 |
uint8_t lcid = 0; |
|
156 |
||
157 |
Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> (); |
|
158 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
159 |
rlc->SetRnti (m_rnti); |
|
160 |
rlc->SetLcId (lcid); |
|
161 |
||
162 |
m_srb0 = CreateObject<LteSignalingRadioBearerInfo> (); |
|
163 |
m_srb0->m_rlc = rlc; |
|
164 |
m_srb0->m_srbIdentity = 1; |
|
165 |
// no need to store logicalChannelConfig as SRB0 is pre-configured |
|
166 |
||
167 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
168 |
lcinfo.rnti = m_rnti; |
|
169 |
lcinfo.lcId = lcid; |
|
170 |
// leave the rest of lcinfo empty as CCCH (LCID 0) is pre-configured |
|
171 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
172 |
||
173 |
} |
|
174 |
||
175 |
// setup the eNB side of SRB1; the UE side will be set up upon RRC connection establishment |
|
176 |
{ |
|
177 |
uint8_t lcid = 1; |
|
178 |
||
179 |
Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> (); |
|
180 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
181 |
rlc->SetRnti (m_rnti); |
|
182 |
rlc->SetLcId (lcid); |
|
183 |
||
184 |
Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
|
185 |
pdcp->SetRnti (m_rnti); |
|
186 |
pdcp->SetLcId (lcid); |
|
187 |
pdcp->SetLtePdcpSapUser (m_pdcpSapUser); |
|
188 |
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
|
189 |
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
|
190 |
||
191 |
m_srb1 = CreateObject<LteSignalingRadioBearerInfo> (); |
|
192 |
m_srb1->m_rlc = rlc; |
|
193 |
m_srb1->m_pdcp = pdcp; |
|
194 |
m_srb1->m_srbIdentity = 1; |
|
195 |
m_srb1->m_logicalChannelConfig.priority = 0; |
|
196 |
m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; |
|
197 |
m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; |
|
198 |
m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; |
|
199 |
||
200 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
201 |
lcinfo.rnti = m_rnti; |
|
202 |
lcinfo.lcId = lcid; |
|
203 |
lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 |
|
204 |
lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires a CQI even for SRBs... |
|
205 |
lcinfo.isGbr = true; |
|
206 |
lcinfo.mbrUl = 1e6; |
|
207 |
lcinfo.mbrDl = 1e6; |
|
208 |
lcinfo.gbrUl = 1e4; |
|
209 |
lcinfo.gbrDl = 1e4; |
|
210 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
211 |
} |
|
212 |
||
213 |
LteEnbRrcSapUser::SetupUeParameters ueParams; |
|
214 |
ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); |
|
215 |
ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); |
|
216 |
m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams); |
|
217 |
||
218 |
// configure MAC (and scheduler) |
|
219 |
LteEnbCmacSapProvider::UeConfig req; |
|
220 |
req.m_rnti = rnti; |
|
221 |
req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMode; |
|
222 |
m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
|
223 |
||
224 |
// configure PHY |
|
225 |
m_rrc->m_cphySapProvider->SetTransmissionMode (rnti, m_physicalConfigDedicated.antennaInfo.transmissionMode); |
|
226 |
m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (rnti, m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex); |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
227 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
228 |
|
9406 | 229 |
|
230 |
UeManager::~UeManager (void) |
|
231 |
{ |
|
232 |
} |
|
233 |
||
234 |
void |
|
235 |
UeManager::DoDispose () |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
236 |
{ |
9406 | 237 |
delete m_pdcpSapUser; |
238 |
||
239 |
m_rrc->m_cmacSapProvider->RemoveUe (m_rnti); |
|
240 |
m_rrc->m_cphySapProvider->RemoveUe (m_rnti); |
|
241 |
} |
|
242 |
||
243 |
TypeId UeManager::GetTypeId (void) |
|
244 |
{ |
|
245 |
static TypeId tid = TypeId ("ns3::UeManager") |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
246 |
.SetParent<Object> () |
9406 | 247 |
.AddConstructor<UeManager> () |
248 |
.AddAttribute ("DataRadioBearerMap", "List of UE RadioBearerInfo by DRBID.", |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
249 |
ObjectMapValue (), |
9406 | 250 |
MakeObjectMapAccessor (&UeManager::m_drbMap), |
251 |
MakeObjectMapChecker<LteDataRadioBearerInfo> ()) |
|
252 |
.AddTraceSource ("StateTransition", |
|
253 |
"fired upon every UE state transition seen by the UeManager at the eNB RRC", |
|
254 |
MakeTraceSourceAccessor (&UeManager::m_stateTransitionCallback)) |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
255 |
; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
256 |
return tid; |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
257 |
} |
7886 | 258 |
|
9407 | 259 |
void |
260 |
UeManager::SetSource (uint16_t sourceCellId, uint16_t sourceX2apId) |
|
261 |
{ |
|
262 |
m_sourceX2apId = sourceX2apId; |
|
263 |
m_sourceCellId = sourceCellId; |
|
264 |
} |
|
9406 | 265 |
|
266 |
uint8_t |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
267 |
UeManager::SetupDataRadioBearer (EpsBearer bearer, uint32_t gtpTeid, Ipv4Address transportLayerAddress) |
9406 | 268 |
{ |
269 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
|
270 |
||
271 |
Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> (); |
|
272 |
uint8_t drbid = AddDataRadioBearerInfo (drbInfo); |
|
273 |
uint8_t lcid = Drbid2Lcid (drbid); |
|
274 |
uint8_t bid = Drbid2Bid (drbid); |
|
275 |
drbInfo->m_epsBearerIdentity = bid; |
|
276 |
drbInfo->m_drbIdentity = drbid; |
|
277 |
drbInfo->m_logicalChannelIdentity = lcid; |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
278 |
drbInfo->m_gtpTeid = gtpTeid; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
279 |
drbInfo->m_transportLayerAddress = transportLayerAddress; |
9406 | 280 |
|
281 |
TypeId rlcTypeId = m_rrc->GetRlcType (bearer); |
|
282 |
||
283 |
ObjectFactory rlcObjectFactory; |
|
284 |
rlcObjectFactory.SetTypeId (rlcTypeId); |
|
285 |
Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> (); |
|
286 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
287 |
rlc->SetRnti (m_rnti); |
|
288 |
||
289 |
drbInfo->m_rlc = rlc; |
|
290 |
||
291 |
rlc->SetLcId (lcid); |
|
292 |
||
293 |
// we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM |
|
294 |
// if we are using RLC/SM we don't care of anything above RLC |
|
295 |
if (rlcTypeId != LteRlcSm::GetTypeId ()) |
|
296 |
{ |
|
297 |
Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
|
298 |
pdcp->SetRnti (m_rnti); |
|
299 |
pdcp->SetLcId (lcid); |
|
300 |
pdcp->SetLtePdcpSapUser (m_pdcpSapUser); |
|
301 |
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
|
302 |
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
|
303 |
drbInfo->m_pdcp = pdcp; |
|
304 |
} |
|
305 |
||
306 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
307 |
lcinfo.rnti = m_rnti; |
|
308 |
lcinfo.lcId = lcid; |
|
309 |
lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer); |
|
310 |
lcinfo.qci = bearer.qci; |
|
311 |
lcinfo.isGbr = bearer.IsGbr (); |
|
312 |
lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; |
|
313 |
lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; |
|
314 |
lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; |
|
315 |
lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; |
|
316 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
317 |
||
318 |
if (drbInfo->m_rlc->GetTypeId () == LteRlcAm::GetTypeId ()) |
|
319 |
{ |
|
320 |
drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; |
|
321 |
} |
|
322 |
else |
|
323 |
{ |
|
324 |
drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; |
|
325 |
} |
|
326 |
||
327 |
drbInfo->m_logicalChannelIdentity = lcid; |
|
328 |
drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (bearer); |
|
329 |
drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannelGroup (bearer); |
|
330 |
if (bearer.IsGbr ()) |
|
331 |
{ |
|
332 |
drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo.gbrUl; |
|
333 |
} |
|
334 |
else |
|
335 |
{ |
|
336 |
drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; |
|
337 |
} |
|
338 |
drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; |
|
339 |
||
340 |
return drbid; |
|
341 |
} |
|
342 |
||
343 |
||
344 |
void |
|
345 |
UeManager::ReleaseDataRadioBearer (uint8_t drbid) |
|
346 |
{ |
|
347 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti << (uint32_t) drbid); |
|
348 |
uint8_t lcid = Drbid2Lcid (drbid); |
|
349 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
350 |
NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid); |
|
351 |
m_drbMap.erase (it); |
|
352 |
m_rrc->m_cmacSapProvider->ReleaseLc (m_rnti, lcid); |
|
353 |
||
354 |
LteRrcSap::RadioResourceConfigDedicated rrcd; |
|
355 |
rrcd.havePhysicalConfigDedicated = false; |
|
356 |
rrcd.drbToReleaseList.push_back (drbid); |
|
357 |
||
358 |
LteRrcSap::RrcConnectionReconfiguration msg; |
|
359 |
msg.haveMeasConfig = false; |
|
360 |
msg.haveMobilityControlInfo = false; |
|
361 |
||
362 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg); |
|
363 |
} |
|
364 |
||
365 |
||
366 |
void |
|
367 |
UeManager::ScheduleRrcConnectionReconfiguration () |
|
368 |
{ |
|
369 |
NS_LOG_FUNCTION (this); |
|
370 |
switch (m_state) |
|
371 |
{ |
|
372 |
case INITIAL_RANDOM_ACCESS: |
|
373 |
case CONNECTION_SETUP: |
|
374 |
case CONNECTION_RECONFIGURATION: |
|
375 |
case CONNECTION_REESTABLISHMENT: |
|
376 |
case HANDOVER_JOINING: |
|
377 |
case HANDOVER_LEAVING: |
|
378 |
// a previous reconfiguration still ongoing, we need to wait for it to be finished |
|
379 |
m_pendingRrcConnectionReconfiguration = true; |
|
380 |
break; |
|
381 |
||
382 |
case CONNECTED_NORMALLY: |
|
383 |
{ |
|
384 |
m_pendingRrcConnectionReconfiguration = false; |
|
385 |
LteRrcSap::RrcConnectionReconfiguration msg = BuildRrcConnectionReconfiguration (); |
|
386 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg); |
|
387 |
SwitchToState (CONNECTION_RECONFIGURATION); |
|
388 |
} |
|
389 |
break; |
|
390 |
||
391 |
default: |
|
392 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
393 |
break; |
|
394 |
} |
|
395 |
} |
|
396 |
||
397 |
void |
|
398 |
UeManager::SendHandoverCommand (LteRrcSap::RrcConnectionReconfiguration rcr) |
|
399 |
{ |
|
400 |
NS_LOG_FUNCTION (this); |
|
401 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, rcr); |
|
402 |
SwitchToState (HANDOVER_LEAVING); |
|
403 |
} |
|
404 |
||
405 |
LteRrcSap::RadioResourceConfigDedicated |
|
406 |
UeManager::GetRadioResourceConfigForHandoverPreparationInfo () |
|
407 |
{ |
|
408 |
NS_LOG_FUNCTION (this); |
|
409 |
return BuildRadioResourceConfigDedicated (); |
|
410 |
} |
|
411 |
||
412 |
LteRrcSap::RrcConnectionReconfiguration |
|
413 |
UeManager::GetHandoverCommand () |
|
414 |
{ |
|
415 |
NS_LOG_FUNCTION (this); |
|
416 |
return BuildRrcConnectionReconfiguration (); |
|
417 |
} |
|
418 |
||
419 |
void |
|
420 |
UeManager::SendData (uint8_t bid, Ptr<Packet> p) |
|
421 |
{ |
|
422 |
NS_LOG_FUNCTION (this << p << (uint16_t) bid); |
|
423 |
LtePdcpSapProvider::TransmitPdcpSduParameters params; |
|
424 |
params.pdcpSdu = p; |
|
425 |
params.rnti = m_rnti; |
|
426 |
params.lcid = Bid2Lcid (bid); |
|
427 |
uint8_t drbid = Bid2Drbid (bid); |
|
428 |
LtePdcpSapProvider* pdcpSapProvider = GetDataRadioBearerInfo (drbid)->m_pdcp->GetLtePdcpSapProvider (); |
|
429 |
pdcpSapProvider->TransmitPdcpSdu (params); |
|
430 |
} |
|
431 |
||
432 |
std::vector<EpcX2Sap::ErabToBeSetupItem> |
|
433 |
UeManager::GetErabList () |
|
434 |
{ |
|
435 |
NS_LOG_FUNCTION (this); |
|
436 |
std::vector<EpcX2Sap::ErabToBeSetupItem> ret; |
|
437 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
|
438 |
it != m_drbMap.end (); |
|
439 |
++it) |
|
440 |
{ |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
441 |
EpcX2Sap::ErabToBeSetupItem etbsi; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
442 |
etbsi.erabId = it->second->m_epsBearerIdentity; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
443 |
etbsi.erabLevelQosParameters = it->second->m_epsBearer; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
444 |
etbsi.dlForwarding = false; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
445 |
etbsi.transportLayerAddress = it->second->m_transportLayerAddress; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
446 |
etbsi.gtpTeid = it->second->m_gtpTeid; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
447 |
ret.push_back (etbsi); |
9406 | 448 |
} |
449 |
return ret; |
|
450 |
} |
|
451 |
||
452 |
void |
|
453 |
UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters params) |
|
454 |
{ |
|
455 |
NS_LOG_FUNCTION (this); |
|
456 |
m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser); |
|
457 |
m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser); |
|
458 |
} |
|
459 |
||
460 |
void |
|
461 |
UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg) |
|
462 |
{ |
|
463 |
NS_LOG_FUNCTION (this); |
|
9407 | 464 |
switch (m_state) |
9406 | 465 |
{ |
9407 | 466 |
case INITIAL_RANDOM_ACCESS: |
467 |
{ |
|
468 |
m_imsi = msg.ueIdentity; |
|
469 |
if (m_rrc->m_s1SapProvider != 0) |
|
470 |
{ |
|
471 |
m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti); |
|
472 |
} |
|
473 |
LteRrcSap::RrcConnectionSetup msg2; |
|
474 |
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
|
475 |
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
|
476 |
m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2); |
|
477 |
SwitchToState (CONNECTION_SETUP); |
|
478 |
} |
|
479 |
break; |
|
480 |
||
481 |
default: |
|
482 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
483 |
break; |
|
9406 | 484 |
} |
485 |
} |
|
486 |
||
487 |
void |
|
488 |
UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupCompleted msg) |
|
489 |
{ |
|
490 |
NS_LOG_FUNCTION (this); |
|
9407 | 491 |
switch (m_state) |
492 |
{ |
|
493 |
case CONNECTION_SETUP: |
|
494 |
SwitchToState (CONNECTED_NORMALLY); |
|
495 |
break; |
|
496 |
||
497 |
default: |
|
498 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
499 |
break; |
|
500 |
} |
|
9406 | 501 |
} |
502 |
||
503 |
void |
|
504 |
UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionReconfigurationCompleted msg) |
|
505 |
{ |
|
506 |
NS_LOG_FUNCTION (this); |
|
9407 | 507 |
switch (m_state) |
508 |
{ |
|
509 |
case CONNECTION_RECONFIGURATION: |
|
510 |
SwitchToState (CONNECTED_NORMALLY); |
|
511 |
break; |
|
512 |
||
513 |
case HANDOVER_JOINING: |
|
514 |
NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB"); |
|
515 |
EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams; |
|
516 |
ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId; |
|
517 |
ueCtxReleaseParams.newEnbUeX2apId = m_rnti; |
|
518 |
m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams); |
|
519 |
SwitchToState (CONNECTED_NORMALLY); |
|
520 |
||
521 |
default: |
|
522 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
523 |
break; |
|
524 |
} |
|
9406 | 525 |
} |
526 |
||
527 |
void |
|
528 |
UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionReestablishmentRequest msg) |
|
529 |
{ |
|
530 |
NS_LOG_FUNCTION (this); |
|
531 |
LteRrcSap::RrcConnectionReestablishment msg2; |
|
532 |
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
|
533 |
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
|
534 |
m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); |
|
535 |
SwitchToState (CONNECTION_REESTABLISHMENT); |
|
536 |
} |
|
537 |
||
538 |
void |
|
539 |
UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionReestablishmentComplete msg) |
|
540 |
{ |
|
541 |
NS_LOG_FUNCTION (this); |
|
542 |
SwitchToState (CONNECTED_NORMALLY); |
|
543 |
} |
|
544 |
||
545 |
||
546 |
void |
|
547 |
UeManager::CmacUeConfigUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
|
548 |
{ |
|
549 |
NS_LOG_FUNCTION (this << m_rnti); |
|
550 |
// at this stage used only by the scheduler for updating txMode |
|
551 |
||
552 |
m_physicalConfigDedicated.antennaInfo.transmissionMode = cmacParams.m_transmissionMode; |
|
553 |
||
554 |
// configure MAC (and scheduler) |
|
555 |
LteEnbCmacSapProvider::UeConfig req; |
|
556 |
req.m_rnti = m_rnti; |
|
557 |
req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMode; |
|
558 |
m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
|
559 |
||
560 |
// configure PHY |
|
561 |
m_rrc->m_cphySapProvider->SetTransmissionMode (req.m_rnti, req.m_transmissionMode); |
|
562 |
||
563 |
// reconfigure the UE RRC |
|
564 |
ScheduleRrcConnectionReconfiguration (); |
|
565 |
} |
|
566 |
||
567 |
||
568 |
void |
|
569 |
UeManager::DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params) |
|
570 |
{ |
|
571 |
NS_LOG_FUNCTION (this); |
|
572 |
if (params.lcid > 2) |
|
573 |
{ |
|
574 |
// data radio bearer |
|
575 |
EpsBearerTag tag; |
|
576 |
tag.SetRnti (params.rnti); |
|
577 |
tag.SetBid (Lcid2Bid (params.lcid)); |
|
578 |
params.pdcpSdu->AddPacketTag (tag); |
|
579 |
m_rrc->m_forwardUpCallback (params.pdcpSdu); |
|
580 |
} |
|
581 |
} |
|
582 |
||
583 |
||
584 |
uint16_t |
|
585 |
UeManager::GetRnti (void) |
|
586 |
{ |
|
587 |
return m_rnti; |
|
588 |
} |
|
589 |
||
8007 | 590 |
uint64_t |
9406 | 591 |
UeManager::GetImsi (void) |
8007 | 592 |
{ |
593 |
return m_imsi; |
|
594 |
} |
|
595 |
||
9036 | 596 |
uint16_t |
9406 | 597 |
UeManager::GetSrsConfigurationIndex (void) |
9036 | 598 |
{ |
9406 | 599 |
return m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex; |
9036 | 600 |
} |
601 |
||
602 |
void |
|
9406 | 603 |
UeManager::SetSrsConfigurationIndex (uint16_t srsConfIndex) |
9036 | 604 |
{ |
9406 | 605 |
NS_LOG_FUNCTION (this); |
606 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = srsConfIndex; |
|
607 |
m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, srsConfIndex); |
|
608 |
switch (m_state) |
|
609 |
{ |
|
610 |
case INITIAL_RANDOM_ACCESS: |
|
611 |
// do nothing, srs conf index will be correctly enforced upon |
|
612 |
// RRC connection establishment |
|
613 |
break; |
|
614 |
||
615 |
default: |
|
616 |
ScheduleRrcConnectionReconfiguration (); |
|
617 |
break; |
|
618 |
} |
|
619 |
} |
|
620 |
||
621 |
UeManager::State |
|
622 |
UeManager::GetState (void) |
|
623 |
{ |
|
624 |
return m_state; |
|
9036 | 625 |
} |
626 |
||
7886 | 627 |
uint8_t |
9406 | 628 |
UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) |
7886 | 629 |
{ |
630 |
NS_LOG_FUNCTION (this); |
|
9406 | 631 |
const uint8_t MAX_DRB_ID = 32; |
632 |
for (uint8_t drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID; |
|
633 |
drbid != m_lastAllocatedDrbid; |
|
634 |
drbid = (drbid + 1) % MAX_DRB_ID) |
|
7886 | 635 |
{ |
9406 | 636 |
if (drbid != 0) // 0 is not allowed |
7886 | 637 |
{ |
9406 | 638 |
if (m_drbMap.find (drbid) == m_drbMap.end ()) |
7886 | 639 |
{ |
9406 | 640 |
m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (drbid, drbInfo)); |
641 |
drbInfo->m_drbIdentity = drbid; |
|
642 |
m_lastAllocatedDrbid = drbid; |
|
643 |
return drbid; |
|
7886 | 644 |
} |
645 |
} |
|
646 |
} |
|
9406 | 647 |
NS_FATAL_ERROR ("no more data radio bearer ids available"); |
7886 | 648 |
return 0; |
649 |
} |
|
650 |
||
9406 | 651 |
Ptr<LteDataRadioBearerInfo> |
652 |
UeManager::GetDataRadioBearerInfo (uint8_t drbid) |
|
7886 | 653 |
{ |
9406 | 654 |
NS_LOG_FUNCTION (this << (uint32_t) drbid); |
655 |
NS_ASSERT (0 != drbid); |
|
656 |
std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
657 |
NS_ABORT_IF (it == m_drbMap.end ()); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
658 |
return it->second; |
7886 | 659 |
} |
660 |
||
661 |
||
662 |
void |
|
9406 | 663 |
UeManager::RemoveDataRadioBearerInfo (uint8_t drbid) |
664 |
{ |
|
665 |
NS_LOG_FUNCTION (this << (uint32_t) drbid); |
|
666 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
667 |
NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid); |
|
668 |
m_drbMap.erase (it); |
|
669 |
} |
|
670 |
||
671 |
||
672 |
LteRrcSap::RrcConnectionReconfiguration |
|
673 |
UeManager::BuildRrcConnectionReconfiguration () |
|
674 |
{ |
|
675 |
LteRrcSap::RrcConnectionReconfiguration msg; |
|
676 |
msg.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
|
677 |
msg.haveRadioResourceConfigDedicated = true; |
|
678 |
msg.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
|
679 |
msg.haveMobilityControlInfo = false; |
|
680 |
msg.haveMeasConfig = false; |
|
681 |
return msg; |
|
682 |
} |
|
683 |
||
684 |
LteRrcSap::RadioResourceConfigDedicated |
|
685 |
UeManager::BuildRadioResourceConfigDedicated () |
|
686 |
{ |
|
687 |
LteRrcSap::RadioResourceConfigDedicated rrcd; |
|
688 |
||
689 |
if (m_srb1 != 0) |
|
690 |
{ |
|
691 |
LteRrcSap::SrbToAddMod stam; |
|
692 |
stam.srbIdentity = m_srb1->m_srbIdentity; |
|
693 |
stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig; |
|
694 |
rrcd.srbToAddModList.push_back (stam); |
|
695 |
} |
|
696 |
||
697 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
|
698 |
it != m_drbMap.end (); |
|
699 |
++it) |
|
700 |
{ |
|
701 |
LteRrcSap::DrbToAddMod dtam; |
|
702 |
dtam.epsBearerIdentity = it->second->m_epsBearerIdentity; |
|
703 |
dtam.drbIdentity = it->second->m_drbIdentity; |
|
704 |
dtam.rlcConfig = it->second->m_rlcConfig; |
|
705 |
dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity; |
|
706 |
dtam.logicalChannelConfig = it->second->m_logicalChannelConfig; |
|
707 |
rrcd.drbToAddModList.push_back (dtam); |
|
708 |
} |
|
709 |
||
710 |
rrcd.havePhysicalConfigDedicated = true; |
|
711 |
rrcd.physicalConfigDedicated = m_physicalConfigDedicated; |
|
712 |
return rrcd; |
|
713 |
} |
|
714 |
||
715 |
uint8_t |
|
716 |
UeManager::GetNewRrcTransactionIdentifier () |
|
717 |
{ |
|
718 |
return ++m_lastRrcTransactionIdentifier; |
|
719 |
} |
|
720 |
||
721 |
uint8_t |
|
722 |
UeManager::Lcid2Drbid (uint8_t lcid) |
|
723 |
{ |
|
724 |
NS_ASSERT (lcid > 2); |
|
725 |
return lcid - 2; |
|
726 |
} |
|
727 |
||
728 |
uint8_t |
|
729 |
UeManager::Drbid2Lcid (uint8_t drbid) |
|
7886 | 730 |
{ |
9406 | 731 |
return drbid + 2; |
732 |
} |
|
733 |
uint8_t |
|
734 |
UeManager::Lcid2Bid (uint8_t lcid) |
|
735 |
{ |
|
736 |
NS_ASSERT (lcid > 2); |
|
737 |
return lcid - 2; |
|
738 |
} |
|
739 |
||
740 |
uint8_t |
|
741 |
UeManager::Bid2Lcid (uint8_t bid) |
|
742 |
{ |
|
743 |
return bid + 2; |
|
744 |
} |
|
745 |
||
746 |
uint8_t |
|
747 |
UeManager::Drbid2Bid (uint8_t drbid) |
|
748 |
{ |
|
749 |
return drbid; |
|
750 |
} |
|
751 |
||
752 |
uint8_t |
|
753 |
UeManager::Bid2Drbid (uint8_t bid) |
|
754 |
{ |
|
755 |
return bid; |
|
7886 | 756 |
} |
9406 | 757 |
|
758 |
||
759 |
void |
|
760 |
UeManager::SwitchToState (State newState) |
|
761 |
{ |
|
762 |
NS_LOG_FUNCTION (this << newState); |
|
763 |
State oldState = m_state; |
|
764 |
m_state = newState; |
|
765 |
NS_LOG_INFO ("IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager " << ToString (oldState) << " --> " << ToString (newState)); |
|
766 |
m_stateTransitionCallback (oldState, newState); |
|
767 |
||
768 |
switch (newState) |
|
769 |
{ |
|
770 |
case INITIAL_RANDOM_ACCESS: |
|
771 |
case HANDOVER_JOINING: |
|
772 |
NS_FATAL_ERROR ("cannot switch to an initial state"); |
|
773 |
break; |
|
774 |
||
775 |
case CONNECTION_SETUP: |
|
776 |
break; |
|
777 |
||
778 |
case CONNECTED_NORMALLY: |
|
779 |
{ |
|
780 |
if (m_pendingRrcConnectionReconfiguration == true) |
|
781 |
{ |
|
782 |
ScheduleRrcConnectionReconfiguration (); |
|
783 |
} |
|
784 |
} |
|
785 |
break; |
|
786 |
||
787 |
case CONNECTION_RECONFIGURATION: |
|
788 |
break; |
|
789 |
||
790 |
case CONNECTION_REESTABLISHMENT: |
|
791 |
break; |
|
792 |
||
793 |
case HANDOVER_LEAVING: |
|
794 |
break; |
|
795 |
||
796 |
default: |
|
797 |
break; |
|
798 |
} |
|
799 |
} |
|
800 |
||
801 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
802 |
|
7886 | 803 |
// /////////////////////////// |
804 |
// eNB RRC methods |
|
805 |
// /////////////////////////// |
|
806 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
807 |
NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc); |
7886 | 808 |
|
809 |
LteEnbRrc::LteEnbRrc () |
|
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
810 |
: m_x2SapProvider (0), |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
811 |
m_cmacSapProvider (0), |
9406 | 812 |
m_rrcSapUser (0), |
7886 | 813 |
m_macSapProvider (0), |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
814 |
m_s1SapProvider (0), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
815 |
m_cphySapProvider (0), |
7886 | 816 |
m_configured (false), |
9036 | 817 |
m_lastAllocatedRnti (0), |
818 |
m_srsCurrentPeriodicityId (0), |
|
819 |
m_lastAllocatedConfigurationIndex (0), |
|
820 |
m_reconfigureUes (false) |
|
7886 | 821 |
{ |
822 |
NS_LOG_FUNCTION (this); |
|
7888 | 823 |
m_cmacSapUser = new EnbRrcMemberLteEnbCmacSapUser (this); |
9406 | 824 |
m_rrcSapProvider = new MemberLteEnbRrcSapProvider<LteEnbRrc> (this); |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
825 |
m_x2SapUser = new EpcX2SpecificEpcX2SapUser<LteEnbRrc> (this); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
826 |
m_s1SapUser = new MemberEpcEnbS1SapUser<LteEnbRrc> (this); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
827 |
m_cphySapUser = new MemberLteEnbCphySapUser<LteEnbRrc> (this); |
9406 | 828 |
|
829 |
||
7886 | 830 |
} |
831 |
||
832 |
||
833 |
LteEnbRrc::~LteEnbRrc () |
|
834 |
{ |
|
835 |
NS_LOG_FUNCTION (this); |
|
836 |
} |
|
837 |
||
838 |
||
839 |
void |
|
840 |
LteEnbRrc::DoDispose () |
|
841 |
{ |
|
842 |
NS_LOG_FUNCTION (this); |
|
843 |
delete m_cmacSapUser; |
|
9406 | 844 |
delete m_rrcSapProvider; |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
845 |
delete m_x2SapUser; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
846 |
delete m_s1SapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
847 |
delete m_cphySapUser; |
7886 | 848 |
} |
849 |
||
850 |
TypeId |
|
851 |
LteEnbRrc::GetTypeId (void) |
|
852 |
{ |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
853 |
NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId"); |
7886 | 854 |
static TypeId tid = TypeId ("ns3::LteEnbRrc") |
855 |
.SetParent<Object> () |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
856 |
.AddConstructor<LteEnbRrc> () |
9406 | 857 |
.AddAttribute ("UeMap", "List of UeManager by C-RNTI.", |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
858 |
ObjectMapValue (), |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
859 |
MakeObjectMapAccessor (&LteEnbRrc::m_ueMap), |
9406 | 860 |
MakeObjectMapChecker<UeManager> ()) |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
861 |
.AddAttribute ("DefaultTransmissionMode", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
862 |
"The default UEs' transmission mode (0: SISO)", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
863 |
UintegerValue (0), // default tx-mode |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
864 |
MakeUintegerAccessor (&LteEnbRrc::m_defaultTransmissionMode), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
865 |
MakeUintegerChecker<uint8_t> ()) |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
866 |
.AddAttribute ("EpsBearerToRlcMapping", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
867 |
"Specify which type of RLC will be used for each type of EPS bearer. ", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
868 |
EnumValue (RLC_SM_ALWAYS), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
869 |
MakeEnumAccessor (&LteEnbRrc::m_epsBearerToRlcMapping), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
870 |
MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
871 |
RLC_UM_ALWAYS, "RlcUmAlways", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
872 |
RLC_AM_ALWAYS, "RlcAmAlways", |
9406 | 873 |
PER_BASED, "PacketErrorRateBased")) |
874 |
.AddAttribute ("SystemInformationPeriodicity", |
|
875 |
"The interval for sending system information", |
|
876 |
TimeValue (MilliSeconds (80)), |
|
877 |
MakeTimeAccessor (&LteEnbRrc::m_systemInformationPeriodicity), |
|
878 |
MakeTimeChecker ()) |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
879 |
; |
7886 | 880 |
return tid; |
881 |
} |
|
882 |
||
883 |
void |
|
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
884 |
LteEnbRrc::SetEpcX2SapProvider (EpcX2SapProvider * s) |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
885 |
{ |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
886 |
NS_LOG_FUNCTION (this << s); |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
887 |
m_x2SapProvider = s; |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
888 |
} |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
889 |
|
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
890 |
EpcX2SapUser* |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
891 |
LteEnbRrc::GetEpcX2SapUser () |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
892 |
{ |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
893 |
NS_LOG_FUNCTION (this); |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
894 |
return m_x2SapUser; |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
895 |
} |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
896 |
|
7886 | 897 |
void |
898 |
LteEnbRrc::SetLteEnbCmacSapProvider (LteEnbCmacSapProvider * s) |
|
899 |
{ |
|
900 |
NS_LOG_FUNCTION (this << s); |
|
901 |
m_cmacSapProvider = s; |
|
902 |
} |
|
903 |
||
904 |
LteEnbCmacSapUser* |
|
905 |
LteEnbRrc::GetLteEnbCmacSapUser () |
|
906 |
{ |
|
907 |
NS_LOG_FUNCTION (this); |
|
908 |
return m_cmacSapUser; |
|
909 |
} |
|
910 |
||
911 |
void |
|
9406 | 912 |
LteEnbRrc::SetLteEnbRrcSapUser (LteEnbRrcSapUser * s) |
913 |
{ |
|
914 |
NS_LOG_FUNCTION (this << s); |
|
915 |
m_rrcSapUser = s; |
|
916 |
} |
|
917 |
||
918 |
LteEnbRrcSapProvider* |
|
919 |
LteEnbRrc::GetLteEnbRrcSapProvider () |
|
7886 | 920 |
{ |
921 |
NS_LOG_FUNCTION (this); |
|
9406 | 922 |
return m_rrcSapProvider; |
7886 | 923 |
} |
924 |
||
925 |
void |
|
926 |
LteEnbRrc::SetLteMacSapProvider (LteMacSapProvider * s) |
|
927 |
{ |
|
928 |
NS_LOG_FUNCTION (this); |
|
929 |
m_macSapProvider = s; |
|
930 |
} |
|
931 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
932 |
void |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
933 |
LteEnbRrc::SetS1SapProvider (EpcEnbS1SapProvider * s) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
934 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
935 |
m_s1SapProvider = s; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
936 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
937 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
938 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
939 |
EpcEnbS1SapUser* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
940 |
LteEnbRrc::GetS1SapUser () |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
941 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
942 |
return m_s1SapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
943 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
944 |
|
9406 | 945 |
void |
946 |
LteEnbRrc::SetLteEnbCphySapProvider (LteEnbCphySapProvider * s) |
|
947 |
{ |
|
948 |
NS_LOG_FUNCTION (this << s); |
|
949 |
m_cphySapProvider = s; |
|
950 |
} |
|
951 |
||
952 |
LteEnbCphySapUser* |
|
953 |
LteEnbRrc::GetLteEnbCphySapUser () |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
954 |
{ |
9406 | 955 |
NS_LOG_FUNCTION (this); |
956 |
return m_cphySapUser; |
|
957 |
} |
|
958 |
||
959 |
Ptr<UeManager> |
|
960 |
LteEnbRrc::GetUeManager (uint16_t rnti) |
|
961 |
{ |
|
962 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
963 |
NS_ASSERT (0 != rnti); |
|
964 |
std::map<uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); |
|
965 |
NS_ASSERT_MSG (it != m_ueMap.end (), "RNTI " << rnti << " not found in eNB with cellId " << m_cellId); |
|
966 |
return it->second; |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
967 |
} |
7886 | 968 |
|
969 |
void |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
970 |
LteEnbRrc::ConfigureCell (uint8_t ulBandwidth, uint8_t dlBandwidth, uint16_t ulEarfcn, uint16_t dlEarfcn, uint16_t cellId) |
7886 | 971 |
{ |
972 |
NS_LOG_FUNCTION (this); |
|
973 |
NS_ASSERT (!m_configured); |
|
974 |
m_cmacSapProvider->ConfigureMac (ulBandwidth, dlBandwidth); |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
975 |
m_cphySapProvider->SetBandwidth (ulBandwidth, dlBandwidth); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
976 |
m_cphySapProvider->SetEarfcn (ulEarfcn, dlEarfcn); |
9406 | 977 |
m_dlEarfcn = dlEarfcn; |
978 |
m_ulEarfcn = ulEarfcn; |
|
979 |
m_dlBandwidth = dlBandwidth; |
|
980 |
m_ulBandwidth = ulBandwidth; |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
981 |
m_cellId = cellId; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
982 |
m_cphySapProvider->SetCellId (cellId); |
9406 | 983 |
LteRrcSap::MasterInformationBlock mib; |
984 |
mib.dlBandwidth = m_dlBandwidth; |
|
985 |
m_cphySapProvider->SetMasterInformationBlock (mib); |
|
7886 | 986 |
m_configured = true; |
9406 | 987 |
|
988 |
// the first time System Information is sent |
|
989 |
Simulator::Schedule (MilliSeconds (16), &LteEnbRrc::SendSystemInformation, this); |
|
990 |
} |
|
991 |
||
992 |
||
993 |
void |
|
994 |
LteEnbRrc::SetCellId (uint16_t cellId) |
|
995 |
{ |
|
996 |
m_cellId = cellId; |
|
997 |
} |
|
998 |
||
999 |
bool |
|
1000 |
LteEnbRrc::SendData (Ptr<Packet> packet) |
|
1001 |
{ |
|
1002 |
NS_LOG_FUNCTION (this << packet); |
|
1003 |
||
1004 |
EpsBearerTag tag; |
|
1005 |
bool found = packet->RemovePacketTag (tag); |
|
1006 |
NS_ASSERT_MSG (found, "no EpsBearerTag found in packet to be sent"); |
|
1007 |
Ptr<UeManager> ueManager = GetUeManager (tag.GetRnti ()); |
|
1008 |
ueManager->SendData (tag.GetBid (), packet); |
|
1009 |
||
1010 |
return true; |
|
1011 |
} |
|
1012 |
||
1013 |
void |
|
1014 |
LteEnbRrc::SetForwardUpCallback (Callback <void, Ptr<Packet> > cb) |
|
1015 |
{ |
|
1016 |
m_forwardUpCallback = cb; |
|
7886 | 1017 |
} |
1018 |
||
9406 | 1019 |
|
1020 |
void |
|
1021 |
LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId) |
|
7886 | 1022 |
{ |
9406 | 1023 |
NS_LOG_FUNCTION (this << rnti << cellId); |
1024 |
NS_LOG_LOGIC ("Request to send HANDOVER REQUEST"); |
|
1025 |
NS_ASSERT (m_configured); |
|
1026 |
||
1027 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1028 |
|
9406 | 1029 |
EpcX2SapProvider::HandoverRequestParams params; |
1030 |
params.oldEnbUeX2apId = rnti; |
|
1031 |
params.cause = EpcX2SapProvider::HandoverDesirableForRadioReason; |
|
1032 |
params.sourceCellId = m_cellId; |
|
1033 |
params.targetCellId = cellId; |
|
1034 |
params.ueAggregateMaxBitRateDownlink = 200 * 1000; |
|
1035 |
params.ueAggregateMaxBitRateUplink = 100 * 1000; |
|
1036 |
params.bearers = ueManager->GetErabList (); |
|
1037 |
||
1038 |
LteRrcSap::HandoverPreparationInfo hpi; |
|
1039 |
hpi.asConfig.sourceUeIdentity = rnti; |
|
1040 |
hpi.asConfig.sourceDlCarrierFreq = m_dlEarfcn; |
|
1041 |
hpi.asConfig.sourceRadioResourceConfig = ueManager->GetRadioResourceConfigForHandoverPreparationInfo (); |
|
1042 |
params.rrcContext = m_rrcSapUser->EncodeHandoverPreparationInformation (hpi); |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1043 |
|
9406 | 1044 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
1045 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
|
1046 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
|
1047 |
NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); |
|
1048 |
||
1049 |
m_x2SapProvider->SendHandoverRequest (params); |
|
1050 |
} |
|
9346 | 1051 |
|
9406 | 1052 |
void |
1053 |
LteEnbRrc::DoCompleteSetupUe (uint16_t rnti, LteEnbRrcSapProvider::CompleteSetupUeParameters params) |
|
1054 |
{ |
|
1055 |
NS_LOG_FUNCTION (this << rnti); |
|
1056 |
GetUeManager (rnti)->CompleteSetupUe (params); |
|
1057 |
} |
|
9346 | 1058 |
|
9406 | 1059 |
void |
1060 |
LteEnbRrc::DoRecvRrcConnectionRequest (uint16_t rnti, LteRrcSap::RrcConnectionRequest msg) |
|
1061 |
{ |
|
1062 |
NS_LOG_FUNCTION (this << rnti); |
|
1063 |
GetUeManager (rnti)->RecvRrcConnectionRequest (msg); |
|
1064 |
} |
|
1065 |
||
1066 |
void |
|
1067 |
LteEnbRrc::DoRecvRrcConnectionSetupCompleted (uint16_t rnti, LteRrcSap::RrcConnectionSetupCompleted msg) |
|
1068 |
{ |
|
1069 |
NS_LOG_FUNCTION (this << rnti); |
|
1070 |
GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg); |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1071 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1072 |
|
9346 | 1073 |
void |
9406 | 1074 |
LteEnbRrc::DoRecvRrcConnectionReconfigurationCompleted (uint16_t rnti, LteRrcSap::RrcConnectionReconfigurationCompleted msg) |
1075 |
{ |
|
1076 |
NS_LOG_FUNCTION (this << rnti); |
|
1077 |
GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg); |
|
1078 |
} |
|
1079 |
||
1080 |
void |
|
1081 |
LteEnbRrc::DoRecvRrcConnectionReestablishmentRequest (uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentRequest msg) |
|
1082 |
{ |
|
1083 |
NS_LOG_FUNCTION (this << rnti); |
|
1084 |
GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg); |
|
1085 |
} |
|
1086 |
||
1087 |
void |
|
1088 |
LteEnbRrc::DoRecvRrcConnectionReestablishmentComplete (uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentComplete msg) |
|
1089 |
{ |
|
1090 |
NS_LOG_FUNCTION (this << rnti); |
|
1091 |
GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg); |
|
1092 |
} |
|
1093 |
||
1094 |
||
1095 |
void |
|
1096 |
LteEnbRrc::DoDataRadioBearerSetupRequest (EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters request) |
|
1097 |
{ |
|
1098 |
EpcEnbS1SapProvider::S1BearerSetupRequestParameters response; |
|
1099 |
Ptr<UeManager> ueManager = GetUeManager (request.rnti); |
|
1100 |
response.rnti = request.rnti; |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
1101 |
response.bid = ueManager->SetupDataRadioBearer (request.bearer, request.gtpTeid, request.transportLayerAddress); |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
1102 |
response.gtpTeid = request.gtpTeid; |
9406 | 1103 |
if (m_s1SapProvider) |
1104 |
{ |
|
1105 |
m_s1SapProvider->S1BearerSetupRequest (response); |
|
1106 |
} |
|
1107 |
ueManager->ScheduleRrcConnectionReconfiguration (); |
|
1108 |
} |
|
1109 |
||
1110 |
||
1111 |
void |
|
1112 |
LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams params) |
|
7886 | 1113 |
{ |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1114 |
NS_LOG_FUNCTION (this); |
9406 | 1115 |
|
1116 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST"); |
|
1117 |
||
1118 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
|
1119 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
|
1120 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
|
1121 |
||
1122 |
uint16_t rnti = AddUe (UeManager::HANDOVER_JOINING); |
|
9407 | 1123 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
1124 |
ueManager->SetSource (params.sourceCellId, params.oldEnbUeX2apId); |
|
9406 | 1125 |
|
1126 |
for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = params.bearers.begin (); |
|
1127 |
it != params.bearers.end (); |
|
1128 |
++it) |
|
1129 |
{ |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
1130 |
ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->gtpTeid, it->transportLayerAddress); |
9406 | 1131 |
} |
1132 |
||
1133 |
LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetHandoverCommand (); |
|
1134 |
Ptr<Packet> encodedHandoverCommand = m_rrcSapUser->EncodeHandoverCommand (handoverCommand); |
|
1135 |
||
1136 |
NS_LOG_LOGIC ("Send X2 message: HANDOVER REQUEST ACK"); |
|
1137 |
||
1138 |
EpcX2SapProvider::HandoverRequestAckParams ackParams; |
|
1139 |
ackParams.oldEnbUeX2apId = params.oldEnbUeX2apId; |
|
1140 |
ackParams.newEnbUeX2apId = rnti; |
|
1141 |
ackParams.sourceCellId = params.sourceCellId; |
|
1142 |
ackParams.targetCellId = params.targetCellId; |
|
1143 |
ackParams.rrcContext = encodedHandoverCommand; |
|
1144 |
||
1145 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << ackParams.oldEnbUeX2apId); |
|
1146 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << ackParams.newEnbUeX2apId); |
|
1147 |
NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId); |
|
1148 |
NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId); |
|
1149 |
||
1150 |
m_x2SapProvider->SendHandoverRequestAck (ackParams); |
|
9346 | 1151 |
} |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1152 |
|
9346 | 1153 |
void |
9406 | 1154 |
LteEnbRrc::DoRecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params) |
9346 | 1155 |
{ |
1156 |
NS_LOG_FUNCTION (this); |
|
9406 | 1157 |
|
1158 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK"); |
|
1159 |
||
1160 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
|
1161 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
|
1162 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
|
1163 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
|
1164 |
||
1165 |
uint16_t rnti = params.oldEnbUeX2apId; |
|
1166 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
|
1167 |
||
1168 |
// note: the Handover command from the target eNB to the source eNB |
|
9407 | 1169 |
// is expected to be sent transparently to the UE; however, here we |
9406 | 1170 |
// decode the message and eventually reencode it. This way we can |
1171 |
// support both a real RRC protocol implementation and an ideal one |
|
1172 |
// without actual RRC protocol encoding. |
|
1173 |
||
1174 |
Ptr<Packet> encodedHandoverCommand = params.rrcContext; |
|
1175 |
LteRrcSap::RrcConnectionReconfiguration handoverCommand = m_rrcSapUser->DecodeHandoverCommand (encodedHandoverCommand); |
|
1176 |
ueManager->SendHandoverCommand (handoverCommand); |
|
1177 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1178 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1179 |
|
9407 | 1180 |
void |
9456
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1181 |
LteEnbRrc::DoRecvHandoverPreparationFailure (EpcX2SapUser::HandoverPreparationFailureParams params) |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1182 |
{ |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1183 |
NS_LOG_FUNCTION (this); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1184 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1185 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE"); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1186 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1187 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1188 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1189 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1190 |
NS_LOG_LOGIC ("cause = " << params.cause); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1191 |
NS_LOG_LOGIC ("criticalityDiagnostics = " << params.criticalityDiagnostics); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1192 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1193 |
NS_ASSERT ("Processing of HANDOVER PREPARATION FAILURE X2 message IS NOT IMPLEMENTED"); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1194 |
} |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1195 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1196 |
void |
9479
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1197 |
LteEnbRrc::DoRecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1198 |
{ |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1199 |
NS_LOG_FUNCTION (this); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1200 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1201 |
NS_LOG_LOGIC ("Recv X2 message: SN STATUS TRANSFER"); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1202 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1203 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1204 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1205 |
NS_LOG_LOGIC ("erabsSubjectToStatusTransferList size = " << params.erabsSubjectToStatusTransferList.size ()); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1206 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1207 |
NS_ASSERT ("Processing of SN STATUS TRANSFER X2 message IS NOT IMPLEMENTED"); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1208 |
} |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1209 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1210 |
void |
9407 | 1211 |
LteEnbRrc::DoRecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) |
9346 | 1212 |
{ |
1213 |
NS_LOG_FUNCTION (this); |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1214 |
|
9407 | 1215 |
NS_LOG_LOGIC ("Recv X2 message: UE CONTEXT RELEASE"); |
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1216 |
|
9407 | 1217 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
1218 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
|
1219 |
||
1220 |
uint16_t rnti = params.oldEnbUeX2apId; |
|
1221 |
RemoveUe (rnti); |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1222 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1223 |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1224 |
void |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1225 |
LteEnbRrc::DoRecvLoadInformation (EpcX2SapUser::LoadInformationParams params) |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1226 |
{ |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1227 |
NS_LOG_FUNCTION (this); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1228 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1229 |
NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION"); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1230 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1231 |
NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationList.size ()); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1232 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1233 |
NS_ASSERT ("Processing of LOAD INFORMATION X2 message IS NOT IMPLEMENTED"); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1234 |
} |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1235 |
|
9435
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1236 |
void |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1237 |
LteEnbRrc::DoRecvResourceStatusUpdate (EpcX2SapUser::ResourceStatusUpdateParams params) |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1238 |
{ |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1239 |
NS_LOG_FUNCTION (this); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1240 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1241 |
NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE"); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1242 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1243 |
NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurementResultList.size ()); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1244 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1245 |
NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED"); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1246 |
} |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1247 |
|
9555
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1248 |
void |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1249 |
LteEnbRrc::DoRecvUeData (EpcX2SapUser::UeDataParams params) |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1250 |
{ |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1251 |
NS_LOG_FUNCTION (this); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1252 |
|
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1253 |
NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface"); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1254 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1255 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1256 |
NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1257 |
NS_LOG_LOGIC ("ueData = " << params.ueData); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1258 |
NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ()); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1259 |
|
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1260 |
NS_ASSERT ("Processing of UE DATA FORWARDING through X2 interface IS NOT IMPLEMENTED"); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1261 |
} |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1262 |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1263 |
|
9406 | 1264 |
uint16_t |
1265 |
LteEnbRrc::DoAllocateTemporaryCellRnti () |
|
1266 |
{ |
|
1267 |
NS_LOG_FUNCTION (this); |
|
1268 |
return AddUe (UeManager::INITIAL_RANDOM_ACCESS); |
|
1269 |
} |
|
1270 |
||
1271 |
void |
|
1272 |
LteEnbRrc::DoRrcConfigurationUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
|
1273 |
{ |
|
1274 |
Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti); |
|
1275 |
ueManager->CmacUeConfigUpdateInd (cmacParams); |
|
1276 |
} |
|
1277 |
||
1278 |
void |
|
1279 |
LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
|
1280 |
{ |
|
1281 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
1282 |
NS_FATAL_ERROR ("not implemented"); |
|
1283 |
} |
|
1284 |
||
1285 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1286 |
|
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1287 |
uint16_t |
9406 | 1288 |
LteEnbRrc::AddUe (UeManager::State state) |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1289 |
{ |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1290 |
NS_LOG_FUNCTION (this); |
9406 | 1291 |
bool found = false; |
1292 |
uint16_t rnti; |
|
1293 |
for (rnti = m_lastAllocatedRnti; |
|
1294 |
(rnti != m_lastAllocatedRnti - 1) && (!found); |
|
1295 |
++rnti) |
|
1296 |
{ |
|
1297 |
if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ())) |
|
1298 |
{ |
|
1299 |
found = true; |
|
1300 |
break; |
|
1301 |
} |
|
1302 |
} |
|
9346 | 1303 |
|
9406 | 1304 |
NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UEs in a cell?)"); |
1305 |
m_lastAllocatedRnti = rnti; |
|
1306 |
Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state); |
|
1307 |
m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager)); |
|
1308 |
NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << m_cellId << " srs CI " << ueManager->GetSrsConfigurationIndex ()); |
|
7886 | 1309 |
return rnti; |
1310 |
} |
|
1311 |
||
1312 |
void |
|
1313 |
LteEnbRrc::RemoveUe (uint16_t rnti) |
|
1314 |
{ |
|
1315 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
9406 | 1316 |
std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); |
1317 |
NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown rnti " << rnti); |
|
1318 |
uint16_t srsCi = (*it).second->GetSrsConfigurationIndex (); |
|
1319 |
m_ueMap.erase (it); |
|
1320 |
// need to do this after UeManager has been deleted |
|
1321 |
RemoveSrsConfigurationIndex (srsCi); |
|
1322 |
} |
|
7886 | 1323 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1324 |
TypeId |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1325 |
LteEnbRrc::GetRlcType (EpsBearer bearer) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1326 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1327 |
switch (m_epsBearerToRlcMapping) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1328 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1329 |
case RLC_SM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1330 |
return LteRlcSm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1331 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1332 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1333 |
case RLC_UM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1334 |
return LteRlcUm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1335 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1336 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1337 |
case RLC_AM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1338 |
return LteRlcAm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1339 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1340 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1341 |
case PER_BASED: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1342 |
if (bearer.GetPacketErrorLossRate () > 1.0e-5) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1343 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1344 |
return LteRlcUm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1345 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1346 |
else |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1347 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1348 |
return LteRlcAm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1349 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1350 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1351 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1352 |
default: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1353 |
return LteRlcSm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1354 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1355 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1356 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1357 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1358 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
1359 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
1360 |
|
9036 | 1361 |
// from 3GPP TS 36.213 table 8.2-1 UE Specific SRS Periodicity |
9406 | 1362 |
const uint8_t SRS_ENTRIES = 9; |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1363 |
uint16_t g_srsPeriodicity[SRS_ENTRIES] = {0, 2, 5, 10, 20, 40, 80, 160, 320}; |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1364 |
uint16_t g_srsCiLow[SRS_ENTRIES] = {0, 0, 2, 7, 17, 37, 77, 157, 317}; |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1365 |
uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156, 316, 636}; |
9036 | 1366 |
|
1367 |
uint16_t |
|
1368 |
LteEnbRrc::GetNewSrsConfigurationIndex () |
|
1369 |
{ |
|
1370 |
NS_LOG_FUNCTION (this << m_ueSrsConfigurationIndexSet.size ()); |
|
1371 |
// SRS |
|
1372 |
if (m_srsCurrentPeriodicityId==0) |
|
1373 |
{ |
|
1374 |
// no UEs -> init |
|
1375 |
m_ueSrsConfigurationIndexSet.insert (0); |
|
1376 |
m_lastAllocatedConfigurationIndex = 0; |
|
1377 |
m_srsCurrentPeriodicityId++; |
|
1378 |
||
1379 |
return 0; |
|
1380 |
} |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1381 |
NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1382 |
NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId] << " set " << m_ueSrsConfigurationIndexSet.size ()); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1383 |
if (m_ueSrsConfigurationIndexSet.size () == g_srsPeriodicity[m_srsCurrentPeriodicityId]) |
9036 | 1384 |
{ |
9406 | 1385 |
NS_LOG_DEBUG (this << " SRS reconfigure CIs " << g_srsPeriodicity[m_srsCurrentPeriodicityId] << " to " << g_srsPeriodicity[m_srsCurrentPeriodicityId+1] << " at " << Simulator::Now ()); |
9036 | 1386 |
// increase the current periocity for having enough CIs |
1387 |
m_ueSrsConfigurationIndexSet.clear (); |
|
1388 |
m_srsCurrentPeriodicityId++; |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1389 |
NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); |
9036 | 1390 |
// update all the UE's CI |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1391 |
uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; |
9406 | 1392 |
std::map<uint16_t, Ptr<UeManager> >::iterator it; |
9036 | 1393 |
for (it = m_ueMap.begin (); it != m_ueMap.end (); it++) |
1394 |
{ |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1395 |
(*it).second->SetSrsConfigurationIndex (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1396 |
m_ueSrsConfigurationIndexSet.insert (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1397 |
m_lastAllocatedConfigurationIndex = srcCi; |
9406 | 1398 |
|
1399 |
// update UeManager and trigger/update RRC connection reconfiguration |
|
1400 |
(*it).second->SetSrsConfigurationIndex (srcCi); |
|
1401 |
||
1402 |
// configure PHY |
|
1403 |
m_cphySapProvider->SetSrsConfigurationIndex ((*it).first, srcCi); |
|
1404 |
||
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1405 |
srcCi++; |
9036 | 1406 |
} |
1407 |
m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex + 1); |
|
1408 |
m_lastAllocatedConfigurationIndex++; |
|
1409 |
} |
|
1410 |
else |
|
1411 |
{ |
|
1412 |
// find a CI from the available ones |
|
1413 |
std::set<uint16_t>::reverse_iterator rit = m_ueSrsConfigurationIndexSet.rbegin (); |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1414 |
NS_LOG_DEBUG (this << " lower bound " << (*rit) << " of " << g_srsCiHigh[m_srsCurrentPeriodicityId]); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1415 |
if ((*rit) <= g_srsCiHigh[m_srsCurrentPeriodicityId]) |
9036 | 1416 |
{ |
1417 |
// got it from the upper bound |
|
1418 |
m_lastAllocatedConfigurationIndex = (*rit) + 1; |
|
1419 |
m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex); |
|
1420 |
} |
|
1421 |
else |
|
1422 |
{ |
|
1423 |
// look for released ones |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1424 |
for (uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; srcCi < g_srsCiHigh[m_srsCurrentPeriodicityId]; srcCi++) |
9036 | 1425 |
{ |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1426 |
std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); |
9036 | 1427 |
if (it==m_ueSrsConfigurationIndexSet.end ()) |
1428 |
{ |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1429 |
m_lastAllocatedConfigurationIndex = srcCi; |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1430 |
m_ueSrsConfigurationIndexSet.insert (srcCi); |
9036 | 1431 |
break; |
1432 |
} |
|
1433 |
} |
|
1434 |
} |
|
1435 |
} |
|
1436 |
return m_lastAllocatedConfigurationIndex; |
|
1437 |
||
1438 |
} |
|
1439 |
||
1440 |
||
1441 |
void |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1442 |
LteEnbRrc::RemoveSrsConfigurationIndex (uint16_t srcCi) |
9036 | 1443 |
{ |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1444 |
NS_LOG_FUNCTION (this << srcCi); |
9346 | 1445 |
NS_FATAL_ERROR ("I though this method was unused so far..."); |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1446 |
std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1447 |
NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove unkwown SRS CI " << srcCi); |
9036 | 1448 |
m_ueSrsConfigurationIndexSet.erase (it); |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1449 |
NS_ASSERT (m_srsCurrentPeriodicityId > 1); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1450 |
if (m_ueSrsConfigurationIndexSet.size () < g_srsPeriodicity[m_srsCurrentPeriodicityId - 1]) |
9036 | 1451 |
{ |
1452 |
// reduce the periodicity |
|
1453 |
m_ueSrsConfigurationIndexSet.clear (); |
|
1454 |
m_srsCurrentPeriodicityId--; |
|
1455 |
if (m_srsCurrentPeriodicityId==0) |
|
1456 |
{ |
|
1457 |
// no active users : renitialize structures |
|
1458 |
m_lastAllocatedConfigurationIndex = 0; |
|
1459 |
} |
|
1460 |
else |
|
1461 |
{ |
|
1462 |
// update all the UE's CI |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1463 |
uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; |
9406 | 1464 |
std::map<uint16_t, Ptr<UeManager> >::iterator it; |
9036 | 1465 |
for (it = m_ueMap.begin (); it != m_ueMap.end (); it++) |
1466 |
{ |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1467 |
(*it).second->SetSrsConfigurationIndex (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1468 |
m_ueSrsConfigurationIndexSet.insert (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1469 |
m_lastAllocatedConfigurationIndex = srcCi; |
9406 | 1470 |
|
1471 |
||
1472 |
// update UeManager and trigger/update RRC connection reconfiguration |
|
1473 |
(*it).second->SetSrsConfigurationIndex (srcCi); |
|
1474 |
||
1475 |
// configure PHY |
|
1476 |
m_cphySapProvider->SetSrsConfigurationIndex ((*it).first, (*it).second->GetSrsConfigurationIndex ()); |
|
1477 |
||
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
1478 |
srcCi++; |
9036 | 1479 |
} |
1480 |
} |
|
1481 |
} |
|
1482 |
} |
|
1483 |
||
9406 | 1484 |
uint8_t |
1485 |
LteEnbRrc::GetLogicalChannelGroup (EpsBearer bearer) |
|
7886 | 1486 |
{ |
9406 | 1487 |
if (bearer.IsGbr ()) |
1488 |
{ |
|
1489 |
return 1; |
|
1490 |
} |
|
1491 |
else |
|
1492 |
{ |
|
1493 |
return 2; |
|
1494 |
} |
|
1495 |
} |
|
1496 |
||
1497 |
uint8_t |
|
1498 |
LteEnbRrc::GetLogicalChannelPriority (EpsBearer bearer) |
|
1499 |
{ |
|
1500 |
return bearer.qci; |
|
7886 | 1501 |
} |
1502 |
||
1503 |
void |
|
9406 | 1504 |
LteEnbRrc::SendSystemInformation () |
9036 | 1505 |
{ |
1506 |
NS_LOG_FUNCTION (this); |
|
9406 | 1507 |
// for simplicity, we use the same periodicity for all sibs |
1508 |
// note that in real systems the periodicy of each sibs could be different |
|
1509 |
LteRrcSap::SystemInformation si; |
|
1510 |
si.haveSib2 = true; |
|
1511 |
si.sib2.freqInfo.ulCarrierFreq = m_ulEarfcn; |
|
1512 |
si.sib2.freqInfo.ulBandwidth = m_ulBandwidth; |
|
1513 |
m_rrcSapUser->SendSystemInformation (si); |
|
1514 |
Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInformation, this); |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1515 |
} |
7886 | 1516 |
|
1517 |
} // namespace ns3 |
|
1518 |