OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s) | 132 UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s) |
133 : m_lastAllocatedDrbid (0), | 133 : m_lastAllocatedDrbid (0), |
134 m_rnti (rnti), | 134 m_rnti (rnti), |
135 m_imsi (0), | 135 m_imsi (0), |
136 m_lastRrcTransactionIdentifier (0), | 136 m_lastRrcTransactionIdentifier (0), |
137 m_rrc (rrc), | 137 m_rrc (rrc), |
138 m_state (s), | 138 m_state (s), |
139 m_pendingRrcConnectionReconfiguration (false), | 139 m_pendingRrcConnectionReconfiguration (false), |
140 m_sourceX2apId (0), | 140 m_sourceX2apId (0), |
141 m_sourceCellId (0), | 141 m_sourceCellId (0), |
142 m_needTransmissionModeConfiguration (false) | 142 m_needPhyMacConfiguration (false) |
143 {· | 143 {· |
144 NS_LOG_FUNCTION (this); | 144 NS_LOG_FUNCTION (this); |
145 } | 145 } |
146 | 146 |
147 void | 147 void |
148 UeManager::DoInitialize () | 148 UeManager::DoInitialize () |
149 { | 149 { |
150 NS_LOG_FUNCTION (this); | 150 NS_LOG_FUNCTION (this); |
151 m_drbPdcpSapUser = new LtePdcpSpecificLtePdcpSapUser<UeManager> (this); | 151 m_drbPdcpSapUser = new LtePdcpSpecificLtePdcpSapUser<UeManager> (this); |
152 | 152 |
153 m_physicalConfigDedicated.haveAntennaInfoDedicated = true; | 153 m_physicalConfigDedicated.haveAntennaInfoDedicated = true; |
154 m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTrans
missionMode; | 154 m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTrans
missionMode; |
155 m_physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true; | 155 m_physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true; |
156 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = m_rrc->
GetNewSrsConfigurationIndex (); | 156 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = m_rrc->
GetNewSrsConfigurationIndex (); |
157 m_physicalConfigDedicated.soundingRsUlConfigDedicated.type = LteRrcSap::Soundi
ngRsUlConfigDedicated::SETUP; | 157 m_physicalConfigDedicated.soundingRsUlConfigDedicated.type = LteRrcSap::Soundi
ngRsUlConfigDedicated::SETUP; |
158 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth = 0; | 158 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth = 0; |
| 159 m_physicalConfigDedicated.havePdschConfigDedicated = true; |
| 160 m_physicalConfigDedicated.pdschConfigDedicated.pa = LteRrcSap::PdschConfigDedi
cated::dB0; |
159 | 161 |
160 m_rrc->m_cmacSapProvider->AddUe (m_rnti); | 162 m_rrc->m_cmacSapProvider->AddUe (m_rnti); |
161 m_rrc->m_cphySapProvider->AddUe (m_rnti); | 163 m_rrc->m_cphySapProvider->AddUe (m_rnti); |
162 | 164 |
163 // setup the eNB side of SRB0 | 165 // setup the eNB side of SRB0 |
164 { | 166 { |
165 uint8_t lcid = 0; | 167 uint8_t lcid = 0; |
166 | 168 |
167 Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> (); | 169 Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> (); |
168 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); | 170 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
169 rlc->SetRnti (m_rnti); | 171 rlc->SetRnti (m_rnti); |
170 rlc->SetLcId (lcid); | 172 rlc->SetLcId (lcid); |
171 | 173 |
172 m_srb0 = CreateObject<LteSignalingRadioBearerInfo> (); | 174 m_srb0 = CreateObject<LteSignalingRadioBearerInfo> (); |
173 m_srb0->m_rlc = rlc; | 175 m_srb0->m_rlc = rlc; |
174 m_srb0->m_srbIdentity = 0; | 176 m_srb0->m_srbIdentity = 0; |
175 // no need to store logicalChannelConfig as SRB0 is pre-configured | 177 // no need to store logicalChannelConfig as SRB0 is pre-configured |
176 | 178 |
177 LteEnbCmacSapProvider::LcInfo lcinfo; | 179 LteEnbCmacSapProvider::LcInfo lcinfo; |
178 lcinfo.rnti = m_rnti; | 180 lcinfo.rnti = m_rnti; |
179 lcinfo.lcId = lcid; | 181 lcinfo.lcId = lcid; |
180 // leave the rest of lcinfo empty as CCCH (LCID 0) is pre-configured | 182 // leave the rest of lcinfo empty as CCCH (LCID 0) is pre-configured |
181 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); | 183 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
182 | 184 |
183 } | 185 } |
184 | 186 |
185 // setup the eNB side of SRB1; the UE side will be set up upon RRC connection
establishment | 187 // setup the eNB side of SRB1; the UE side will be set up upon RRC connection
establishment |
186 { | 188 { |
187 uint8_t lcid = 1; | 189 uint8_t lcid = 1; |
188 | 190 |
189 Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> (); | 191 Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> (); |
190 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); | 192 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
191 rlc->SetRnti (m_rnti); | 193 rlc->SetRnti (m_rnti); |
192 rlc->SetLcId (lcid); | 194 rlc->SetLcId (lcid); |
193 | 195 |
194 Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); | 196 Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
195 pdcp->SetRnti (m_rnti); | 197 pdcp->SetRnti (m_rnti); |
196 pdcp->SetLcId (lcid); | 198 pdcp->SetLcId (lcid); |
197 pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); | 199 pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); |
198 pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); | 200 pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
199 rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); | 201 rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
200 | 202 |
201 m_srb1 = CreateObject<LteSignalingRadioBearerInfo> (); | 203 m_srb1 = CreateObject<LteSignalingRadioBearerInfo> (); |
202 m_srb1->m_rlc = rlc; | 204 m_srb1->m_rlc = rlc; |
203 m_srb1->m_pdcp = pdcp; | 205 m_srb1->m_pdcp = pdcp; |
204 m_srb1->m_srbIdentity = 1; | 206 m_srb1->m_srbIdentity = 1; |
205 m_srb1->m_logicalChannelConfig.priority = 0; | 207 m_srb1->m_logicalChannelConfig.priority = 0; |
206 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; | 208 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; |
207 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; | 209 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; |
208 m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; | 210 m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; |
209 | 211 |
210 LteEnbCmacSapProvider::LcInfo lcinfo; | 212 LteEnbCmacSapProvider::LcInfo lcinfo; |
211 lcinfo.rnti = m_rnti; | 213 lcinfo.rnti = m_rnti; |
212 lcinfo.lcId = lcid; | 214 lcinfo.lcId = lcid; |
213 lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 | 215 lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 |
214 lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires
a CQI even for SRBs... | 216 lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires
a CQI even for SRBs... |
215 lcinfo.isGbr = true; | 217 lcinfo.isGbr = true; |
216 lcinfo.mbrUl = 1e6; | 218 lcinfo.mbrUl = 1e6; |
217 lcinfo.mbrDl = 1e6; | 219 lcinfo.mbrDl = 1e6; |
218 lcinfo.gbrUl = 1e4; | 220 lcinfo.gbrUl = 1e4; |
219 lcinfo.gbrDl = 1e4; | 221 lcinfo.gbrDl = 1e4; |
220 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); | 222 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
221 } | 223 } |
222 | 224 |
223 LteEnbRrcSapUser::SetupUeParameters ueParams; | 225 LteEnbRrcSapUser::SetupUeParameters ueParams; |
224 ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); | 226 ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); |
225 ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); | 227 ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); |
226 m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams); | 228 m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams); |
227 | 229 |
228 // configure MAC (and scheduler) | 230 // configure MAC (and scheduler) |
229 LteEnbCmacSapProvider::UeConfig req; | 231 LteEnbCmacSapProvider::UeConfig req; |
230 req.m_rnti = m_rnti; | 232 req.m_rnti = m_rnti; |
231 req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMod
e; | 233 req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMod
e; |
232 m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); | 234 m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
233 | 235 |
234 // configure PHY | 236 // configure PHY |
235 m_rrc->m_cphySapProvider->SetTransmissionMode (m_rnti, m_physicalConfigDedicat
ed.antennaInfo.transmissionMode); | 237 m_rrc->m_cphySapProvider->SetTransmissionMode (m_rnti, m_physicalConfigDedicat
ed.antennaInfo.transmissionMode); |
236 m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, m_physicalConfigDe
dicated.soundingRsUlConfigDedicated.srsConfigIndex); | 238 m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, m_physicalConfigDe
dicated.soundingRsUlConfigDedicated.srsConfigIndex); |
237 | 239 |
238 // schedule this UeManager instance to be deleted if the UE does not give any
sign of life within a reasonable time | 240 // schedule this UeManager instance to be deleted if the UE does not give any
sign of life within a reasonable time |
239 Time maxConnectionDelay; | 241 Time maxConnectionDelay; |
240 switch (m_state) | 242 switch (m_state) |
241 { | 243 { |
242 case INITIAL_RANDOM_ACCESS: | 244 case INITIAL_RANDOM_ACCESS: |
243 m_connectionTimeout = Simulator::Schedule (m_rrc->m_connectionTimeoutDurat
ion,· | 245 m_connectionTimeout = Simulator::Schedule (m_rrc->m_connectionTimeoutDurat
ion,· |
244 &LteEnbRrc::ConnectionTimeout,· | 246 &LteEnbRrc::ConnectionTimeout,· |
245 m_rrc, m_rnti); | 247 m_rrc, m_rnti); |
246 break; | 248 break; |
247 | 249 |
248 case HANDOVER_JOINING: | 250 case HANDOVER_JOINING: |
249 m_handoverJoiningTimeout = Simulator::Schedule (m_rrc->m_handoverJoiningTi
meoutDuration,· | 251 m_handoverJoiningTimeout = Simulator::Schedule (m_rrc->m_handoverJoiningTi
meoutDuration,· |
250 &LteEnbRrc::HandoverJoinin
gTimeout, | 252 &LteEnbRrc::HandoverJoinin
gTimeout, |
251 m_rrc, m_rnti); | 253 m_rrc, m_rnti); |
252 break; | 254 break; |
253 | 255 |
254 default: | 256 default: |
255 NS_FATAL_ERROR ("unexpected state " << ToString (m_state)); | 257 NS_FATAL_ERROR ("unexpected state " << ToString (m_state)); |
256 break; | 258 break; |
257 } | 259 } |
258 | 260 |
259 } | 261 } |
260 | 262 |
261 | 263 |
262 UeManager::~UeManager (void) | 264 UeManager::~UeManager (void) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 323 } |
322 | 324 |
323 void | 325 void |
324 UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gt
pTeid, Ipv4Address transportLayerAddress) | 326 UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gt
pTeid, Ipv4Address transportLayerAddress) |
325 { | 327 { |
326 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); | 328 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
327 | 329 |
328 Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> (); | 330 Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> (); |
329 uint8_t drbid = AddDataRadioBearerInfo (drbInfo); | 331 uint8_t drbid = AddDataRadioBearerInfo (drbInfo); |
330 uint8_t lcid = Drbid2Lcid (drbid);· | 332 uint8_t lcid = Drbid2Lcid (drbid);· |
331 uint8_t bid = Drbid2Bid (drbid); | 333 uint8_t bid = Drbid2Bid (drbid); |
332 NS_ASSERT_MSG ( bearerId == 0 || bid == bearerId, "bearer ID mismatch (" << (u
int32_t) bid << " != " << (uint32_t) bearerId << ", the assumption that ID are a
llocated in the same way by MME and RRC is not valid any more"); | 334 NS_ASSERT_MSG ( bearerId == 0 || bid == bearerId, "bearer ID mismatch (" << (u
int32_t) bid << " != " << (uint32_t) bearerId << ", the assumption that ID are a
llocated in the same way by MME and RRC is not valid any more"); |
333 drbInfo->m_epsBearerIdentity = bid; | 335 drbInfo->m_epsBearerIdentity = bid; |
334 drbInfo->m_drbIdentity = drbid; | 336 drbInfo->m_drbIdentity = drbid; |
335 drbInfo->m_logicalChannelIdentity = lcid; | 337 drbInfo->m_logicalChannelIdentity = lcid; |
336 drbInfo->m_gtpTeid = gtpTeid; | 338 drbInfo->m_gtpTeid = gtpTeid; |
337 drbInfo->m_transportLayerAddress = transportLayerAddress; | 339 drbInfo->m_transportLayerAddress = transportLayerAddress; |
338 | 340 |
339 if (m_state == HANDOVER_JOINING) | 341 if (m_state == HANDOVER_JOINING) |
340 { | 342 { |
341 // setup TEIDs for receiving data eventually forwarded over X2-U· | 343 // setup TEIDs for receiving data eventually forwarded over X2-U· |
342 LteEnbRrc::X2uTeidInfo x2uTeidInfo; | 344 LteEnbRrc::X2uTeidInfo x2uTeidInfo; |
343 x2uTeidInfo.rnti = m_rnti; | 345 x2uTeidInfo.rnti = m_rnti; |
344 x2uTeidInfo.drbid = drbid; | 346 x2uTeidInfo.drbid = drbid; |
345 std::pair<std::map<uint32_t, LteEnbRrc::X2uTeidInfo>::iterator, bool> | 347 std::pair<std::map<uint32_t, LteEnbRrc::X2uTeidInfo>::iterator, bool> |
346 ret = m_rrc->m_x2uTeidInfoMap.insert (std::pair<uint32_t, LteEnbRrc::X2u
TeidInfo> (gtpTeid, x2uTeidInfo)); | 348 ret = m_rrc->m_x2uTeidInfoMap.insert (std::pair<uint32_t, LteEnbRrc::X2uTe
idInfo> (gtpTeid, x2uTeidInfo)); |
347 NS_ASSERT_MSG (ret.second == true, "overwriting a pre-existing entry in m_
x2uTeidInfoMap"); | 349 NS_ASSERT_MSG (ret.second == true, "overwriting a pre-existing entry in m_
x2uTeidInfoMap"); |
348 } | 350 } |
349 | 351 |
350 TypeId rlcTypeId = m_rrc->GetRlcType (bearer); | 352 TypeId rlcTypeId = m_rrc->GetRlcType (bearer); |
351 | 353 |
352 ObjectFactory rlcObjectFactory; | 354 ObjectFactory rlcObjectFactory; |
353 rlcObjectFactory.SetTypeId (rlcTypeId); | 355 rlcObjectFactory.SetTypeId (rlcTypeId); |
354 Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> (); | 356 Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> (); |
355 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); | 357 rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
356 rlc->SetRnti (m_rnti); | 358 rlc->SetRnti (m_rnti); |
357 | 359 |
358 drbInfo->m_rlc = rlc; | 360 drbInfo->m_rlc = rlc; |
359 | 361 |
360 rlc->SetLcId (lcid); | 362 rlc->SetLcId (lcid); |
361 | 363 |
362 // we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM | 364 // we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM |
363 // if we are using RLC/SM we don't care of anything above RLC | 365 // if we are using RLC/SM we don't care of anything above RLC |
364 if (rlcTypeId != LteRlcSm::GetTypeId ()) | 366 if (rlcTypeId != LteRlcSm::GetTypeId ()) |
365 { | 367 { |
366 Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); | 368 Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
367 pdcp->SetRnti (m_rnti); | 369 pdcp->SetRnti (m_rnti); |
368 pdcp->SetLcId (lcid); | 370 pdcp->SetLcId (lcid); |
369 pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); | 371 pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); |
370 pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); | 372 pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
371 rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); | 373 rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
372 drbInfo->m_pdcp = pdcp; | 374 drbInfo->m_pdcp = pdcp; |
373 } | 375 } |
374 | 376 |
375 LteEnbCmacSapProvider::LcInfo lcinfo; | 377 LteEnbCmacSapProvider::LcInfo lcinfo; |
376 lcinfo.rnti = m_rnti; | 378 lcinfo.rnti = m_rnti; |
377 lcinfo.lcId = lcid; | 379 lcinfo.lcId = lcid; |
378 lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer); | 380 lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer); |
379 lcinfo.qci = bearer.qci; | 381 lcinfo.qci = bearer.qci; |
380 lcinfo.isGbr = bearer.IsGbr (); | 382 lcinfo.isGbr = bearer.IsGbr (); |
381 lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; | 383 lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; |
382 lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; | 384 lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; |
383 lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; | 385 lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; |
384 lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; | 386 lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; |
385 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); | 387 m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
386 | 388 |
387 if (rlcTypeId == LteRlcAm::GetTypeId ()) | 389 if (rlcTypeId == LteRlcAm::GetTypeId ()) |
388 { | 390 { |
389 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; | 391 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; |
390 } | 392 } |
391 else | 393 else |
392 { | 394 { |
393 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; | 395 drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; |
394 } | 396 } |
395 | 397 |
396 drbInfo->m_logicalChannelIdentity = lcid; | 398 drbInfo->m_logicalChannelIdentity = lcid; |
397 drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (
bearer); | 399 drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (
bearer); |
398 drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannel
Group (bearer); | 400 drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannel
Group (bearer); |
399 if (bearer.IsGbr ()) | 401 if (bearer.IsGbr ()) |
400 { | 402 { |
401 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo
.gbrUl; | 403 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo
.gbrUl; |
402 } | 404 } |
403 else | 405 else |
404 { | 406 { |
405 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; | 407 drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; |
406 } | 408 } |
407 drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; | 409 drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; |
408 | 410 |
409 ScheduleRrcConnectionReconfiguration (); | 411 ScheduleRrcConnectionReconfiguration (); |
410 } | 412 } |
411 | 413 |
412 void | 414 void |
413 UeManager::RecordDataRadioBearersToBeStarted () | 415 UeManager::RecordDataRadioBearersToBeStarted () |
414 { | 416 { |
415 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); | 417 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
416 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.
begin (); | 418 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.
begin (); |
417 it != m_drbMap.end (); | 419 it != m_drbMap.end (); |
418 ++it) | 420 ++it) |
419 { | 421 { |
420 m_drbsToBeStarted.push_back (it->first); | 422 m_drbsToBeStarted.push_back (it->first); |
421 } | 423 } |
422 } | 424 } |
423 | 425 |
424 void | 426 void |
425 UeManager::StartDataRadioBearers () | 427 UeManager::StartDataRadioBearers () |
426 { | 428 { |
427 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); | 429 NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
428 for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin (); | 430 for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin (); |
429 drbIdIt != m_drbsToBeStarted.end (); | 431 drbIdIt != m_drbsToBeStarted.end (); |
430 ++drbIdIt) | 432 ++drbIdIt) |
431 { | 433 { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 m_targetCellId = cellId; | 513 m_targetCellId = cellId; |
512 EpcX2SapProvider::HandoverRequestParams params; | 514 EpcX2SapProvider::HandoverRequestParams params; |
513 params.oldEnbUeX2apId = m_rnti; | 515 params.oldEnbUeX2apId = m_rnti; |
514 params.cause = EpcX2SapProvider::HandoverDesirableForRadioReaso
n; | 516 params.cause = EpcX2SapProvider::HandoverDesirableForRadioReaso
n; |
515 params.sourceCellId = m_rrc->m_cellId; | 517 params.sourceCellId = m_rrc->m_cellId; |
516 params.targetCellId = cellId; | 518 params.targetCellId = cellId; |
517 params.mmeUeS1apId = m_imsi; | 519 params.mmeUeS1apId = m_imsi; |
518 params.ueAggregateMaxBitRateDownlink = 200 * 1000; | 520 params.ueAggregateMaxBitRateDownlink = 200 * 1000; |
519 params.ueAggregateMaxBitRateUplink = 100 * 1000; | 521 params.ueAggregateMaxBitRateUplink = 100 * 1000; |
520 params.bearers = GetErabList (); | 522 params.bearers = GetErabList (); |
521 | 523 |
522 LteRrcSap::HandoverPreparationInfo hpi; | 524 LteRrcSap::HandoverPreparationInfo hpi; |
523 hpi.asConfig.sourceUeIdentity = m_rnti; | 525 hpi.asConfig.sourceUeIdentity = m_rnti; |
524 hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn; | 526 hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn; |
525 hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig; | 527 hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig; |
526 hpi.asConfig.sourceRadioResourceConfig = GetRadioResourceConfigForHandov
erPreparationInfo (); | 528 hpi.asConfig.sourceRadioResourceConfig = GetRadioResourceConfigForHandov
erPreparationInfo (); |
527 hpi.asConfig.sourceMasterInformationBlock.dlBandwidth = m_rrc->m_dlBandw
idth; | 529 hpi.asConfig.sourceMasterInformationBlock.dlBandwidth = m_rrc->m_dlBandw
idth; |
528 hpi.asConfig.sourceMasterInformationBlock.systemFrameNumber = 0; | 530 hpi.asConfig.sourceMasterInformationBlock.systemFrameNumber = 0; |
529 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plm
nIdentityInfo.plmnIdentity = m_rrc->m_sib1.cellAccessRelatedInfo.plmnIdentityInf
o.plmnIdentity; | 531 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plm
nIdentityInfo.plmnIdentity = m_rrc->m_sib1.cellAccessRelatedInfo.plmnIdentityInf
o.plmnIdentity; |
530 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.cel
lIdentity = m_rrc->m_cellId; | 532 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.cel
lIdentity = m_rrc->m_cellId; |
531 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Indication = m_rrc->m_sib1.cellAccessRelatedInfo.csgIndication; | 533 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Indication = m_rrc->m_sib1.cellAccessRelatedInfo.csgIndication; |
532 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Identity = m_rrc->m_sib1.cellAccessRelatedInfo.csgIdentity; | 534 hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csg
Identity = m_rrc->m_sib1.cellAccessRelatedInfo.csgIdentity; |
533 LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider->GetRach
Config (); | 535 LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider->GetRach
Config (); |
534 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; | 536 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
535 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; | 537 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
536 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSi
ze; | 538 hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon
.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSi
ze; |
537 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulCarrierFreq =
m_rrc->m_ulEarfcn; | 539 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulCarrierFreq =
m_rrc->m_ulEarfcn; |
538 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulBandwidth = m_
rrc->m_ulBandwidth; | 540 hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulBandwidth = m_
rrc->m_ulBandwidth; |
539 params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInform
ation (hpi); | 541 params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInform
ation (hpi); |
540 | 542 |
541 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); | 543 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
542 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); | 544 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
543 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); | 545 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
544 NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId); | 546 NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId); |
545 NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); | 547 NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); |
546 | 548 |
547 m_rrc->m_x2SapProvider->SendHandoverRequest (params); | 549 m_rrc->m_x2SapProvider->SendHandoverRequest (params); |
548 SwitchToState (HANDOVER_PREPARATION); | 550 SwitchToState (HANDOVER_PREPARATION); |
549 } | 551 } |
550 break; | 552 break; |
551 | 553 |
552 default: | 554 default: |
553 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 555 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
554 break; | 556 break; |
555 } | 557 } |
556 | 558 |
557 } | 559 } |
558 | 560 |
559 void· | 561 void· |
560 UeManager::RecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params
) | 562 UeManager::RecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params
) |
561 { | 563 { |
562 NS_LOG_FUNCTION (this); | 564 NS_LOG_FUNCTION (this); |
563 | 565 |
564 NS_ASSERT_MSG (params.notAdmittedBearers.empty (), "not admission of some bear
ers upon handover is not supported"); | 566 NS_ASSERT_MSG (params.notAdmittedBearers.empty (), "not admission of some bear
ers upon handover is not supported"); |
565 NS_ASSERT_MSG (params.admittedBearers.size () == m_drbMap.size (), "not enough
bearers in admittedBearers"); | 567 NS_ASSERT_MSG (params.admittedBearers.size () == m_drbMap.size (), "not enough
bearers in admittedBearers"); |
566 | 568 |
567 // note: the Handover command from the target eNB to the source eNB | 569 // note: the Handover command from the target eNB to the source eNB |
568 // is expected to be sent transparently to the UE; however, here we | 570 // is expected to be sent transparently to the UE; however, here we |
569 // decode the message and eventually reencode it. This way we can | 571 // decode the message and eventually reencode it. This way we can |
570 // support both a real RRC protocol implementation and an ideal one | 572 // support both a real RRC protocol implementation and an ideal one |
571 // without actual RRC protocol encoding.· | 573 // without actual RRC protocol encoding.· |
572 | 574 |
573 Ptr<Packet> encodedHandoverCommand = params.rrcContext; | 575 Ptr<Packet> encodedHandoverCommand = params.rrcContext; |
(...skipping 12 matching lines...) Expand all Loading... |
586 sst.sourceCellId = params.sourceCellId; | 588 sst.sourceCellId = params.sourceCellId; |
587 sst.targetCellId = params.targetCellId; | 589 sst.targetCellId = params.targetCellId; |
588 for ( std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drb
Map.begin (); | 590 for ( std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drb
Map.begin (); |
589 drbIt != m_drbMap.end (); | 591 drbIt != m_drbMap.end (); |
590 ++drbIt) | 592 ++drbIt) |
591 { | 593 { |
592 // SN status transfer is only for AM RLC | 594 // SN status transfer is only for AM RLC |
593 if (0 != drbIt->second->m_rlc->GetObject<LteRlcAm> ()) | 595 if (0 != drbIt->second->m_rlc->GetObject<LteRlcAm> ()) |
594 { | 596 { |
595 LtePdcp::Status status = drbIt->second->m_pdcp->GetStatus (); | 597 LtePdcp::Status status = drbIt->second->m_pdcp->GetStatus (); |
596 EpcX2Sap::ErabsSubjectToStatusTransferItem i; | 598 EpcX2Sap::ErabsSubjectToStatusTransferItem i; |
597 i.dlPdcpSn = status.txSn; | 599 i.dlPdcpSn = status.txSn; |
598 i.ulPdcpSn = status.rxSn; | 600 i.ulPdcpSn = status.rxSn; |
599 sst.erabsSubjectToStatusTransferList.push_back (i); | 601 sst.erabsSubjectToStatusTransferList.push_back (i); |
600 } | 602 } |
601 } | 603 } |
602 m_rrc->m_x2SapProvider->SendSnStatusTransfer (sst); | 604 m_rrc->m_x2SapProvider->SendSnStatusTransfer (sst); |
603 } | 605 } |
604 | 606 |
605 | 607 |
606 LteRrcSap::RadioResourceConfigDedicated | 608 LteRrcSap::RadioResourceConfigDedicated |
(...skipping 13 matching lines...) Expand all Loading... |
620 void | 622 void |
621 UeManager::SendData (uint8_t bid, Ptr<Packet> p) | 623 UeManager::SendData (uint8_t bid, Ptr<Packet> p) |
622 { | 624 { |
623 NS_LOG_FUNCTION (this << p << (uint16_t) bid); | 625 NS_LOG_FUNCTION (this << p << (uint16_t) bid); |
624 switch (m_state) | 626 switch (m_state) |
625 { | 627 { |
626 case INITIAL_RANDOM_ACCESS: | 628 case INITIAL_RANDOM_ACCESS: |
627 case CONNECTION_SETUP: | 629 case CONNECTION_SETUP: |
628 NS_LOG_WARN ("not connected, discarding packet"); | 630 NS_LOG_WARN ("not connected, discarding packet"); |
629 return; | 631 return; |
630 break; | 632 break; |
631 | 633 |
632 case CONNECTED_NORMALLY: | 634 case CONNECTED_NORMALLY: |
633 case CONNECTION_RECONFIGURATION: | 635 case CONNECTION_RECONFIGURATION: |
634 case CONNECTION_REESTABLISHMENT: | 636 case CONNECTION_REESTABLISHMENT: |
635 case HANDOVER_PREPARATION: | 637 case HANDOVER_PREPARATION: |
636 case HANDOVER_JOINING: | 638 case HANDOVER_JOINING: |
637 case HANDOVER_PATH_SWITCH: | 639 case HANDOVER_PATH_SWITCH: |
638 { | 640 { |
639 NS_LOG_LOGIC ("queueing data on PDCP for transmission over the air"); | 641 NS_LOG_LOGIC ("queueing data on PDCP for transmission over the air"); |
640 LtePdcpSapProvider::TransmitPdcpSduParameters params; | 642 LtePdcpSapProvider::TransmitPdcpSduParameters params; |
641 params.pdcpSdu = p; | 643 params.pdcpSdu = p; |
642 params.rnti = m_rnti; | 644 params.rnti = m_rnti; |
643 params.lcid = Bid2Lcid (bid); | 645 params.lcid = Bid2Lcid (bid); |
644 uint8_t drbid = Bid2Drbid (bid); | 646 uint8_t drbid = Bid2Drbid (bid); |
645 LtePdcpSapProvider* pdcpSapProvider = GetDataRadioBearerInfo (drbid)->m_
pdcp->GetLtePdcpSapProvider (); | 647 LtePdcpSapProvider* pdcpSapProvider = GetDataRadioBearerInfo (drbid)->m_
pdcp->GetLtePdcpSapProvider (); |
646 pdcpSapProvider->TransmitPdcpSdu (params); | 648 pdcpSapProvider->TransmitPdcpSdu (params); |
647 } | 649 } |
648 break; | 650 break; |
649 | 651 |
650 case HANDOVER_LEAVING: | 652 case HANDOVER_LEAVING: |
651 { | 653 { |
652 NS_LOG_LOGIC ("forwarding data to target eNB over X2-U"); | 654 NS_LOG_LOGIC ("forwarding data to target eNB over X2-U"); |
653 uint8_t drbid = Bid2Drbid (bid); | 655 uint8_t drbid = Bid2Drbid (bid); |
654 EpcX2Sap::UeDataParams params; | 656 EpcX2Sap::UeDataParams params; |
655 params.sourceCellId = m_rrc->m_cellId; | 657 params.sourceCellId = m_rrc->m_cellId; |
656 params.targetCellId = m_targetCellId; | 658 params.targetCellId = m_targetCellId; |
657 params.gtpTeid = GetDataRadioBearerInfo (drbid)->m_gtpTeid; | 659 params.gtpTeid = GetDataRadioBearerInfo (drbid)->m_gtpTeid; |
658 params.ueData = p; | 660 params.ueData = p; |
659 m_rrc->m_x2SapProvider->SendUeData (params); | 661 m_rrc->m_x2SapProvider->SendUeData (params); |
660 } | 662 } |
661 break; | 663 break; |
662 | 664 |
663 default: | 665 default: |
664 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 666 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
665 break; | 667 break; |
666 } | 668 } |
667 } | 669 } |
668 | 670 |
669 std::vector<EpcX2Sap::ErabToBeSetupItem> | 671 std::vector<EpcX2Sap::ErabToBeSetupItem> |
670 UeManager::GetErabList () | 672 UeManager::GetErabList () |
671 { | 673 { |
672 NS_LOG_FUNCTION (this); | 674 NS_LOG_FUNCTION (this); |
673 std::vector<EpcX2Sap::ErabToBeSetupItem> ret; | 675 std::vector<EpcX2Sap::ErabToBeSetupItem> ret; |
674 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap
.begin (); | 676 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap
.begin (); |
675 it != m_drbMap.end (); | 677 it != m_drbMap.end (); |
676 ++it) | 678 ++it) |
677 { | 679 { |
678 EpcX2Sap::ErabToBeSetupItem etbsi; | 680 EpcX2Sap::ErabToBeSetupItem etbsi; |
679 etbsi.erabId = it->second->m_epsBearerIdentity; | 681 etbsi.erabId = it->second->m_epsBearerIdentity; |
680 etbsi.erabLevelQosParameters = it->second->m_epsBearer; | 682 etbsi.erabLevelQosParameters = it->second->m_epsBearer; |
681 etbsi.dlForwarding = false; | 683 etbsi.dlForwarding = false; |
682 etbsi.transportLayerAddress = it->second->m_transportLayerAddress; | 684 etbsi.transportLayerAddress = it->second->m_transportLayerAddress; |
683 etbsi.gtpTeid = it->second->m_gtpTeid; | 685 etbsi.gtpTeid = it->second->m_gtpTeid; |
684 ret.push_back (etbsi); | 686 ret.push_back (etbsi); |
685 } | 687 } |
686 return ret; | 688 return ret; |
687 } | 689 } |
688 | 690 |
689 void | 691 void |
690 UeManager::SendUeContextRelease () | 692 UeManager::SendUeContextRelease () |
691 { | 693 { |
692 NS_LOG_FUNCTION (this); | 694 NS_LOG_FUNCTION (this); |
693 switch (m_state) | 695 switch (m_state) |
694 { | 696 { |
695 case HANDOVER_PATH_SWITCH: | 697 case HANDOVER_PATH_SWITCH: |
696 NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB"); | 698 NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB"); |
697 EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams; | 699 EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams; |
698 ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId; | 700 ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId; |
699 ueCtxReleaseParams.newEnbUeX2apId = m_rnti; | 701 ueCtxReleaseParams.newEnbUeX2apId = m_rnti; |
700 ueCtxReleaseParams.sourceCellId = m_sourceCellId; | 702 ueCtxReleaseParams.sourceCellId = m_sourceCellId; |
701 m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams); | 703 m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams); |
702 SwitchToState (CONNECTED_NORMALLY); | 704 SwitchToState (CONNECTED_NORMALLY); |
703 m_rrc->m_handoverEndOkTrace (m_imsi, m_rrc->m_cellId, m_rnti); | 705 m_rrc->m_handoverEndOkTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
704 break; | 706 break; |
705 | 707 |
706 default: | 708 default: |
707 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 709 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
708 break; | 710 break; |
709 } | 711 } |
710 } | 712 } |
711 | 713 |
712 void· | 714 void· |
713 UeManager::RecvHandoverPreparationFailure (uint16_t cellId) | 715 UeManager::RecvHandoverPreparationFailure (uint16_t cellId) |
714 { | 716 { |
715 NS_LOG_FUNCTION (this << cellId); | 717 NS_LOG_FUNCTION (this << cellId); |
716 switch (m_state) | 718 switch (m_state) |
717 { | 719 { |
718 case HANDOVER_PREPARATION: | 720 case HANDOVER_PREPARATION: |
719 NS_ASSERT (cellId == m_targetCellId); | 721 NS_ASSERT (cellId == m_targetCellId); |
720 NS_LOG_INFO ("target eNB sent HO preparation failure, aborting HO"); | 722 NS_LOG_INFO ("target eNB sent HO preparation failure, aborting HO"); |
721 SwitchToState (CONNECTED_NORMALLY); | 723 SwitchToState (CONNECTED_NORMALLY); |
722 break; | 724 break; |
723 | 725 |
724 default: | 726 default: |
725 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 727 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
726 break; | 728 break; |
727 } | 729 } |
728 } | 730 } |
729 | 731 |
730 void· | 732 void· |
731 UeManager::RecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) | 733 UeManager::RecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) |
732 { | 734 { |
733 NS_LOG_FUNCTION (this); | 735 NS_LOG_FUNCTION (this); |
734 for (std::vector<EpcX2Sap::ErabsSubjectToStatusTransferItem>::iterator erabIt· | 736 for (std::vector<EpcX2Sap::ErabsSubjectToStatusTransferItem>::iterator erabIt· |
735 = params.erabsSubjectToStatusTransferList.begin (); | 737 = params.erabsSubjectToStatusTransferList.begin (); |
736 erabIt != params.erabsSubjectToStatusTransferList.end (); | 738 erabIt != params.erabsSubjectToStatusTransferList.end (); |
737 ++erabIt) | 739 ++erabIt) |
738 { | 740 { |
739 // LtePdcp::Status status; | 741 // LtePdcp::Status status; |
740 // status.txSn = erabIt->dlPdcpSn; | 742 // status.txSn = erabIt->dlPdcpSn; |
741 // status.rxSn = erabIt->ulPdcpSn; | 743 // status.rxSn = erabIt->ulPdcpSn; |
742 // uint8_t drbId = Bid2Drbid (erabIt->erabId); | 744 // uint8_t drbId = Bid2Drbid (erabIt->erabId); |
743 // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_dr
bMap.find (drbId); | 745 // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_dr
bMap.find (drbId); |
744 // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (ui
nt32_t) drbId); | 746 // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (ui
nt32_t) drbId); |
745 // drbIt->second->m_pdcp->SetStatus (status); | 747 // drbIt->second->m_pdcp->SetStatus (status); |
746 } | 748 } |
747 } | 749 } |
748 | 750 |
749 void· | 751 void· |
750 UeManager::RecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) | 752 UeManager::RecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) |
751 { | 753 { |
752 NS_LOG_FUNCTION (this); | 754 NS_LOG_FUNCTION (this); |
753 NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << T
oString (m_state)); | 755 NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << T
oString (m_state)); |
754 m_handoverLeavingTimeout.Cancel (); | 756 m_handoverLeavingTimeout.Cancel (); |
755 } | 757 } |
756 | 758 |
757 | 759 |
758 // methods forwarded from RRC SAP | 760 // methods forwarded from RRC SAP |
759 | 761 |
760 void· | 762 void· |
761 UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters para
ms) | 763 UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters para
ms) |
762 { | 764 { |
763 NS_LOG_FUNCTION (this); | 765 NS_LOG_FUNCTION (this); |
764 m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser); | 766 m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser); |
765 m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser); | 767 m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser); |
766 } | 768 } |
767 | 769 |
768 void | 770 void |
769 UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg) | 771 UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg) |
770 { | 772 { |
771 NS_LOG_FUNCTION (this); | 773 NS_LOG_FUNCTION (this); |
772 switch (m_state) | 774 switch (m_state) |
773 { | 775 { |
774 case INITIAL_RANDOM_ACCESS: | 776 case INITIAL_RANDOM_ACCESS: |
775 { | 777 { |
776 if (m_rrc->m_admitRrcConnectionRequest == true) | 778 if (m_rrc->m_admitRrcConnectionRequest == true) |
777 { | 779 { |
778 m_connectionTimeout.Cancel (); | 780 m_connectionTimeout.Cancel (); |
779 m_imsi = msg.ueIdentity; | 781 m_imsi = msg.ueIdentity; |
780 if (m_rrc->m_s1SapProvider != 0) | 782 if (m_rrc->m_s1SapProvider != 0) |
781 { | 783 { |
782 m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti); | 784 m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti); |
783 } | 785 } |
784 LteRrcSap::RrcConnectionSetup msg2; | 786 LteRrcSap::RrcConnectionSetup msg2; |
785 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); | 787 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
786 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicate
d (); | 788 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicate
d (); |
787 m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2); | 789 m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2); |
788 RecordDataRadioBearersToBeStarted (); | 790 RecordDataRadioBearersToBeStarted (); |
789 SwitchToState (CONNECTION_SETUP); | 791 SwitchToState (CONNECTION_SETUP); |
790 } | 792 } |
791 else | 793 else |
792 { | 794 { |
793 m_connectionTimeout.Cancel (); | 795 m_connectionTimeout.Cancel (); |
794 NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti); | 796 NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti); |
795 LteRrcSap::RrcConnectionReject rejectMsg; | 797 LteRrcSap::RrcConnectionReject rejectMsg; |
796 rejectMsg.waitTime = 3; | 798 rejectMsg.waitTime = 3; |
797 m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg); | 799 m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg); |
798 m_connectionRejectedTimeout = Simulator::Schedule (m_rrc->m_connecti
onRejectedTimeoutDuration,· | 800 m_connectionRejectedTimeout = Simulator::Schedule (m_rrc->m_connecti
onRejectedTimeoutDuration,· |
799 &LteEnbRrc::ConnectionRej
ectedTimeout,· | 801 &LteEnbRrc::Conne
ctionRejectedTimeout, |
800 m_rrc, m_rnti); | 802 m_rrc, m_rnti); |
801 SwitchToState (CONNECTION_REJECTED); | 803 SwitchToState (CONNECTION_REJECTED); |
802 } | 804 } |
803 } | 805 } |
804 break; | 806 break; |
805 | 807 |
806 default: | 808 default: |
807 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 809 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
808 break; | 810 break; |
809 } | 811 } |
810 } | 812 } |
811 | 813 |
812 void | 814 void |
813 UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupComplet
ed msg) | 815 UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupComplet
ed msg) |
814 { | 816 { |
815 NS_LOG_FUNCTION (this); | 817 NS_LOG_FUNCTION (this); |
816 switch (m_state) | 818 switch (m_state) |
817 { | 819 { |
818 case CONNECTION_SETUP: | 820 case CONNECTION_SETUP: |
819 StartDataRadioBearers (); | 821 StartDataRadioBearers (); |
820 SwitchToState (CONNECTED_NORMALLY); | 822 SwitchToState (CONNECTED_NORMALLY); |
821 m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->m_cellId, m_rnti); | 823 m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
822 break; | 824 break; |
823 | 825 |
824 default: | 826 default: |
825 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 827 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
826 break; | 828 break; |
827 } | 829 } |
828 } | 830 } |
829 | 831 |
830 void | 832 void |
831 UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionRe
configurationCompleted msg) | 833 UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionRe
configurationCompleted msg) |
832 { | 834 { |
833 NS_LOG_FUNCTION (this); | 835 NS_LOG_FUNCTION (this); |
834 switch (m_state) | 836 switch (m_state) |
835 { | 837 { |
836 case CONNECTION_RECONFIGURATION: | 838 case CONNECTION_RECONFIGURATION: |
837 StartDataRadioBearers (); | 839 StartDataRadioBearers (); |
838 if (m_needTransmissionModeConfiguration) | 840 if (m_needPhyMacConfiguration) |
839 { | 841 { |
840 // configure MAC (and scheduler) | 842 // configure MAC (and scheduler) |
841 LteEnbCmacSapProvider::UeConfig req; | 843 LteEnbCmacSapProvider::UeConfig req; |
842 req.m_rnti = m_rnti; | 844 req.m_rnti = m_rnti; |
843 req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmi
ssionMode; | 845 req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmi
ssionMode; |
844 m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); | 846 m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
845 | 847 |
846 // configure PHY | 848 // configure PHY |
847 m_rrc->m_cphySapProvider->SetTransmissionMode (req.m_rnti, req.m_trans
missionMode); | 849 m_rrc->m_cphySapProvider->SetTransmissionMode (req.m_rnti, req.m_trans
missionMode); |
848 ·········· | 850 |
849 m_needTransmissionModeConfiguration = false; | 851 double paDouble = LteRrcSap::ConvertPdschConfigDedicated2Double (m_phy
sicalConfigDedicated.pdschConfigDedicated); |
| 852 m_rrc->m_cphySapProvider->SetPa (m_rnti, paDouble); |
| 853 |
| 854 m_needPhyMacConfiguration = false; |
850 } | 855 } |
851 SwitchToState (CONNECTED_NORMALLY); | 856 SwitchToState (CONNECTED_NORMALLY); |
852 m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->m_cellId, m_rnti); | 857 m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
853 break; | 858 break; |
854 | 859 |
855 case HANDOVER_LEAVING: | 860 case HANDOVER_LEAVING: |
856 NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state
" << ToString (m_state)); | 861 NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state
" << ToString (m_state)); |
857 break; | 862 break; |
858 | 863 |
859 case HANDOVER_JOINING: | 864 case HANDOVER_JOINING: |
860 { | 865 { |
861 m_handoverJoiningTimeout.Cancel (); | 866 m_handoverJoiningTimeout.Cancel (); |
862 NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME"); | 867 NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME"); |
863 EpcEnbS1SapProvider::PathSwitchRequestParameters params; | 868 EpcEnbS1SapProvider::PathSwitchRequestParameters params; |
864 params.rnti = m_rnti; | 869 params.rnti = m_rnti; |
865 params.cellId = m_rrc->m_cellId; | 870 params.cellId = m_rrc->m_cellId; |
866 params.mmeUeS1Id = m_imsi; | 871 params.mmeUeS1Id = m_imsi; |
867 SwitchToState (HANDOVER_PATH_SWITCH); | 872 SwitchToState (HANDOVER_PATH_SWITCH); |
868 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_
drbMap.begin (); | 873 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_
drbMap.begin (); |
869 it != m_drbMap.end (); | 874 it != m_drbMap.end (); |
870 ++it) | 875 ++it) |
871 { | 876 { |
872 EpcEnbS1SapProvider::BearerToBeSwitched b; | 877 EpcEnbS1SapProvider::BearerToBeSwitched b; |
873 b.epsBearerId = it->second->m_epsBearerIdentity; | 878 b.epsBearerId = it->second->m_epsBearerIdentity; |
874 b.teid = it->second->m_gtpTeid; | 879 b.teid = it->second->m_gtpTeid; |
875 params.bearersToBeSwitched.push_back (b); | 880 params.bearersToBeSwitched.push_back (b); |
876 } | 881 } |
877 m_rrc->m_s1SapProvider->PathSwitchRequest (params); | 882 m_rrc->m_s1SapProvider->PathSwitchRequest (params); |
878 } | 883 } |
879 break; | 884 break; |
880 | 885 |
881 default: | 886 default: |
882 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 887 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
883 break; | 888 break; |
884 } | 889 } |
885 } | 890 } |
886 | 891 |
887 void· | 892 void· |
888 UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionRees
tablishmentRequest msg) | 893 UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionRees
tablishmentRequest msg) |
889 { | 894 { |
890 NS_LOG_FUNCTION (this); | 895 NS_LOG_FUNCTION (this); |
891 switch (m_state) | 896 switch (m_state) |
892 { | 897 { |
893 case CONNECTED_NORMALLY: | 898 case CONNECTED_NORMALLY: |
894 break; | 899 break; |
895 | 900 |
896 case HANDOVER_LEAVING: | 901 case HANDOVER_LEAVING: |
897 m_handoverLeavingTimeout.Cancel (); | 902 m_handoverLeavingTimeout.Cancel (); |
898 break; | 903 break; |
899 | 904 |
900 default: | 905 default: |
901 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); | 906 NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
902 break; | 907 break; |
903 } | 908 } |
904 | 909 |
905 LteRrcSap::RrcConnectionReestablishment msg2; | 910 LteRrcSap::RrcConnectionReestablishment msg2; |
906 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); | 911 msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
907 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); | 912 msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
908 m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); | 913 m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); |
909 SwitchToState (CONNECTION_REESTABLISHMENT); | 914 SwitchToState (CONNECTION_REESTABLISHMENT); |
910 } | 915 } |
911 | 916 |
912 void· | 917 void· |
913 UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionRee
stablishmentComplete msg) | 918 UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionRee
stablishmentComplete msg) |
914 { | 919 { |
915 NS_LOG_FUNCTION (this); | 920 NS_LOG_FUNCTION (this); |
916 SwitchToState (CONNECTED_NORMALLY); | 921 SwitchToState (CONNECTED_NORMALLY); |
917 } | 922 } |
918 | 923 |
919 void· | 924 void· |
920 UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg) | 925 UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg) |
921 { | 926 { |
922 uint8_t measId = msg.measResults.measId; | 927 uint8_t measId = msg.measResults.measId; |
923 NS_LOG_FUNCTION (this << (uint16_t) measId); | 928 NS_LOG_FUNCTION (this << (uint16_t) measId); |
924 NS_LOG_LOGIC ("measId " << (uint16_t) measId | 929 NS_LOG_LOGIC ("measId " << (uint16_t) measId |
925 << " haveMeasResultNeighCells " << msg.measResults.haveMeasResul
tNeighCells | 930 << " haveMeasResultNeighCells " << msg.measResults.hav
eMeasResultNeighCells |
926 << " measResultListEutra " << msg.measResults.measResultListEutr
a.size ()); | 931 << " measResultListEutra " << msg.measResults.measResu
ltListEutra.size ()); |
927 NS_LOG_LOGIC ("serving cellId " << m_rrc->m_cellId | 932 NS_LOG_LOGIC ("serving cellId " << m_rrc->m_cellId |
928 << " RSRP " << (uint16_t) msg.measResults.rsrpResult | 933 << " RSRP " << (uint16_t) msg.measResults.rsrp
Result |
929 << " RSRQ " << (uint16_t) msg.measResults.rsrqResult); | 934 << " RSRQ " << (uint16_t) msg.measResults.rsrq
Result); |
930 | 935 |
931 for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.mea
sResultListEutra.begin (); | 936 for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.mea
sResultListEutra.begin (); |
932 it != msg.measResults.measResultListEutra.end (); | 937 it != msg.measResults.measResultListEutra.end (); |
933 ++it) | 938 ++it) |
934 { | 939 { |
935 NS_LOG_LOGIC ("neighbour cellId " << it->physCellId | 940 NS_LOG_LOGIC ("neighbour cellId " << it->physCellId |
936 << " RSRP " << (it->haveRsrpResult ? (uint16_t) it->rsrpResu
lt : 255) | 941 << " RSRP " << (it->haveRsrpResult ? (ui
nt16_t) it->rsrpResult : 255) |
937 << " RSRQ " << (it->haveRsrqResult ? (uint16_t) it->rsrqResu
lt : 255)); | 942 << " RSRQ " << (it->haveRsrqResult ? (ui
nt16_t) it->rsrqResult : 255)); |
938 } | 943 } |
939 | 944 |
940 if ((m_rrc->m_handoverManagementSapProvider != 0) | 945 if ((m_rrc->m_handoverManagementSapProvider != 0) |
941 && (m_rrc->m_handoverMeasIds.find (measId) != m_rrc->m_handoverMeasIds.end
())) | 946 && (m_rrc->m_handoverMeasIds.find (measId) != m_rrc->m_handoverMeasIds.end
())) |
942 { | 947 { |
943 // this measurement was requested by the handover algorithm | 948 // this measurement was requested by the handover algorithm |
944 m_rrc->m_handoverManagementSapProvider->ReportUeMeas (m_rnti, | 949 m_rrc->m_handoverManagementSapProvider->ReportUeMeas (m_rnti, |
945 msg.measResults); | 950 msg.measResults); |
946 } | 951 } |
947 | 952 |
948 if ((m_rrc->m_anrSapProvider != 0) | 953 if ((m_rrc->m_anrSapProvider != 0) |
949 && (m_rrc->m_anrMeasIds.find (measId) != m_rrc->m_anrMeasIds.end ())) | 954 && (m_rrc->m_anrMeasIds.find (measId) != m_rrc->m_anrMeasIds.end ())) |
950 { | 955 { |
951 // this measurement was requested by the ANR function | 956 // this measurement was requested by the ANR function |
952 m_rrc->m_anrSapProvider->ReportUeMeas (msg.measResults); | 957 m_rrc->m_anrSapProvider->ReportUeMeas (msg.measResults); |
953 } | 958 } |
954 | 959 |
| 960 if ((m_rrc->m_ffrRrcSapProvider != 0) |
| 961 && (m_rrc->m_ffrMeasIds.find (measId) != m_rrc->m_ffrMeasIds.end ())) |
| 962 { |
| 963 // this measurement was requested by the FFR function |
| 964 m_rrc->m_ffrRrcSapProvider->ReportUeMeas (m_rnti, msg.measResults); |
| 965 } |
| 966 |
955 // fire a trace source | 967 // fire a trace source |
956 m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->m_cellId, m_rnti, msg); | 968 m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->m_cellId, m_rnti, msg); |
957 | 969 |
958 } // end of UeManager::RecvMeasurementReport | 970 } // end of UeManager::RecvMeasurementReport |
959 | 971 |
960 | 972 |
961 // methods forwarded from CMAC SAP | 973 // methods forwarded from CMAC SAP |
962 | 974 |
963 void | 975 void |
964 UeManager::CmacUeConfigUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) | 976 UeManager::CmacUeConfigUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
965 { | 977 { |
966 NS_LOG_FUNCTION (this << m_rnti); | 978 NS_LOG_FUNCTION (this << m_rnti); |
967 // at this stage used only by the scheduler for updating txMode | 979 // at this stage used only by the scheduler for updating txMode |
968 | 980 |
969 m_physicalConfigDedicated.antennaInfo.transmissionMode = cmacParams.m_transmis
sionMode; | 981 m_physicalConfigDedicated.antennaInfo.transmissionMode = cmacParams.m_transmis
sionMode; |
970 | 982 |
971 m_needTransmissionModeConfiguration = true; | 983 m_needPhyMacConfiguration = true; |
972 | 984 |
973 // reconfigure the UE RRC | 985 // reconfigure the UE RRC |
974 ScheduleRrcConnectionReconfiguration (); | 986 ScheduleRrcConnectionReconfiguration (); |
975 } | 987 } |
976 | 988 |
977 | 989 |
978 // methods forwarded from PDCP SAP | 990 // methods forwarded from PDCP SAP |
979 | 991 |
980 void | 992 void |
981 UeManager::DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params) | 993 UeManager::DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 { | 1028 { |
1017 NS_LOG_FUNCTION (this); | 1029 NS_LOG_FUNCTION (this); |
1018 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = srsConf
Index; | 1030 m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = srsConf
Index; |
1019 m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, srsConfIndex); | 1031 m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, srsConfIndex); |
1020 switch (m_state) | 1032 switch (m_state) |
1021 { | 1033 { |
1022 case INITIAL_RANDOM_ACCESS: | 1034 case INITIAL_RANDOM_ACCESS: |
1023 // do nothing, srs conf index will be correctly enforced upon | 1035 // do nothing, srs conf index will be correctly enforced upon |
1024 // RRC connection establishment | 1036 // RRC connection establishment |
1025 break; | 1037 break; |
1026 | 1038 |
1027 default: | 1039 default: |
1028 ScheduleRrcConnectionReconfiguration (); | 1040 ScheduleRrcConnectionReconfiguration (); |
1029 break; | 1041 break; |
1030 } | 1042 } |
1031 } | 1043 } |
1032 | 1044 |
1033 UeManager::State | 1045 UeManager::State |
1034 UeManager::GetState (void) const | 1046 UeManager::GetState (void) const |
1035 { | 1047 { |
1036 return m_state; | 1048 return m_state; |
1037 } | 1049 } |
1038 | 1050 |
| 1051 void |
| 1052 UeManager::SetPdschConfigDedicated (LteRrcSap::PdschConfigDedicated pdschConfigD
edicated) |
| 1053 { |
| 1054 NS_LOG_FUNCTION (this); |
| 1055 m_physicalConfigDedicated.pdschConfigDedicated = pdschConfigDedicated; |
| 1056 |
| 1057 m_needPhyMacConfiguration = true; |
| 1058 |
| 1059 // reconfigure the UE RRC |
| 1060 ScheduleRrcConnectionReconfiguration (); |
| 1061 } |
| 1062 |
1039 uint8_t | 1063 uint8_t |
1040 UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) | 1064 UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) |
1041 { | 1065 { |
1042 NS_LOG_FUNCTION (this); | 1066 NS_LOG_FUNCTION (this); |
1043 const uint8_t MAX_DRB_ID = 32; | 1067 const uint8_t MAX_DRB_ID = 32; |
1044 for (int drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;· | 1068 for (int drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;· |
1045 drbid != m_lastAllocatedDrbid;· | 1069 drbid != m_lastAllocatedDrbid;· |
1046 drbid = (drbid + 1) % MAX_DRB_ID) | 1070 drbid = (drbid + 1) % MAX_DRB_ID) |
1047 { | 1071 { |
1048 if (drbid != 0) // 0 is not allowed | 1072 if (drbid != 0) // 0 is not allowed |
1049 { | 1073 { |
1050 if (m_drbMap.find (drbid) == m_drbMap.end ()) | 1074 if (m_drbMap.find (drbid) == m_drbMap.end ()) |
1051 { | 1075 { |
1052 m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> >
(drbid, drbInfo)); | 1076 m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> >
(drbid, drbInfo)); |
1053 drbInfo->m_drbIdentity = drbid; | 1077 drbInfo->m_drbIdentity = drbid; |
1054 m_lastAllocatedDrbid = drbid; | 1078 m_lastAllocatedDrbid = drbid; |
1055 return drbid; | 1079 return drbid; |
1056 } | 1080 } |
1057 } | 1081 } |
1058 } | 1082 } |
1059 NS_FATAL_ERROR ("no more data radio bearer ids available"); | 1083 NS_FATAL_ERROR ("no more data radio bearer ids available"); |
1060 return 0; | 1084 return 0; |
1061 } | 1085 } |
1062 | 1086 |
1063 Ptr<LteDataRadioBearerInfo> | 1087 Ptr<LteDataRadioBearerInfo> |
1064 UeManager::GetDataRadioBearerInfo (uint8_t drbid) | 1088 UeManager::GetDataRadioBearerInfo (uint8_t drbid) |
1065 { | 1089 { |
1066 NS_LOG_FUNCTION (this << (uint32_t) drbid); | 1090 NS_LOG_FUNCTION (this << (uint32_t) drbid); |
1067 NS_ASSERT (0 != drbid); | 1091 NS_ASSERT (0 != drbid); |
1068 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (
drbid); | 1092 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (
drbid); |
1069 NS_ABORT_IF (it == m_drbMap.end ()); | 1093 NS_ABORT_IF (it == m_drbMap.end ()); |
1070 return it->second; | 1094 return it->second; |
1071 } | 1095 } |
1072 | 1096 |
1073 | 1097 |
1074 void | 1098 void |
1075 UeManager::RemoveDataRadioBearerInfo (uint8_t drbid) | 1099 UeManager::RemoveDataRadioBearerInfo (uint8_t drbid) |
1076 { | 1100 { |
1077 NS_LOG_FUNCTION (this << (uint32_t) drbid); | 1101 NS_LOG_FUNCTION (this << (uint32_t) drbid); |
1078 std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find
(drbid); | 1102 std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find
(drbid); |
(...skipping 21 matching lines...) Expand all Loading... |
1100 { | 1124 { |
1101 LteRrcSap::RadioResourceConfigDedicated rrcd; | 1125 LteRrcSap::RadioResourceConfigDedicated rrcd; |
1102 | 1126 |
1103 if (m_srb1 != 0) | 1127 if (m_srb1 != 0) |
1104 { | 1128 { |
1105 LteRrcSap::SrbToAddMod stam; | 1129 LteRrcSap::SrbToAddMod stam; |
1106 stam.srbIdentity = m_srb1->m_srbIdentity; | 1130 stam.srbIdentity = m_srb1->m_srbIdentity; |
1107 stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig; | 1131 stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig; |
1108 rrcd.srbToAddModList.push_back (stam); | 1132 rrcd.srbToAddModList.push_back (stam); |
1109 } | 1133 } |
1110 | 1134 |
1111 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.
begin (); | 1135 for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.
begin (); |
1112 it != m_drbMap.end (); | 1136 it != m_drbMap.end (); |
1113 ++it) | 1137 ++it) |
1114 { | 1138 { |
1115 LteRrcSap::DrbToAddMod dtam; | 1139 LteRrcSap::DrbToAddMod dtam; |
1116 dtam.epsBearerIdentity = it->second->m_epsBearerIdentity; | 1140 dtam.epsBearerIdentity = it->second->m_epsBearerIdentity; |
1117 dtam.drbIdentity = it->second->m_drbIdentity; | 1141 dtam.drbIdentity = it->second->m_drbIdentity; |
1118 dtam.rlcConfig = it->second->m_rlcConfig; | 1142 dtam.rlcConfig = it->second->m_rlcConfig; |
1119 dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity; | 1143 dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity; |
1120 dtam.logicalChannelConfig = it->second->m_logicalChannelConfig; | 1144 dtam.logicalChannelConfig = it->second->m_logicalChannelConfig; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 | 1196 |
1173 void· | 1197 void· |
1174 UeManager::SwitchToState (State newState) | 1198 UeManager::SwitchToState (State newState) |
1175 { | 1199 { |
1176 NS_LOG_FUNCTION (this << ToString (newState)); | 1200 NS_LOG_FUNCTION (this << ToString (newState)); |
1177 State oldState = m_state; | 1201 State oldState = m_state; |
1178 m_state = newState; | 1202 m_state = newState; |
1179 NS_LOG_INFO (this << " IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager " | 1203 NS_LOG_INFO (this << " IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager " |
1180 << ToString (oldState) << " --> " << ToString (newState)); | 1204 << ToString (oldState) << " --> " << ToString (newState)); |
1181 m_stateTransitionTrace (m_imsi, m_rrc->m_cellId, m_rnti, oldState, newState); | 1205 m_stateTransitionTrace (m_imsi, m_rrc->m_cellId, m_rnti, oldState, newState); |
1182 | 1206 |
1183 switch (newState) | 1207 switch (newState) |
1184 { | 1208 { |
1185 case INITIAL_RANDOM_ACCESS: | 1209 case INITIAL_RANDOM_ACCESS: |
1186 case HANDOVER_JOINING: | 1210 case HANDOVER_JOINING: |
1187 NS_FATAL_ERROR ("cannot switch to an initial state"); | 1211 NS_FATAL_ERROR ("cannot switch to an initial state"); |
1188 break; | 1212 break; |
1189 | 1213 |
1190 case CONNECTION_SETUP: | 1214 case CONNECTION_SETUP: |
1191 break; | 1215 break; |
1192 | 1216 |
1193 case CONNECTED_NORMALLY: | 1217 case CONNECTED_NORMALLY: |
1194 { | 1218 { |
1195 if (m_pendingRrcConnectionReconfiguration == true) | 1219 if (m_pendingRrcConnectionReconfiguration == true) |
1196 { | 1220 { |
1197 ScheduleRrcConnectionReconfiguration (); | 1221 ScheduleRrcConnectionReconfiguration (); |
1198 } | 1222 } |
1199 } | 1223 } |
1200 break; | 1224 break; |
1201 | 1225 |
1202 case CONNECTION_RECONFIGURATION: | 1226 case CONNECTION_RECONFIGURATION: |
1203 break; | 1227 break; |
1204 | 1228 |
1205 case CONNECTION_REESTABLISHMENT: | 1229 case CONNECTION_REESTABLISHMENT: |
1206 break; | 1230 break; |
1207 | 1231 |
1208 case HANDOVER_LEAVING: | 1232 case HANDOVER_LEAVING: |
1209 break; | 1233 break; |
1210 | 1234 |
1211 default: | 1235 default: |
1212 break; | 1236 break; |
1213 } | 1237 } |
1214 } | 1238 } |
1215 | 1239 |
1216 | 1240 |
1217 | 1241 |
1218 /////////////////////////////////////////// | 1242 /////////////////////////////////////////// |
1219 // eNB RRC methods | 1243 // eNB RRC methods |
1220 /////////////////////////////////////////// | 1244 /////////////////////////////////////////// |
1221 | 1245 |
1222 NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc); | 1246 NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc); |
1223 | 1247 |
1224 LteEnbRrc::LteEnbRrc () | 1248 LteEnbRrc::LteEnbRrc () |
1225 : m_x2SapProvider (0), | 1249 : m_x2SapProvider (0), |
1226 m_cmacSapProvider (0), | 1250 m_cmacSapProvider (0), |
1227 m_handoverManagementSapProvider (0), | 1251 m_handoverManagementSapProvider (0), |
1228 m_anrSapProvider (0), | 1252 m_anrSapProvider (0), |
| 1253 m_ffrRrcSapProvider (0), |
1229 m_rrcSapUser (0), | 1254 m_rrcSapUser (0), |
1230 m_macSapProvider (0), | 1255 m_macSapProvider (0), |
1231 m_s1SapProvider (0), | 1256 m_s1SapProvider (0), |
1232 m_cphySapProvider (0), | 1257 m_cphySapProvider (0), |
1233 m_configured (false), | 1258 m_configured (false), |
1234 m_lastAllocatedRnti (0), | 1259 m_lastAllocatedRnti (0), |
1235 m_srsCurrentPeriodicityId (0), | 1260 m_srsCurrentPeriodicityId (0), |
1236 m_lastAllocatedConfigurationIndex (0), | 1261 m_lastAllocatedConfigurationIndex (0), |
1237 m_reconfigureUes (false) | 1262 m_reconfigureUes (false) |
1238 { | 1263 { |
1239 NS_LOG_FUNCTION (this); | 1264 NS_LOG_FUNCTION (this); |
1240 m_cmacSapUser = new EnbRrcMemberLteEnbCmacSapUser (this); | 1265 m_cmacSapUser = new EnbRrcMemberLteEnbCmacSapUser (this); |
1241 m_handoverManagementSapUser = new MemberLteHandoverManagementSapUser<LteEnbRrc
> (this); | 1266 m_handoverManagementSapUser = new MemberLteHandoverManagementSapUser<LteEnbRrc
> (this); |
1242 m_anrSapUser = new MemberLteAnrSapUser<LteEnbRrc> (this); | 1267 m_anrSapUser = new MemberLteAnrSapUser<LteEnbRrc> (this); |
| 1268 m_ffrRrcSapUser = new MemberLteFfrRrcSapUser<LteEnbRrc> (this); |
1243 m_rrcSapProvider = new MemberLteEnbRrcSapProvider<LteEnbRrc> (this); | 1269 m_rrcSapProvider = new MemberLteEnbRrcSapProvider<LteEnbRrc> (this); |
1244 m_x2SapUser = new EpcX2SpecificEpcX2SapUser<LteEnbRrc> (this); | 1270 m_x2SapUser = new EpcX2SpecificEpcX2SapUser<LteEnbRrc> (this); |
1245 m_s1SapUser = new MemberEpcEnbS1SapUser<LteEnbRrc> (this); | 1271 m_s1SapUser = new MemberEpcEnbS1SapUser<LteEnbRrc> (this); |
1246 m_cphySapUser = new MemberLteEnbCphySapUser<LteEnbRrc> (this); | 1272 m_cphySapUser = new MemberLteEnbCphySapUser<LteEnbRrc> (this); |
1247 } | 1273 } |
1248 | 1274 |
1249 | 1275 |
1250 LteEnbRrc::~LteEnbRrc () | 1276 LteEnbRrc::~LteEnbRrc () |
1251 { | 1277 { |
1252 NS_LOG_FUNCTION (this); | 1278 NS_LOG_FUNCTION (this); |
1253 } | 1279 } |
1254 | 1280 |
1255 | 1281 |
1256 void | 1282 void |
1257 LteEnbRrc::DoDispose () | 1283 LteEnbRrc::DoDispose () |
1258 { | 1284 { |
1259 NS_LOG_FUNCTION (this); | 1285 NS_LOG_FUNCTION (this); |
1260 m_ueMap.clear (); | 1286 m_ueMap.clear (); |
1261 delete m_cmacSapUser; | 1287 delete m_cmacSapUser; |
1262 delete m_handoverManagementSapUser; | 1288 delete m_handoverManagementSapUser; |
1263 delete m_anrSapUser; | 1289 delete m_anrSapUser; |
| 1290 delete m_ffrRrcSapUser; |
1264 delete m_rrcSapProvider; | 1291 delete m_rrcSapProvider; |
1265 delete m_x2SapUser; | 1292 delete m_x2SapUser; |
1266 delete m_s1SapUser; | 1293 delete m_s1SapUser; |
1267 delete m_cphySapUser; | 1294 delete m_cphySapUser; |
1268 } | 1295 } |
1269 | 1296 |
1270 TypeId | 1297 TypeId |
1271 LteEnbRrc::GetTypeId (void) | 1298 LteEnbRrc::GetTypeId (void) |
1272 { | 1299 { |
1273 NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId"); | 1300 NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId"); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 TimeValue (MilliSeconds (200)), | 1348 TimeValue (MilliSeconds (200)), |
1322 MakeTimeAccessor (&LteEnbRrc::m_handoverJoiningTimeoutDuratio
n), | 1349 MakeTimeAccessor (&LteEnbRrc::m_handoverJoiningTimeoutDuratio
n), |
1323 MakeTimeChecker ()) | 1350 MakeTimeChecker ()) |
1324 .AddAttribute ("HandoverLeavingTimeoutDuration", | 1351 .AddAttribute ("HandoverLeavingTimeoutDuration", |
1325 "After issuing a Handover Command, if neither RRC Connection
Reestablishment nor X2 UE Context Release has been previously received, the UE c
ontext is destroyed.", | 1352 "After issuing a Handover Command, if neither RRC Connection
Reestablishment nor X2 UE Context Release has been previously received, the UE c
ontext is destroyed.", |
1326 TimeValue (MilliSeconds (500)), | 1353 TimeValue (MilliSeconds (500)), |
1327 MakeTimeAccessor (&LteEnbRrc::m_handoverLeavingTimeoutDuratio
n), | 1354 MakeTimeAccessor (&LteEnbRrc::m_handoverLeavingTimeoutDuratio
n), |
1328 MakeTimeChecker ()) | 1355 MakeTimeChecker ()) |
1329 | 1356 |
1330 // Cell selection related attribute | 1357 // Cell selection related attribute |
1331 .AddAttribute ("QRxLevMin", | 1358 .AddAttribute ("QRxLevMin", |
1332 "One of information transmitted within the SIB1 message, " | 1359 "One of information transmitted within the SIB1 message, " |
1333 "indicating the required minimum RSRP level that any UE must " | 1360 "indicating the required minimum RSRP level that any UE must
" |
1334 "receive from this cell before it is allowed to camp to this " | 1361 "receive from this cell before it is allowed to camp to this
" |
1335 "cell. The default value -70 corresponds to -140 dBm and is " | 1362 "cell. The default value -70 corresponds to -140 dBm and is " |
1336 "the lowest possible value as defined by Section 6.3.4 of " | 1363 "the lowest possible value as defined by Section 6.3.4 of " |
1337 "3GPP TS 36.133. This restriction, however, only applies to " | 1364 "3GPP TS 36.133. This restriction, however, only applies to " |
1338 "initial cell selection and EPC-enabled simulation.", | 1365 "initial cell selection and EPC-enabled simulation.", |
1339 TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT, | 1366 TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT, |
1340 IntegerValue (-70), | 1367 IntegerValue (-70), |
1341 MakeIntegerAccessor (&LteEnbRrc::m_qRxLevMin), | 1368 MakeIntegerAccessor (&LteEnbRrc::m_qRxLevMin), |
1342 MakeIntegerChecker<int8_t> (-70, -22)) | 1369 MakeIntegerChecker<int8_t> (-70, -22)) |
1343 | 1370 |
1344 // Handover related attributes | 1371 // Handover related attributes |
1345 .AddAttribute ("AdmitHandoverRequest", | 1372 .AddAttribute ("AdmitHandoverRequest", |
1346 "Whether to admit an X2 handover request from another eNB", | 1373 "Whether to admit an X2 handover request from another eNB", |
1347 BooleanValue (true), | 1374 BooleanValue (true), |
1348 MakeBooleanAccessor (&LteEnbRrc::m_admitHandoverRequest), | 1375 MakeBooleanAccessor (&LteEnbRrc::m_admitHandoverRequest), |
1349 MakeBooleanChecker ()) | 1376 MakeBooleanChecker ()) |
1350 .AddAttribute ("AdmitRrcConnectionRequest", | 1377 .AddAttribute ("AdmitRrcConnectionRequest", |
1351 "Whether to admit a connection request from a UE", | 1378 "Whether to admit a connection request from a UE", |
1352 BooleanValue (true), | 1379 BooleanValue (true), |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 } | 1471 } |
1445 | 1472 |
1446 LteAnrSapUser* | 1473 LteAnrSapUser* |
1447 LteEnbRrc::GetLteAnrSapUser () | 1474 LteEnbRrc::GetLteAnrSapUser () |
1448 { | 1475 { |
1449 NS_LOG_FUNCTION (this); | 1476 NS_LOG_FUNCTION (this); |
1450 return m_anrSapUser; | 1477 return m_anrSapUser; |
1451 } | 1478 } |
1452 | 1479 |
1453 void | 1480 void |
| 1481 LteEnbRrc::SetLteFfrRrcSapProvider (LteFfrRrcSapProvider * s) |
| 1482 { |
| 1483 NS_LOG_FUNCTION (this << s); |
| 1484 m_ffrRrcSapProvider = s; |
| 1485 } |
| 1486 |
| 1487 LteFfrRrcSapUser* |
| 1488 LteEnbRrc::GetLteFfrRrcSapUser () |
| 1489 { |
| 1490 NS_LOG_FUNCTION (this); |
| 1491 return m_ffrRrcSapUser; |
| 1492 } |
| 1493 |
| 1494 void |
1454 LteEnbRrc::SetLteEnbRrcSapUser (LteEnbRrcSapUser * s) | 1495 LteEnbRrc::SetLteEnbRrcSapUser (LteEnbRrcSapUser * s) |
1455 { | 1496 { |
1456 NS_LOG_FUNCTION (this << s); | 1497 NS_LOG_FUNCTION (this << s); |
1457 m_rrcSapUser = s; | 1498 m_rrcSapUser = s; |
1458 } | 1499 } |
1459 | 1500 |
1460 LteEnbRrcSapProvider* | 1501 LteEnbRrcSapProvider* |
1461 LteEnbRrc::GetLteEnbRrcSapProvider () | 1502 LteEnbRrc::GetLteEnbRrcSapProvider () |
1462 { | 1503 { |
1463 NS_LOG_FUNCTION (this); | 1504 NS_LOG_FUNCTION (this); |
1464 return m_rrcSapProvider; | 1505 return m_rrcSapProvider; |
1465 } | 1506 } |
1466 | 1507 |
1467 void | 1508 void |
1468 LteEnbRrc::SetLteMacSapProvider (LteMacSapProvider * s) | 1509 LteEnbRrc::SetLteMacSapProvider (LteMacSapProvider * s) |
1469 { | 1510 { |
1470 NS_LOG_FUNCTION (this); | 1511 NS_LOG_FUNCTION (this); |
1471 m_macSapProvider = s; | 1512 m_macSapProvider = s; |
1472 } | 1513 } |
1473 | 1514 |
1474 void· | 1515 void· |
1475 LteEnbRrc::SetS1SapProvider (EpcEnbS1SapProvider * s) | 1516 LteEnbRrc::SetS1SapProvider (EpcEnbS1SapProvider * s) |
1476 { | 1517 { |
1477 m_s1SapProvider = s; | 1518 m_s1SapProvider = s; |
1478 } | 1519 } |
1479 | 1520 |
1480 | 1521 |
1481 EpcEnbS1SapUser*· | 1522 EpcEnbS1SapUser*· |
1482 LteEnbRrc::GetS1SapUser () | 1523 LteEnbRrc::GetS1SapUser () |
1483 { | 1524 { |
1484 return m_s1SapUser; | 1525 return m_s1SapUser; |
1485 } | 1526 } |
1486 | 1527 |
1487 void | 1528 void |
1488 LteEnbRrc::SetLteEnbCphySapProvider (LteEnbCphySapProvider * s) | 1529 LteEnbRrc::SetLteEnbCphySapProvider (LteEnbCphySapProvider * s) |
1489 { | 1530 { |
1490 NS_LOG_FUNCTION (this << s); | 1531 NS_LOG_FUNCTION (this << s); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 NS_ASSERT (!m_configured); | 1646 NS_ASSERT (!m_configured); |
1606 m_cmacSapProvider->ConfigureMac (ulBandwidth, dlBandwidth); | 1647 m_cmacSapProvider->ConfigureMac (ulBandwidth, dlBandwidth); |
1607 m_cphySapProvider->SetBandwidth (ulBandwidth, dlBandwidth); | 1648 m_cphySapProvider->SetBandwidth (ulBandwidth, dlBandwidth); |
1608 m_cphySapProvider->SetEarfcn (ulEarfcn, dlEarfcn); | 1649 m_cphySapProvider->SetEarfcn (ulEarfcn, dlEarfcn); |
1609 m_dlEarfcn = dlEarfcn; | 1650 m_dlEarfcn = dlEarfcn; |
1610 m_ulEarfcn = ulEarfcn; | 1651 m_ulEarfcn = ulEarfcn; |
1611 m_dlBandwidth = dlBandwidth; | 1652 m_dlBandwidth = dlBandwidth; |
1612 m_ulBandwidth = ulBandwidth; | 1653 m_ulBandwidth = ulBandwidth; |
1613 m_cellId = cellId; | 1654 m_cellId = cellId; |
1614 m_cphySapProvider->SetCellId (cellId); | 1655 m_cphySapProvider->SetCellId (cellId); |
| 1656 m_ffrRrcSapProvider->SetCellId (cellId); |
| 1657 m_ffrRrcSapProvider->SetBandwidth(ulBandwidth, dlBandwidth); |
1615 | 1658 |
1616 /* | 1659 /* |
1617 * Initializing the list of UE measurement configuration (m_ueMeasConfig). | 1660 * Initializing the list of UE measurement configuration (m_ueMeasConfig). |
1618 * Only intra-frequency measurements are supported, so only one measurement | 1661 * Only intra-frequency measurements are supported, so only one measurement |
1619 * object is created. | 1662 * object is created. |
1620 */ | 1663 */ |
1621 | 1664 |
1622 LteRrcSap::MeasObjectToAddMod measObject; | 1665 LteRrcSap::MeasObjectToAddMod measObject; |
1623 measObject.measObjectId = 1; | 1666 measObject.measObjectId = 1; |
1624 measObject.measObjectEutra.carrierFreq = m_dlEarfcn; | 1667 measObject.measObjectEutra.carrierFreq = m_dlEarfcn; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 NS_LOG_FUNCTION (this << rnti); | 1804 NS_LOG_FUNCTION (this << rnti); |
1762 GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg); | 1805 GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg); |
1763 } | 1806 } |
1764 | 1807 |
1765 void | 1808 void |
1766 LteEnbRrc::DoRecvRrcConnectionReconfigurationCompleted (uint16_t rnti, LteRrcSap
::RrcConnectionReconfigurationCompleted msg) | 1809 LteEnbRrc::DoRecvRrcConnectionReconfigurationCompleted (uint16_t rnti, LteRrcSap
::RrcConnectionReconfigurationCompleted msg) |
1767 { | 1810 { |
1768 NS_LOG_FUNCTION (this << rnti); | 1811 NS_LOG_FUNCTION (this << rnti); |
1769 GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg); | 1812 GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg); |
1770 } | 1813 } |
1771 | 1814 |
1772 void· | 1815 void· |
1773 LteEnbRrc::DoRecvRrcConnectionReestablishmentRequest (uint16_t rnti, LteRrcSap::
RrcConnectionReestablishmentRequest msg) | 1816 LteEnbRrc::DoRecvRrcConnectionReestablishmentRequest (uint16_t rnti, LteRrcSap::
RrcConnectionReestablishmentRequest msg) |
1774 { | 1817 { |
1775 NS_LOG_FUNCTION (this << rnti); | 1818 NS_LOG_FUNCTION (this << rnti); |
1776 GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg); | 1819 GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg); |
1777 } | 1820 } |
1778 | 1821 |
1779 void· | 1822 void· |
1780 LteEnbRrc::DoRecvRrcConnectionReestablishmentComplete (uint16_t rnti, LteRrcSap:
:RrcConnectionReestablishmentComplete msg) | 1823 LteEnbRrc::DoRecvRrcConnectionReestablishmentComplete (uint16_t rnti, LteRrcSap:
:RrcConnectionReestablishmentComplete msg) |
1781 { | 1824 { |
1782 NS_LOG_FUNCTION (this << rnti); | 1825 NS_LOG_FUNCTION (this << rnti); |
1783 GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg); | 1826 GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg); |
1784 } | 1827 } |
1785 | 1828 |
1786 void· | 1829 void· |
1787 LteEnbRrc::DoRecvMeasurementReport (uint16_t rnti, LteRrcSap::MeasurementReport
msg) | 1830 LteEnbRrc::DoRecvMeasurementReport (uint16_t rnti, LteRrcSap::MeasurementReport
msg) |
1788 { | 1831 { |
1789 NS_LOG_FUNCTION (this << rnti); | 1832 NS_LOG_FUNCTION (this << rnti); |
1790 GetUeManager (rnti)->RecvMeasurementReport (msg); | 1833 GetUeManager (rnti)->RecvMeasurementReport (msg); |
1791 } | 1834 } |
1792 | 1835 |
1793 void· | 1836 void· |
1794 LteEnbRrc::DoDataRadioBearerSetupRequest (EpcEnbS1SapUser::DataRadioBearerSetupR
equestParameters request) | 1837 LteEnbRrc::DoDataRadioBearerSetupRequest (EpcEnbS1SapUser::DataRadioBearerSetupR
equestParameters request) |
1795 { | 1838 { |
1796 Ptr<UeManager> ueManager = GetUeManager (request.rnti); | 1839 Ptr<UeManager> ueManager = GetUeManager (request.rnti); |
1797 ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtp
Teid, request.transportLayerAddress); | 1840 ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtp
Teid, request.transportLayerAddress); |
1798 } | 1841 } |
1799 | 1842 |
1800 void· | 1843 void· |
1801 LteEnbRrc::DoPathSwitchRequestAcknowledge (EpcEnbS1SapUser::PathSwitchRequestAck
nowledgeParameters params) | 1844 LteEnbRrc::DoPathSwitchRequestAcknowledge (EpcEnbS1SapUser::PathSwitchRequestAck
nowledgeParameters params) |
1802 { | 1845 { |
1803 Ptr<UeManager> ueManager = GetUeManager (params.rnti); | 1846 Ptr<UeManager> ueManager = GetUeManager (params.rnti); |
1804 ueManager->SendUeContextRelease (); | 1847 ueManager->SendUeContextRelease (); |
1805 } | 1848 } |
1806 | 1849 |
1807 void | 1850 void |
1808 LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams req) | 1851 LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams req) |
1809 { | 1852 { |
1810 NS_LOG_FUNCTION (this); | 1853 NS_LOG_FUNCTION (this); |
1811 | 1854 |
1812 NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST"); | 1855 NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST"); |
1813 | 1856 |
1814 NS_LOG_LOGIC ("oldEnbUeX2apId = " << req.oldEnbUeX2apId); | 1857 NS_LOG_LOGIC ("oldEnbUeX2apId = " << req.oldEnbUeX2apId); |
1815 NS_LOG_LOGIC ("sourceCellId = " << req.sourceCellId); | 1858 NS_LOG_LOGIC ("sourceCellId = " << req.sourceCellId); |
1816 NS_LOG_LOGIC ("targetCellId = " << req.targetCellId); | 1859 NS_LOG_LOGIC ("targetCellId = " << req.targetCellId); |
1817 NS_LOG_LOGIC ("mmeUeS1apId = " << req.mmeUeS1apId); | 1860 NS_LOG_LOGIC ("mmeUeS1apId = " << req.mmeUeS1apId); |
1818 | 1861 |
1819 NS_ASSERT (req.targetCellId == m_cellId); | 1862 NS_ASSERT (req.targetCellId == m_cellId); |
1820 | 1863 |
1821 if (m_admitHandoverRequest == false) | 1864 if (m_admitHandoverRequest == false) |
1822 { | 1865 { |
1823 NS_LOG_INFO ("rejecting handover request from cellId " << req.sourceCellId
); | 1866 NS_LOG_INFO ("rejecting handover request from cellId " << req.sourceCellId
); |
1824 EpcX2Sap::HandoverPreparationFailureParams res; | 1867 EpcX2Sap::HandoverPreparationFailureParams res; |
1825 res.oldEnbUeX2apId = req.oldEnbUeX2apId; | 1868 res.oldEnbUeX2apId = req.oldEnbUeX2apId; |
1826 res.sourceCellId = req.sourceCellId ; | 1869 res.sourceCellId = req.sourceCellId; |
1827 res.targetCellId = req.targetCellId ; | 1870 res.targetCellId = req.targetCellId; |
1828 res.cause = 0; | 1871 res.cause = 0; |
1829 res.criticalityDiagnostics = 0; | 1872 res.criticalityDiagnostics = 0; |
1830 m_x2SapProvider->SendHandoverPreparationFailure (res); | 1873 m_x2SapProvider->SendHandoverPreparationFailure (res); |
1831 return; | 1874 return; |
1832 } | 1875 } |
1833 | 1876 |
1834 uint16_t rnti = AddUe (UeManager::HANDOVER_JOINING); | 1877 uint16_t rnti = AddUe (UeManager::HANDOVER_JOINING); |
1835 LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue anrcrv = m_cmacSapProvi
der->AllocateNcRaPreamble (rnti); | 1878 LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue anrcrv = m_cmacSapProvi
der->AllocateNcRaPreamble (rnti); |
1836 if (anrcrv.valid == false) | 1879 if (anrcrv.valid == false) |
1837 { | 1880 { |
1838 NS_LOG_INFO (this << " failed to allocate a preamble for non-contention ba
sed RA => cannot accept HO"); | 1881 NS_LOG_INFO (this << " failed to allocate a preamble for non-contention ba
sed RA => cannot accept HO"); |
1839 RemoveUe (rnti); | 1882 RemoveUe (rnti); |
1840 NS_FATAL_ERROR ("should trigger HO Preparation Failure, but it is not impl
emented"); | 1883 NS_FATAL_ERROR ("should trigger HO Preparation Failure, but it is not impl
emented"); |
1841 return; | 1884 return; |
1842 } | 1885 } |
1843 | 1886 |
1844 Ptr<UeManager> ueManager = GetUeManager (rnti); | 1887 Ptr<UeManager> ueManager = GetUeManager (rnti); |
1845 ueManager->SetSource (req.sourceCellId, req.oldEnbUeX2apId); | 1888 ueManager->SetSource (req.sourceCellId, req.oldEnbUeX2apId); |
1846 ueManager->SetImsi (req.mmeUeS1apId); | 1889 ueManager->SetImsi (req.mmeUeS1apId); |
1847 | 1890 |
1848 EpcX2SapProvider::HandoverRequestAckParams ackParams; | 1891 EpcX2SapProvider::HandoverRequestAckParams ackParams; |
1849 ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId; | 1892 ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId; |
1850 ackParams.newEnbUeX2apId = rnti; | 1893 ackParams.newEnbUeX2apId = rnti; |
1851 ackParams.sourceCellId = req.sourceCellId; | 1894 ackParams.sourceCellId = req.sourceCellId; |
1852 ackParams.targetCellId = req.targetCellId; | 1895 ackParams.targetCellId = req.targetCellId; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1891 NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId); | 1934 NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId); |
1892 NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId); | 1935 NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId); |
1893 | 1936 |
1894 m_x2SapProvider->SendHandoverRequestAck (ackParams); | 1937 m_x2SapProvider->SendHandoverRequestAck (ackParams); |
1895 } | 1938 } |
1896 | 1939 |
1897 void | 1940 void |
1898 LteEnbRrc::DoRecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams para
ms) | 1941 LteEnbRrc::DoRecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams para
ms) |
1899 { | 1942 { |
1900 NS_LOG_FUNCTION (this); | 1943 NS_LOG_FUNCTION (this); |
1901 | 1944 |
1902 NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK"); | 1945 NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK"); |
1903 | 1946 |
1904 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); | 1947 NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
1905 NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); | 1948 NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
1906 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); | 1949 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
1907 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); | 1950 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
1908 | 1951 |
1909 uint16_t rnti = params.oldEnbUeX2apId; | 1952 uint16_t rnti = params.oldEnbUeX2apId; |
1910 Ptr<UeManager> ueManager = GetUeManager (rnti); | 1953 Ptr<UeManager> ueManager = GetUeManager (rnti); |
1911 ueManager->RecvHandoverRequestAck (params); | 1954 ueManager->RecvHandoverRequestAck (params); |
1912 } | 1955 } |
1913 | 1956 |
1914 void | 1957 void |
1915 LteEnbRrc::DoRecvHandoverPreparationFailure (EpcX2SapUser::HandoverPreparationFa
ilureParams params) | 1958 LteEnbRrc::DoRecvHandoverPreparationFailure (EpcX2SapUser::HandoverPreparationFa
ilureParams params) |
1916 { | 1959 { |
1917 NS_LOG_FUNCTION (this); | 1960 NS_LOG_FUNCTION (this); |
1918 | 1961 |
1919 NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE"); | 1962 NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE"); |
1920 | 1963 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 | 2005 |
1963 void | 2006 void |
1964 LteEnbRrc::DoRecvLoadInformation (EpcX2SapUser::LoadInformationParams params) | 2007 LteEnbRrc::DoRecvLoadInformation (EpcX2SapUser::LoadInformationParams params) |
1965 { | 2008 { |
1966 NS_LOG_FUNCTION (this); | 2009 NS_LOG_FUNCTION (this); |
1967 | 2010 |
1968 NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION"); | 2011 NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION"); |
1969 | 2012 |
1970 NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationLis
t.size ()); | 2013 NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationLis
t.size ()); |
1971 | 2014 |
1972 NS_ASSERT ("Processing of LOAD INFORMATION X2 message IS NOT IMPLEMENTED"); | 2015 m_ffrRrcSapProvider->RecvLoadInformation(params); |
1973 } | 2016 } |
1974 | 2017 |
1975 void | 2018 void |
1976 LteEnbRrc::DoRecvResourceStatusUpdate (EpcX2SapUser::ResourceStatusUpdateParams
params) | 2019 LteEnbRrc::DoRecvResourceStatusUpdate (EpcX2SapUser::ResourceStatusUpdateParams
params) |
1977 { | 2020 { |
1978 NS_LOG_FUNCTION (this); | 2021 NS_LOG_FUNCTION (this); |
1979 | 2022 |
1980 NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE"); | 2023 NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE"); |
1981 | 2024 |
1982 NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurem
entResultList.size ()); | 2025 NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurem
entResultList.size ()); |
1983 | 2026 |
1984 NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED
"); | 2027 NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED
"); |
1985 } | 2028 } |
1986 | 2029 |
1987 void | 2030 void |
1988 LteEnbRrc::DoRecvUeData (EpcX2SapUser::UeDataParams params) | 2031 LteEnbRrc::DoRecvUeData (EpcX2SapUser::UeDataParams params) |
1989 { | 2032 { |
1990 NS_LOG_FUNCTION (this); | 2033 NS_LOG_FUNCTION (this); |
1991 | 2034 |
1992 NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface"); | 2035 NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface"); |
1993 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); | 2036 NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
1994 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); | 2037 NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
1995 NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid); | 2038 NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid); |
1996 NS_LOG_LOGIC ("ueData = " << params.ueData); | 2039 NS_LOG_LOGIC ("ueData = " << params.ueData); |
1997 NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ()); | 2040 NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ()); |
1998 | 2041 |
1999 std::map<uint32_t, X2uTeidInfo>::iterator· | 2042 std::map<uint32_t, X2uTeidInfo>::iterator· |
2000 teidInfoIt = m_x2uTeidInfoMap.find (params.gtpTeid); | 2043 teidInfoIt = m_x2uTeidInfoMap.find (params.gtpTeid); |
2001 if (teidInfoIt != m_x2uTeidInfoMap.end ()) | 2044 if (teidInfoIt != m_x2uTeidInfoMap.end ()) |
2002 { | 2045 { |
2003 GetUeManager (teidInfoIt->second.rnti)->SendData (teidInfoIt->second.drbid
, params.ueData); | 2046 GetUeManager (teidInfoIt->second.rnti)->SendData (teidInfoIt->second.drbid
, params.ueData); |
2004 } | 2047 } |
2005 else | 2048 else |
2006 { | 2049 { |
2007 NS_FATAL_ERROR ("X2-U data received but no X2uTeidInfo found"); | 2050 NS_FATAL_ERROR ("X2-U data received but no X2uTeidInfo found"); |
2008 } | 2051 } |
2009 } | 2052 } |
2010 | 2053 |
2011 | 2054 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2084 | 2127 |
2085 uint8_t | 2128 uint8_t |
2086 LteEnbRrc::DoAddUeMeasReportConfigForAnr (LteRrcSap::ReportConfigEutra reportCon
fig) | 2129 LteEnbRrc::DoAddUeMeasReportConfigForAnr (LteRrcSap::ReportConfigEutra reportCon
fig) |
2087 { | 2130 { |
2088 NS_LOG_FUNCTION (this); | 2131 NS_LOG_FUNCTION (this); |
2089 uint8_t measId = AddUeMeasReportConfig (reportConfig); | 2132 uint8_t measId = AddUeMeasReportConfig (reportConfig); |
2090 m_anrMeasIds.insert (measId); | 2133 m_anrMeasIds.insert (measId); |
2091 return measId; | 2134 return measId; |
2092 } | 2135 } |
2093 | 2136 |
| 2137 uint8_t |
| 2138 LteEnbRrc::DoAddUeMeasReportConfigForFfr (LteRrcSap::ReportConfigEutra reportCon
fig) |
| 2139 { |
| 2140 NS_LOG_FUNCTION (this); |
| 2141 uint8_t measId = AddUeMeasReportConfig (reportConfig); |
| 2142 m_ffrMeasIds.insert (measId); |
| 2143 return measId; |
| 2144 } |
2094 | 2145 |
| 2146 void |
| 2147 LteEnbRrc::DoSetPdschConfigDedicated (uint16_t rnti, LteRrcSap::PdschConfigDedic
ated pdschConfigDedicated) |
| 2148 { |
| 2149 NS_LOG_FUNCTION (this); |
| 2150 Ptr<UeManager> ueManager = GetUeManager (rnti); |
| 2151 ueManager->SetPdschConfigDedicated (pdschConfigDedicated); |
| 2152 } |
| 2153 |
| 2154 void |
| 2155 LteEnbRrc::DoSendLoadInformation (EpcX2Sap::LoadInformationParams params) |
| 2156 { |
| 2157 NS_LOG_FUNCTION (this); |
| 2158 |
| 2159 m_x2SapProvider->SendLoadInformation(params); |
| 2160 } |
2095 | 2161 |
2096 uint16_t | 2162 uint16_t |
2097 LteEnbRrc::AddUe (UeManager::State state) | 2163 LteEnbRrc::AddUe (UeManager::State state) |
2098 { | 2164 { |
2099 NS_LOG_FUNCTION (this); | 2165 NS_LOG_FUNCTION (this); |
2100 bool found = false; | 2166 bool found = false; |
2101 uint16_t rnti; | 2167 uint16_t rnti; |
2102 for (rnti = m_lastAllocatedRnti + 1;· | 2168 for (rnti = m_lastAllocatedRnti + 1;· |
2103 (rnti != m_lastAllocatedRnti - 1) && (!found); | 2169 (rnti != m_lastAllocatedRnti - 1) && (!found); |
2104 ++rnti) | 2170 ++rnti) |
2105 { | 2171 { |
2106 if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ())) | 2172 if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ())) |
2107 { | 2173 { |
2108 found = true; | 2174 found = true; |
2109 break; | 2175 break; |
2110 } | 2176 } |
2111 } | 2177 } |
2112 | 2178 |
2113 NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UE
s in a cell?)"); | 2179 NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UE
s in a cell?)"); |
2114 m_lastAllocatedRnti = rnti; | 2180 m_lastAllocatedRnti = rnti; |
2115 Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state); | 2181 Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state); |
2116 m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager)); | 2182 m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager)); |
2117 ueManager->Initialize (); | 2183 ueManager->Initialize (); |
2118 NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << m_cellId << " s
rs CI " << ueManager->GetSrsConfigurationIndex ()); | 2184 NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << m_cellId << " s
rs CI " << ueManager->GetSrsConfigurationIndex ()); |
2119 m_newUeContextTrace (m_cellId, rnti); | 2185 m_newUeContextTrace (m_cellId, rnti); |
2120 return rnti; | 2186 return rnti; |
2121 } | 2187 } |
2122 | 2188 |
2123 void | 2189 void |
2124 LteEnbRrc::RemoveUe (uint16_t rnti) | 2190 LteEnbRrc::RemoveUe (uint16_t rnti) |
2125 { | 2191 { |
2126 NS_LOG_FUNCTION (this << (uint32_t) rnti); | 2192 NS_LOG_FUNCTION (this << (uint32_t) rnti); |
2127 std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); | 2193 std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); |
2128 NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown r
nti " << rnti); | 2194 NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown r
nti " << rnti); |
2129 uint16_t srsCi = (*it).second->GetSrsConfigurationIndex (); | 2195 uint16_t srsCi = (*it).second->GetSrsConfigurationIndex (); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 LteEnbRrc::GetNewSrsConfigurationIndex () | 2301 LteEnbRrc::GetNewSrsConfigurationIndex () |
2236 { | 2302 { |
2237 NS_LOG_FUNCTION (this << m_ueSrsConfigurationIndexSet.size ()); | 2303 NS_LOG_FUNCTION (this << m_ueSrsConfigurationIndexSet.size ()); |
2238 // SRS | 2304 // SRS |
2239 NS_ASSERT (m_srsCurrentPeriodicityId > 0); | 2305 NS_ASSERT (m_srsCurrentPeriodicityId > 0); |
2240 NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); | 2306 NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); |
2241 NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId]
<< " set " << m_ueSrsConfigurationIndexSet.size ()); | 2307 NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId]
<< " set " << m_ueSrsConfigurationIndexSet.size ()); |
2242 if (m_ueSrsConfigurationIndexSet.size () >= g_srsPeriodicity[m_srsCurrentPerio
dicityId]) | 2308 if (m_ueSrsConfigurationIndexSet.size () >= g_srsPeriodicity[m_srsCurrentPerio
dicityId]) |
2243 { | 2309 { |
2244 NS_FATAL_ERROR ("too many UEs (" << m_ueSrsConfigurationIndexSet.size () +
1· | 2310 NS_FATAL_ERROR ("too many UEs (" << m_ueSrsConfigurationIndexSet.size () +
1· |
2245 << ") for current SRS periodicity "· | 2311 << ") for current SRS periodicity " |
2246 << g_srsPeriodicity[m_srsCurrentPeriodicityId] | 2312 << g_srsPeriodicity[m_srsCurrentPeriodic
ityId] |
2247 << ", consider increasing the value of ns3::LteEnbRrc::Srs
Periodicity"); | 2313 << ", consider increasing the value of ns
3::LteEnbRrc::SrsPeriodicity"); |
2248 } | 2314 } |
2249 | 2315 |
2250 if (m_ueSrsConfigurationIndexSet.empty ()) | 2316 if (m_ueSrsConfigurationIndexSet.empty ()) |
2251 { | 2317 { |
2252 // first entry | 2318 // first entry |
2253 m_lastAllocatedConfigurationIndex = g_srsCiLow[m_srsCurrentPeriodicityId]; | 2319 m_lastAllocatedConfigurationIndex = g_srsCiLow[m_srsCurrentPeriodicityId]; |
2254 m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex); | 2320 m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex); |
2255 } | 2321 } |
2256 else | 2322 else |
2257 { | 2323 { |
(...skipping 16 matching lines...) Expand all Loading... |
2274 if (it==m_ueSrsConfigurationIndexSet.end ()) | 2340 if (it==m_ueSrsConfigurationIndexSet.end ()) |
2275 { | 2341 { |
2276 m_lastAllocatedConfigurationIndex = srcCi; | 2342 m_lastAllocatedConfigurationIndex = srcCi; |
2277 m_ueSrsConfigurationIndexSet.insert (srcCi); | 2343 m_ueSrsConfigurationIndexSet.insert (srcCi); |
2278 break; | 2344 break; |
2279 } | 2345 } |
2280 } | 2346 } |
2281 }· | 2347 }· |
2282 } | 2348 } |
2283 return m_lastAllocatedConfigurationIndex; | 2349 return m_lastAllocatedConfigurationIndex; |
2284 | 2350 |
2285 } | 2351 } |
2286 | 2352 |
2287 | 2353 |
2288 void | 2354 void |
2289 LteEnbRrc::RemoveSrsConfigurationIndex (uint16_t srcCi) | 2355 LteEnbRrc::RemoveSrsConfigurationIndex (uint16_t srcCi) |
2290 { | 2356 { |
2291 NS_LOG_FUNCTION (this << srcCi); | 2357 NS_LOG_FUNCTION (this << srcCi); |
2292 std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); | 2358 std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); |
2293 NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove u
nkwown SRS CI " << srcCi); | 2359 NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove u
nkwown SRS CI " << srcCi); |
2294 m_ueSrsConfigurationIndexSet.erase (it); | 2360 m_ueSrsConfigurationIndexSet.erase (it); |
(...skipping 24 matching lines...) Expand all Loading... |
2319 // NS_LOG_FUNCTION (this); | 2385 // NS_LOG_FUNCTION (this); |
2320 | 2386 |
2321 /* | 2387 /* |
2322 * For simplicity, we use the same periodicity for all SIBs. Note that in real | 2388 * For simplicity, we use the same periodicity for all SIBs. Note that in real |
2323 * systems the periodicy of each SIBs could be different. | 2389 * systems the periodicy of each SIBs could be different. |
2324 */ | 2390 */ |
2325 LteRrcSap::SystemInformation si; | 2391 LteRrcSap::SystemInformation si; |
2326 si.haveSib2 = true; | 2392 si.haveSib2 = true; |
2327 si.sib2.freqInfo.ulCarrierFreq = m_ulEarfcn; | 2393 si.sib2.freqInfo.ulCarrierFreq = m_ulEarfcn; |
2328 si.sib2.freqInfo.ulBandwidth = m_ulBandwidth; | 2394 si.sib2.freqInfo.ulBandwidth = m_ulBandwidth; |
| 2395 si.sib2.radioResourceConfigCommon.pdschConfigCommon.referenceSignalPower = m_c
phySapProvider->GetReferenceSignalPower(); |
| 2396 si.sib2.radioResourceConfigCommon.pdschConfigCommon.pb = 0; |
2329 | 2397 |
2330 LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider->GetRachConfig (); | 2398 LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider->GetRachConfig (); |
2331 LteRrcSap::RachConfigCommon rachConfigCommon; | 2399 LteRrcSap::RachConfigCommon rachConfigCommon; |
2332 rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; | 2400 rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
2333 rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; | 2401 rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
2334 rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowS
ize; | 2402 rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowS
ize; |
2335 si.sib2.radioResourceConfigCommon.rachConfigCommon = rachConfigCommon; | 2403 si.sib2.radioResourceConfigCommon.rachConfigCommon = rachConfigCommon; |
2336 | 2404 |
2337 m_rrcSapUser->SendSystemInformation (si); | 2405 m_rrcSapUser->SendSystemInformation (si); |
2338 Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInf
ormation, this); | 2406 Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInf
ormation, this); |
2339 } | 2407 } |
2340 | 2408 |
2341 | 2409 |
2342 } // namespace ns3 | 2410 } // namespace ns3 |
2343 | 2411 |
OLD | NEW |