author | Lluís Parcerisa <parcerisa@gmail.com> |
Thu, 04 Apr 2013 11:49:19 +0200 | |
changeset 10028 | f988b82ef6ec |
parent 10022 | 4942b556f517 |
child 10036 | ef2b940112fd |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License version 2 as |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
18 |
* Author: Nicola Baldo <nbaldo@cttc.es> |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
19 |
* Marco Miozzo <mmiozzo@cttc.es> |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
20 |
* Manuel Requena <manuel.requena@cttc.es> |
7886 | 21 |
*/ |
22 |
||
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
23 |
#include "ns3/fatal-error.h" |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
24 |
#include "ns3/log.h" |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
25 |
#include "ns3/abort.h" |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
26 |
#include "ns3/pointer.h" |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
27 |
#include "ns3/object-map.h" |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
28 |
#include "ns3/object-factory.h" |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
29 |
#include "ns3/simulator.h" |
7886 | 30 |
|
9406 | 31 |
#include "lte-enb-rrc.h" |
32 |
||
33 |
#include "lte-enb-net-device.h" |
|
34 |
#include "lte-radio-bearer-info.h" |
|
35 |
#include "eps-bearer-tag.h" |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
36 |
#include "ff-mac-csched-sap.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
37 |
#include "epc-enb-s1-sap.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
38 |
|
7886 | 39 |
#include "lte-rlc.h" |
9406 | 40 |
#include "lte-rlc-tm.h" |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
41 |
#include "lte-rlc-um.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
42 |
#include "lte-rlc-am.h" |
9406 | 43 |
#include "lte-pdcp.h" |
44 |
#include "lte-pdcp-sap.h" |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
45 |
|
9036 | 46 |
#include <ns3/simulator.h> |
47 |
||
7886 | 48 |
|
49 |
||
9036 | 50 |
|
7886 | 51 |
NS_LOG_COMPONENT_DEFINE ("LteEnbRrc"); |
52 |
||
9406 | 53 |
|
7886 | 54 |
namespace ns3 { |
55 |
||
56 |
||
57 |
// /////////////////////////// |
|
58 |
// CMAC SAP forwarder |
|
59 |
// /////////////////////////// |
|
60 |
||
7888 | 61 |
class EnbRrcMemberLteEnbCmacSapUser : public LteEnbCmacSapUser |
7886 | 62 |
{ |
63 |
public: |
|
7888 | 64 |
EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc); |
7886 | 65 |
|
9406 | 66 |
virtual uint16_t AllocateTemporaryCellRnti (); |
7886 | 67 |
virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success); |
9346 | 68 |
virtual void RrcConfigurationUpdateInd (UeConfig params); |
7886 | 69 |
|
70 |
private: |
|
71 |
LteEnbRrc* m_rrc; |
|
72 |
}; |
|
73 |
||
7888 | 74 |
EnbRrcMemberLteEnbCmacSapUser::EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc) |
7886 | 75 |
: m_rrc (rrc) |
76 |
{ |
|
77 |
} |
|
78 |
||
9406 | 79 |
uint16_t |
80 |
EnbRrcMemberLteEnbCmacSapUser::AllocateTemporaryCellRnti () |
|
81 |
{ |
|
82 |
return m_rrc->DoAllocateTemporaryCellRnti (); |
|
83 |
} |
|
84 |
||
7886 | 85 |
void |
7888 | 86 |
EnbRrcMemberLteEnbCmacSapUser::NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
7886 | 87 |
{ |
88 |
m_rrc->DoNotifyLcConfigResult (rnti, lcid, success); |
|
89 |
} |
|
90 |
||
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
91 |
void |
9346 | 92 |
EnbRrcMemberLteEnbCmacSapUser::RrcConfigurationUpdateInd (UeConfig params) |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
93 |
{ |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
94 |
m_rrc->DoRrcConfigurationUpdateInd (params); |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
95 |
} |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
96 |
|
7886 | 97 |
|
9406 | 98 |
const char* g_ueManagerStateName[UeManager::NUM_STATES] = |
99 |
{ |
|
100 |
"INITIAL_RANDOM_ACCESS", |
|
101 |
"CONNECTION_SETUP", |
|
9593
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
102 |
"CONNECTION_REJECTED", |
9406 | 103 |
"CONNECTED_NORMALLY", |
104 |
"CONNECTION_RECONFIGURATION", |
|
105 |
"CONNECTION_REESTABLISHMENT", |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
106 |
"HANDOVER_PREPARATION", |
9406 | 107 |
"HANDOVER_JOINING", |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
108 |
"HANDOVER_PATH_SWITCH", |
9406 | 109 |
"HANDOVER_LEAVING", |
110 |
}; |
|
111 |
||
112 |
std::string ToString (UeManager::State s) |
|
113 |
{ |
|
114 |
return std::string (g_ueManagerStateName[s]); |
|
115 |
} |
|
116 |
||
117 |
||
118 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
119 |
/////////////////////////////////////////// |
9406 | 120 |
// UeManager |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
121 |
/////////////////////////////////////////// |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
122 |
|
7886 | 123 |
|
9406 | 124 |
NS_OBJECT_ENSURE_REGISTERED (UeManager); |
125 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
126 |
|
9406 | 127 |
UeManager::UeManager () |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
128 |
{ |
9406 | 129 |
NS_FATAL_ERROR ("this constructor is not espected to be used"); |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
130 |
} |
7886 | 131 |
|
8007 | 132 |
|
9406 | 133 |
UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s) |
134 |
: m_lastAllocatedDrbid (0), |
|
135 |
m_rnti (rnti), |
|
136 |
m_imsi (0), |
|
137 |
m_lastRrcTransactionIdentifier (0), |
|
138 |
m_rrc (rrc), |
|
139 |
m_state (s), |
|
9407 | 140 |
m_pendingRrcConnectionReconfiguration (false), |
141 |
m_sourceX2apId (0), |
|
9541
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
142 |
m_sourceCellId (0), |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
143 |
m_needTransmissionModeConfiguration (false) |
9406 | 144 |
{ |
145 |
NS_LOG_FUNCTION (this); |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
146 |
} |
9406 | 147 |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
148 |
void |
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
149 |
UeManager::DoStart () |
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
150 |
{ |
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
151 |
NS_LOG_FUNCTION (this); |
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9445
diff
changeset
|
152 |
m_drbPdcpSapUser = new LtePdcpSpecificLtePdcpSapUser<UeManager> (this); |
9406 | 153 |
|
154 |
m_physicalConfigDedicated.haveAntennaInfoDedicated = true; |
|
155 |
m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTransmissionMode; |
|
156 |
m_physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true; |
|
157 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = m_rrc->GetNewSrsConfigurationIndex (); |
|
9507
b3ae0b546cc4
Fix bug in UE phy with m_srsPeriodicity == 0
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9501
diff
changeset
|
158 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.type = LteRrcSap::SoundingRsUlConfigDedicated::SETUP; |
9564
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
159 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth = 0; |
9406 | 160 |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
161 |
m_rrc->m_cmacSapProvider->AddUe (m_rnti); |
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
162 |
m_rrc->m_cphySapProvider->AddUe (m_rnti); |
9406 | 163 |
|
164 |
// setup the eNB side of SRB0 |
|
165 |
{ |
|
166 |
uint8_t lcid = 0; |
|
167 |
||
168 |
Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> (); |
|
169 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
170 |
rlc->SetRnti (m_rnti); |
|
171 |
rlc->SetLcId (lcid); |
|
172 |
||
173 |
m_srb0 = CreateObject<LteSignalingRadioBearerInfo> (); |
|
174 |
m_srb0->m_rlc = rlc; |
|
9473
8b420bd32318
reset MAC and reinitialize SRBs upon handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9472
diff
changeset
|
175 |
m_srb0->m_srbIdentity = 0; |
9406 | 176 |
// no need to store logicalChannelConfig as SRB0 is pre-configured |
177 |
||
178 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
179 |
lcinfo.rnti = m_rnti; |
|
180 |
lcinfo.lcId = lcid; |
|
181 |
// leave the rest of lcinfo empty as CCCH (LCID 0) is pre-configured |
|
182 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
183 |
||
184 |
} |
|
185 |
||
186 |
// setup the eNB side of SRB1; the UE side will be set up upon RRC connection establishment |
|
187 |
{ |
|
188 |
uint8_t lcid = 1; |
|
189 |
||
190 |
Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> (); |
|
191 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
192 |
rlc->SetRnti (m_rnti); |
|
193 |
rlc->SetLcId (lcid); |
|
194 |
||
195 |
Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
|
196 |
pdcp->SetRnti (m_rnti); |
|
197 |
pdcp->SetLcId (lcid); |
|
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9445
diff
changeset
|
198 |
pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); |
9406 | 199 |
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
200 |
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
|
201 |
||
202 |
m_srb1 = CreateObject<LteSignalingRadioBearerInfo> (); |
|
203 |
m_srb1->m_rlc = rlc; |
|
204 |
m_srb1->m_pdcp = pdcp; |
|
205 |
m_srb1->m_srbIdentity = 1; |
|
206 |
m_srb1->m_logicalChannelConfig.priority = 0; |
|
207 |
m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100; |
|
208 |
m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100; |
|
209 |
m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0; |
|
210 |
||
211 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
212 |
lcinfo.rnti = m_rnti; |
|
213 |
lcinfo.lcId = lcid; |
|
214 |
lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0 |
|
215 |
lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires a CQI even for SRBs... |
|
216 |
lcinfo.isGbr = true; |
|
217 |
lcinfo.mbrUl = 1e6; |
|
218 |
lcinfo.mbrDl = 1e6; |
|
219 |
lcinfo.gbrUl = 1e4; |
|
220 |
lcinfo.gbrDl = 1e4; |
|
221 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
222 |
} |
|
223 |
||
224 |
LteEnbRrcSapUser::SetupUeParameters ueParams; |
|
225 |
ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider (); |
|
226 |
ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider (); |
|
227 |
m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams); |
|
228 |
||
229 |
// configure MAC (and scheduler) |
|
230 |
LteEnbCmacSapProvider::UeConfig req; |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
231 |
req.m_rnti = m_rnti; |
9406 | 232 |
req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMode; |
233 |
m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
|
234 |
||
235 |
// configure PHY |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
236 |
m_rrc->m_cphySapProvider->SetTransmissionMode (m_rnti, m_physicalConfigDedicated.antennaInfo.transmissionMode); |
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
237 |
m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex); |
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
238 |
|
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
239 |
// schedule this UeManager instance to be deleted if the UE does not give any sign of life within a reasonable time |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
240 |
Time maxConnectionDelay; |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
241 |
switch (m_state) |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
242 |
{ |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
243 |
case INITIAL_RANDOM_ACCESS: |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
244 |
m_connectionTimeout = Simulator::Schedule (m_rrc->m_connectionTimeoutDuration, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
245 |
&LteEnbRrc::ConnectionTimeout, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
246 |
m_rrc, m_rnti); |
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
247 |
break; |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
248 |
|
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
249 |
case HANDOVER_JOINING: |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
250 |
m_handoverJoiningTimeout = Simulator::Schedule (m_rrc->m_handoverJoiningTimeoutDuration, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
251 |
&LteEnbRrc::HandoverJoiningTimeout, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
252 |
m_rrc, m_rnti); |
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
253 |
break; |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
254 |
|
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
255 |
default: |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
256 |
NS_FATAL_ERROR ("unexpected state " << ToString (m_state)); |
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
257 |
break; |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
258 |
} |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
259 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
260 |
m_servingCellMeasures = CreateObject<UeMeasure> (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
261 |
m_servingCellMeasures->m_cellId = m_rrc->m_cellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
262 |
m_servingCellMeasures->m_rsrp = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
263 |
m_servingCellMeasures->m_rsrq = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
264 |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
265 |
} |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
266 |
|
9406 | 267 |
|
268 |
UeManager::~UeManager (void) |
|
269 |
{ |
|
270 |
} |
|
271 |
||
272 |
void |
|
273 |
UeManager::DoDispose () |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
274 |
{ |
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9445
diff
changeset
|
275 |
delete m_drbPdcpSapUser; |
9599
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
276 |
// delete eventual X2-U TEIDs |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
277 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
278 |
it != m_drbMap.end (); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
279 |
++it) |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
280 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
281 |
m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid); |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
282 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
283 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
284 |
m_servingCellMeasures = 0; |
9406 | 285 |
} |
286 |
||
287 |
TypeId UeManager::GetTypeId (void) |
|
288 |
{ |
|
289 |
static TypeId tid = TypeId ("ns3::UeManager") |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
290 |
.SetParent<Object> () |
9406 | 291 |
.AddConstructor<UeManager> () |
9615 | 292 |
.AddAttribute ("DataRadioBearerMap", "List of UE DataRadioBearerInfo by DRBID.", |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
293 |
ObjectMapValue (), |
9406 | 294 |
MakeObjectMapAccessor (&UeManager::m_drbMap), |
295 |
MakeObjectMapChecker<LteDataRadioBearerInfo> ()) |
|
9615 | 296 |
.AddAttribute ("Srb0", "SignalingRadioBearerInfo for SRB0", |
297 |
PointerValue (), |
|
298 |
MakePointerAccessor (&UeManager::m_srb0), |
|
299 |
MakePointerChecker<LteSignalingRadioBearerInfo> ()) |
|
300 |
.AddAttribute ("Srb1", "SignalingRadioBearerInfo for SRB1", |
|
301 |
PointerValue (), |
|
302 |
MakePointerAccessor (&UeManager::m_srb1), |
|
303 |
MakePointerChecker<LteSignalingRadioBearerInfo> ()) |
|
304 |
.AddAttribute ("C-RNTI", |
|
305 |
"Cell Radio Network Temporary Identifier", |
|
306 |
TypeId::ATTR_GET, // read-only attribute |
|
307 |
UintegerValue (0), // unused, read-only attribute |
|
308 |
MakeUintegerAccessor (&UeManager::m_rnti), |
|
309 |
MakeUintegerChecker<uint16_t> ()) |
|
9406 | 310 |
.AddTraceSource ("StateTransition", |
311 |
"fired upon every UE state transition seen by the UeManager at the eNB RRC", |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
312 |
MakeTraceSourceAccessor (&UeManager::m_stateTransitionTrace)) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
313 |
; |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
314 |
return tid; |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
315 |
} |
7886 | 316 |
|
9407 | 317 |
void |
318 |
UeManager::SetSource (uint16_t sourceCellId, uint16_t sourceX2apId) |
|
319 |
{ |
|
320 |
m_sourceX2apId = sourceX2apId; |
|
321 |
m_sourceCellId = sourceCellId; |
|
322 |
} |
|
9406 | 323 |
|
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
324 |
void |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
325 |
UeManager::SetImsi (uint64_t imsi) |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
326 |
{ |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
327 |
m_imsi = imsi; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
328 |
} |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
329 |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
330 |
void |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
331 |
UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress) |
9406 | 332 |
{ |
333 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
|
334 |
||
335 |
Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> (); |
|
336 |
uint8_t drbid = AddDataRadioBearerInfo (drbInfo); |
|
337 |
uint8_t lcid = Drbid2Lcid (drbid); |
|
338 |
uint8_t bid = Drbid2Bid (drbid); |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
339 |
NS_ASSERT_MSG ( bearerId == 0 || bid == bearerId, "bearer ID mismatch (" << (uint32_t) bid << " != " << (uint32_t) bearerId << ", the assumption that ID are allocated in the same way by MME and RRC is not valid any more"); |
9406 | 340 |
drbInfo->m_epsBearerIdentity = bid; |
341 |
drbInfo->m_drbIdentity = drbid; |
|
342 |
drbInfo->m_logicalChannelIdentity = lcid; |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
343 |
drbInfo->m_gtpTeid = gtpTeid; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
344 |
drbInfo->m_transportLayerAddress = transportLayerAddress; |
9406 | 345 |
|
9599
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
346 |
if (m_state == HANDOVER_JOINING) |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
347 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
348 |
// setup TEIDs for receiving data eventually forwarded over X2-U |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
349 |
LteEnbRrc::X2uTeidInfo x2uTeidInfo; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
350 |
x2uTeidInfo.rnti = m_rnti; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
351 |
x2uTeidInfo.drbid = drbid; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
352 |
std::pair<std::map<uint32_t, LteEnbRrc::X2uTeidInfo>::iterator, bool> |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
353 |
ret = m_rrc->m_x2uTeidInfoMap.insert (std::pair<uint32_t, LteEnbRrc::X2uTeidInfo> (gtpTeid, x2uTeidInfo)); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
354 |
NS_ASSERT_MSG (ret.second == true, "overwriting a pre-existing entry in m_x2uTeidInfoMap"); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
355 |
} |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
356 |
|
9406 | 357 |
TypeId rlcTypeId = m_rrc->GetRlcType (bearer); |
358 |
||
359 |
ObjectFactory rlcObjectFactory; |
|
360 |
rlcObjectFactory.SetTypeId (rlcTypeId); |
|
361 |
Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> (); |
|
362 |
rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider); |
|
363 |
rlc->SetRnti (m_rnti); |
|
364 |
||
365 |
drbInfo->m_rlc = rlc; |
|
366 |
||
367 |
rlc->SetLcId (lcid); |
|
368 |
||
369 |
// we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM |
|
370 |
// if we are using RLC/SM we don't care of anything above RLC |
|
371 |
if (rlcTypeId != LteRlcSm::GetTypeId ()) |
|
372 |
{ |
|
373 |
Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> (); |
|
374 |
pdcp->SetRnti (m_rnti); |
|
375 |
pdcp->SetLcId (lcid); |
|
9447
f836d3a3b71a
added LteUeRrcSapProvider::CompleteSetup ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9445
diff
changeset
|
376 |
pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser); |
9406 | 377 |
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ()); |
378 |
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ()); |
|
379 |
drbInfo->m_pdcp = pdcp; |
|
380 |
} |
|
381 |
||
382 |
LteEnbCmacSapProvider::LcInfo lcinfo; |
|
383 |
lcinfo.rnti = m_rnti; |
|
384 |
lcinfo.lcId = lcid; |
|
385 |
lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer); |
|
386 |
lcinfo.qci = bearer.qci; |
|
387 |
lcinfo.isGbr = bearer.IsGbr (); |
|
388 |
lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl; |
|
389 |
lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl; |
|
390 |
lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl; |
|
391 |
lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl; |
|
392 |
m_rrc->m_cmacSapProvider->AddLc (lcinfo, rlc->GetLteMacSapUser ()); |
|
393 |
||
394 |
if (drbInfo->m_rlc->GetTypeId () == LteRlcAm::GetTypeId ()) |
|
395 |
{ |
|
396 |
drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM; |
|
397 |
} |
|
398 |
else |
|
399 |
{ |
|
400 |
drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL; |
|
401 |
} |
|
402 |
||
403 |
drbInfo->m_logicalChannelIdentity = lcid; |
|
404 |
drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (bearer); |
|
405 |
drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannelGroup (bearer); |
|
406 |
if (bearer.IsGbr ()) |
|
407 |
{ |
|
408 |
drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo.gbrUl; |
|
409 |
} |
|
410 |
else |
|
411 |
{ |
|
412 |
drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0; |
|
413 |
} |
|
414 |
drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000; |
|
415 |
||
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
416 |
ScheduleRrcConnectionReconfiguration (); |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
417 |
} |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
418 |
|
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
419 |
void |
9523
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
420 |
UeManager::RecordDataRadioBearersToBeStarted () |
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
421 |
{ |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
422 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
423 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
424 |
it != m_drbMap.end (); |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
425 |
++it) |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
426 |
{ |
9523
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
427 |
m_drbsToBeStarted.push_back (it->first); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
428 |
} |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
429 |
} |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
430 |
|
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
431 |
void |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
432 |
UeManager::StartDataRadioBearers () |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
433 |
{ |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
434 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
435 |
for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin (); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
436 |
drbIdIt != m_drbsToBeStarted.end (); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
437 |
++drbIdIt) |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
438 |
{ |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
439 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (*drbIdIt); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
440 |
NS_ASSERT (drbIt != m_drbMap.end ()); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
441 |
drbIt->second->m_rlc->Start (); |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
442 |
if (drbIt->second->m_pdcp) |
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
443 |
{ |
9523
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
444 |
drbIt->second->m_pdcp->Start (); |
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
445 |
} |
9523
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
446 |
} |
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
447 |
m_drbsToBeStarted.clear (); |
9406 | 448 |
} |
449 |
||
450 |
||
451 |
void |
|
452 |
UeManager::ReleaseDataRadioBearer (uint8_t drbid) |
|
453 |
{ |
|
454 |
NS_LOG_FUNCTION (this << (uint32_t) m_rnti << (uint32_t) drbid); |
|
455 |
uint8_t lcid = Drbid2Lcid (drbid); |
|
456 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
457 |
NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid); |
|
9599
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
458 |
|
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
459 |
// first delete eventual X2-U TEIDs |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
460 |
m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
461 |
|
9406 | 462 |
m_drbMap.erase (it); |
463 |
m_rrc->m_cmacSapProvider->ReleaseLc (m_rnti, lcid); |
|
464 |
||
465 |
LteRrcSap::RadioResourceConfigDedicated rrcd; |
|
466 |
rrcd.havePhysicalConfigDedicated = false; |
|
467 |
rrcd.drbToReleaseList.push_back (drbid); |
|
468 |
||
469 |
LteRrcSap::RrcConnectionReconfiguration msg; |
|
470 |
msg.haveMeasConfig = false; |
|
471 |
msg.haveMobilityControlInfo = false; |
|
472 |
||
473 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg); |
|
474 |
} |
|
475 |
||
476 |
||
477 |
void |
|
478 |
UeManager::ScheduleRrcConnectionReconfiguration () |
|
479 |
{ |
|
480 |
NS_LOG_FUNCTION (this); |
|
481 |
switch (m_state) |
|
482 |
{ |
|
483 |
case INITIAL_RANDOM_ACCESS: |
|
484 |
case CONNECTION_SETUP: |
|
485 |
case CONNECTION_RECONFIGURATION: |
|
486 |
case CONNECTION_REESTABLISHMENT: |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
487 |
case HANDOVER_PREPARATION: |
9406 | 488 |
case HANDOVER_JOINING: |
489 |
case HANDOVER_LEAVING: |
|
490 |
// a previous reconfiguration still ongoing, we need to wait for it to be finished |
|
491 |
m_pendingRrcConnectionReconfiguration = true; |
|
492 |
break; |
|
493 |
||
494 |
case CONNECTED_NORMALLY: |
|
495 |
{ |
|
496 |
m_pendingRrcConnectionReconfiguration = false; |
|
497 |
LteRrcSap::RrcConnectionReconfiguration msg = BuildRrcConnectionReconfiguration (); |
|
498 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg); |
|
9523
4f5bc596bf98
LteEnbRrc: start only bearers in previous RRC connection setup/reconfiguration msg
Nicola Baldo <nbaldo@cttc.es>
parents:
9507
diff
changeset
|
499 |
RecordDataRadioBearersToBeStarted (); |
9406 | 500 |
SwitchToState (CONNECTION_RECONFIGURATION); |
501 |
} |
|
502 |
break; |
|
503 |
||
504 |
default: |
|
505 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
506 |
break; |
|
507 |
} |
|
508 |
} |
|
509 |
||
510 |
void |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
511 |
UeManager::PrepareHandover (uint16_t cellId) |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
512 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
513 |
NS_LOG_FUNCTION (this << cellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
514 |
switch (m_state) |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
515 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
516 |
case CONNECTED_NORMALLY: |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
517 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
518 |
m_targetCellId = cellId; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
519 |
EpcX2SapProvider::HandoverRequestParams params; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
520 |
params.oldEnbUeX2apId = m_rnti; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
521 |
params.cause = EpcX2SapProvider::HandoverDesirableForRadioReason; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
522 |
params.sourceCellId = m_rrc->m_cellId; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
523 |
params.targetCellId = cellId; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
524 |
params.mmeUeS1apId = m_imsi; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
525 |
params.ueAggregateMaxBitRateDownlink = 200 * 1000; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
526 |
params.ueAggregateMaxBitRateUplink = 100 * 1000; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
527 |
params.bearers = GetErabList (); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
528 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
529 |
LteRrcSap::HandoverPreparationInfo hpi; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
530 |
hpi.asConfig.sourceUeIdentity = m_rnti; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
531 |
hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
532 |
hpi.asConfig.sourceMeasConfig = BuildMeasConfig (); |
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
533 |
hpi.asConfig.sourceRadioResourceConfig = GetRadioResourceConfigForHandoverPreparationInfo (); |
9564
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
534 |
hpi.asConfig.sourceMasterInformationBlock.dlBandwidth = m_rrc->m_dlBandwidth; |
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
535 |
hpi.asConfig.sourceMasterInformationBlock.systemFrameNumber = 0; |
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
536 |
hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = 0; |
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
537 |
hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.cellIdentity = m_rrc->m_cellId; |
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
538 |
hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication = 0; |
6a07929995e2
Set hpi.asConfig.sourceSystemInformationBlockType1 correct values.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9558
diff
changeset
|
539 |
hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity = 0; |
9660
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
540 |
LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider->GetRachConfig (); |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
541 |
hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
542 |
hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
543 |
hpi.asConfig.sourceSystemInformationBlockType2.radioResourceConfigCommon.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSize; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
544 |
hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulCarrierFreq = m_rrc->m_ulEarfcn; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
545 |
hpi.asConfig.sourceSystemInformationBlockType2.freqInfo.ulBandwidth = m_rrc->m_ulBandwidth; |
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
546 |
params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInformation (hpi); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
547 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
548 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
549 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
550 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
551 |
NS_LOG_LOGIC ("mmmUeS1apId = " << params.oldEnbUeX2apId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
552 |
NS_LOG_LOGIC ("rrcContext = " << params.rrcContext); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
553 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
554 |
m_rrc->m_x2SapProvider->SendHandoverRequest (params); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
555 |
SwitchToState (HANDOVER_PREPARATION); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
556 |
} |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
557 |
break; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
558 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
559 |
default: |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
560 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
561 |
break; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
562 |
} |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
563 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
564 |
} |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
565 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
566 |
void |
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
567 |
UeManager::RecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params) |
9406 | 568 |
{ |
569 |
NS_LOG_FUNCTION (this); |
|
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
570 |
|
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
571 |
NS_ASSERT_MSG (params.notAdmittedBearers.empty (), "not admission of some bearers upon handover is not supported"); |
9501
3c52c63f19fd
check admittedBearers upon handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9500
diff
changeset
|
572 |
NS_ASSERT_MSG (params.admittedBearers.size () == m_drbMap.size (), "not enough bearers in admittedBearers"); |
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
573 |
|
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
574 |
// note: the Handover command from the target eNB to the source eNB |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
575 |
// is expected to be sent transparently to the UE; however, here we |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
576 |
// decode the message and eventually reencode it. This way we can |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
577 |
// support both a real RRC protocol implementation and an ideal one |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
578 |
// without actual RRC protocol encoding. |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
579 |
|
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
580 |
Ptr<Packet> encodedHandoverCommand = params.rrcContext; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
581 |
LteRrcSap::RrcConnectionReconfiguration handoverCommand = m_rrc->m_rrcSapUser->DecodeHandoverCommand (encodedHandoverCommand); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
582 |
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, handoverCommand); |
9406 | 583 |
SwitchToState (HANDOVER_LEAVING); |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
584 |
m_handoverLeavingTimeout = Simulator::Schedule (m_rrc->m_handoverLeavingTimeoutDuration, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
585 |
&LteEnbRrc::HandoverLeavingTimeout, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
586 |
m_rrc, m_rnti); |
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
587 |
NS_ASSERT (handoverCommand.haveMobilityControlInfo); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
588 |
m_rrc->m_handoverStartTrace (m_imsi, m_rrc->m_cellId, m_rnti, handoverCommand.mobilityControlInfo.targetPhysCellId); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
589 |
|
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
590 |
EpcX2SapProvider::SnStatusTransferParams sst; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
591 |
sst.oldEnbUeX2apId = params.oldEnbUeX2apId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
592 |
sst.newEnbUeX2apId = params.newEnbUeX2apId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
593 |
sst.sourceCellId = params.sourceCellId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
594 |
sst.targetCellId = params.targetCellId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
595 |
for ( std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.begin (); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
596 |
drbIt != m_drbMap.end (); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
597 |
++drbIt) |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
598 |
{ |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
599 |
// SN status transfer is only for AM RLC |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
600 |
if (0 != drbIt->second->m_rlc->GetObject<LteRlcAm> ()) |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
601 |
{ |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
602 |
LtePdcp::Status status = drbIt->second->m_pdcp->GetStatus (); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
603 |
EpcX2Sap::ErabsSubjectToStatusTransferItem i; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
604 |
i.dlPdcpSn = status.txSn; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
605 |
i.ulPdcpSn = status.rxSn; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
606 |
sst.erabsSubjectToStatusTransferList.push_back (i); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
607 |
} |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
608 |
} |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
609 |
m_rrc->m_x2SapProvider->SendSnStatusTransfer (sst); |
9406 | 610 |
} |
611 |
||
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
612 |
|
9406 | 613 |
LteRrcSap::RadioResourceConfigDedicated |
614 |
UeManager::GetRadioResourceConfigForHandoverPreparationInfo () |
|
615 |
{ |
|
616 |
NS_LOG_FUNCTION (this); |
|
617 |
return BuildRadioResourceConfigDedicated (); |
|
618 |
} |
|
619 |
||
620 |
LteRrcSap::RrcConnectionReconfiguration |
|
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
621 |
UeManager::GetRrcConnectionReconfigurationForHandover () |
9406 | 622 |
{ |
623 |
NS_LOG_FUNCTION (this); |
|
624 |
return BuildRrcConnectionReconfiguration (); |
|
625 |
} |
|
626 |
||
627 |
void |
|
628 |
UeManager::SendData (uint8_t bid, Ptr<Packet> p) |
|
629 |
{ |
|
630 |
NS_LOG_FUNCTION (this << p << (uint16_t) bid); |
|
9599
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
631 |
switch (m_state) |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
632 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
633 |
case INITIAL_RANDOM_ACCESS: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
634 |
case CONNECTION_SETUP: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
635 |
NS_LOG_WARN ("not connected, discarding packet"); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
636 |
return; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
637 |
break; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
638 |
|
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
639 |
case CONNECTED_NORMALLY: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
640 |
case CONNECTION_RECONFIGURATION: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
641 |
case CONNECTION_REESTABLISHMENT: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
642 |
case HANDOVER_PREPARATION: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
643 |
case HANDOVER_JOINING: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
644 |
case HANDOVER_PATH_SWITCH: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
645 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
646 |
NS_LOG_LOGIC ("queueing data on PDCP for transmission over the air"); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
647 |
LtePdcpSapProvider::TransmitPdcpSduParameters params; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
648 |
params.pdcpSdu = p; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
649 |
params.rnti = m_rnti; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
650 |
params.lcid = Bid2Lcid (bid); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
651 |
uint8_t drbid = Bid2Drbid (bid); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
652 |
LtePdcpSapProvider* pdcpSapProvider = GetDataRadioBearerInfo (drbid)->m_pdcp->GetLtePdcpSapProvider (); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
653 |
pdcpSapProvider->TransmitPdcpSdu (params); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
654 |
} |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
655 |
break; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
656 |
|
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
657 |
case HANDOVER_LEAVING: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
658 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
659 |
NS_LOG_LOGIC ("forwarding data to target eNB over X2-U"); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
660 |
uint8_t drbid = Bid2Drbid (bid); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
661 |
EpcX2Sap::UeDataParams params; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
662 |
params.sourceCellId = m_rrc->m_cellId; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
663 |
params.targetCellId = m_targetCellId; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
664 |
params.gtpTeid = GetDataRadioBearerInfo (drbid)->m_gtpTeid; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
665 |
params.ueData = p; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
666 |
m_rrc->m_x2SapProvider->SendUeData (params); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
667 |
} |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
668 |
break; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
669 |
|
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
670 |
default: |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
671 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
672 |
break; |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
673 |
} |
9406 | 674 |
} |
675 |
||
676 |
std::vector<EpcX2Sap::ErabToBeSetupItem> |
|
677 |
UeManager::GetErabList () |
|
678 |
{ |
|
679 |
NS_LOG_FUNCTION (this); |
|
680 |
std::vector<EpcX2Sap::ErabToBeSetupItem> ret; |
|
681 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
|
682 |
it != m_drbMap.end (); |
|
683 |
++it) |
|
684 |
{ |
|
9408
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
685 |
EpcX2Sap::ErabToBeSetupItem etbsi; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
686 |
etbsi.erabId = it->second->m_epsBearerIdentity; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
687 |
etbsi.erabLevelQosParameters = it->second->m_epsBearer; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
688 |
etbsi.dlForwarding = false; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
689 |
etbsi.transportLayerAddress = it->second->m_transportLayerAddress; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
690 |
etbsi.gtpTeid = it->second->m_gtpTeid; |
80fa1de0bef2
implemented UeManager::GetErabList ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9407
diff
changeset
|
691 |
ret.push_back (etbsi); |
9406 | 692 |
} |
693 |
return ret; |
|
694 |
} |
|
695 |
||
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
696 |
void |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
697 |
UeManager::SendUeContextRelease () |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
698 |
{ |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
699 |
NS_LOG_FUNCTION (this); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
700 |
switch (m_state) |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
701 |
{ |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
702 |
case HANDOVER_PATH_SWITCH: |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
703 |
NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB"); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
704 |
EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
705 |
ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
706 |
ueCtxReleaseParams.newEnbUeX2apId = m_rnti; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
707 |
ueCtxReleaseParams.sourceCellId = m_sourceCellId; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
708 |
m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
709 |
SwitchToState (CONNECTED_NORMALLY); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
710 |
m_rrc->m_handoverEndOkTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
711 |
break; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
712 |
|
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
713 |
default: |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
714 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
715 |
break; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
716 |
} |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
717 |
} |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
718 |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
719 |
void |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
720 |
UeManager::RecvHandoverPreparationFailure (uint16_t cellId) |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
721 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
722 |
NS_LOG_FUNCTION (this << cellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
723 |
switch (m_state) |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
724 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
725 |
case HANDOVER_PREPARATION: |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
726 |
NS_ASSERT (cellId == m_targetCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
727 |
NS_LOG_INFO ("target eNB sent HO preparation failure, aborting HO"); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
728 |
SwitchToState (CONNECTED_NORMALLY); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
729 |
break; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
730 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
731 |
default: |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
732 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
733 |
break; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
734 |
} |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
735 |
} |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
736 |
|
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
737 |
void |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
738 |
UeManager::RecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
739 |
{ |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
740 |
NS_LOG_FUNCTION (this); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
741 |
for (std::vector<EpcX2Sap::ErabsSubjectToStatusTransferItem>::iterator erabIt |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
742 |
= params.erabsSubjectToStatusTransferList.begin (); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
743 |
erabIt != params.erabsSubjectToStatusTransferList.end (); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
744 |
++erabIt) |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
745 |
{ |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
746 |
// LtePdcp::Status status; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
747 |
// status.txSn = erabIt->dlPdcpSn; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
748 |
// status.rxSn = erabIt->ulPdcpSn; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
749 |
// uint8_t drbId = Bid2Drbid (erabIt->erabId); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
750 |
// std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (drbId); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
751 |
// NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (uint32_t) drbId); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
752 |
// drbIt->second->m_pdcp->SetStatus (status); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
753 |
} |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
754 |
} |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
755 |
|
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
756 |
void |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
757 |
UeManager::RecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
758 |
{ |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
759 |
NS_LOG_FUNCTION (this); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
760 |
NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << ToString (m_state)); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
761 |
m_handoverLeavingTimeout.Cancel (); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
762 |
} |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
763 |
|
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
764 |
|
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
765 |
// methods forwarded from RRC SAP |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
766 |
|
9406 | 767 |
void |
768 |
UeManager::CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters params) |
|
769 |
{ |
|
770 |
NS_LOG_FUNCTION (this); |
|
771 |
m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser); |
|
772 |
m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser); |
|
773 |
} |
|
774 |
||
775 |
void |
|
776 |
UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg) |
|
777 |
{ |
|
778 |
NS_LOG_FUNCTION (this); |
|
9407 | 779 |
switch (m_state) |
9406 | 780 |
{ |
9407 | 781 |
case INITIAL_RANDOM_ACCESS: |
782 |
{ |
|
9593
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
783 |
if (m_rrc->m_admitRrcConnectionRequest == true) |
9407 | 784 |
{ |
9593
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
785 |
m_connectionTimeout.Cancel (); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
786 |
m_imsi = msg.ueIdentity; |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
787 |
if (m_rrc->m_s1SapProvider != 0) |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
788 |
{ |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
789 |
m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
790 |
} |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
791 |
LteRrcSap::RrcConnectionSetup msg2; |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
792 |
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
793 |
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
794 |
m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
795 |
RecordDataRadioBearersToBeStarted (); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
796 |
SwitchToState (CONNECTION_SETUP); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
797 |
} |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
798 |
else |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
799 |
{ |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
800 |
m_connectionTimeout.Cancel (); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
801 |
NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
802 |
LteRrcSap::RrcConnectionReject rejectMsg; |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
803 |
rejectMsg.waitTime = 3; |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
804 |
m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg); |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
805 |
m_connectionRejectedTimeout = Simulator::Schedule (m_rrc->m_connectionRejectedTimeoutDuration, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
806 |
&LteEnbRrc::ConnectionRejectedTimeout, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
807 |
m_rrc, m_rnti); |
9593
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
808 |
SwitchToState (CONNECTION_REJECTED); |
d1da1374c434
added CONNECTION_REJECTED state at LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9568
diff
changeset
|
809 |
} |
9407 | 810 |
} |
811 |
break; |
|
812 |
||
813 |
default: |
|
814 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
815 |
break; |
|
9406 | 816 |
} |
817 |
} |
|
818 |
||
819 |
void |
|
820 |
UeManager::RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupCompleted msg) |
|
821 |
{ |
|
822 |
NS_LOG_FUNCTION (this); |
|
9407 | 823 |
switch (m_state) |
824 |
{ |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
825 |
case CONNECTION_SETUP: |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
826 |
StartDataRadioBearers (); |
9407 | 827 |
SwitchToState (CONNECTED_NORMALLY); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
828 |
m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
9407 | 829 |
break; |
830 |
||
831 |
default: |
|
832 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
833 |
break; |
|
834 |
} |
|
9406 | 835 |
} |
836 |
||
837 |
void |
|
838 |
UeManager::RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionReconfigurationCompleted msg) |
|
839 |
{ |
|
840 |
NS_LOG_FUNCTION (this); |
|
9407 | 841 |
switch (m_state) |
842 |
{ |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
843 |
case CONNECTION_RECONFIGURATION: |
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
844 |
StartDataRadioBearers (); |
9541
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
845 |
if (m_needTransmissionModeConfiguration) |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
846 |
{ |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
847 |
// configure MAC (and scheduler) |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
848 |
LteEnbCmacSapProvider::UeConfig req; |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
849 |
req.m_rnti = m_rnti; |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
850 |
req.m_transmissionMode = m_physicalConfigDedicated.antennaInfo.transmissionMode; |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
851 |
m_rrc->m_cmacSapProvider->UeUpdateConfigurationReq (req); |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
852 |
|
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
853 |
// configure PHY |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
854 |
m_rrc->m_cphySapProvider->SetTransmissionMode (req.m_rnti, req.m_transmissionMode); |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
855 |
|
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
856 |
m_needTransmissionModeConfiguration = false; |
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
857 |
} |
9407 | 858 |
SwitchToState (CONNECTED_NORMALLY); |
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
859 |
m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->m_cellId, m_rnti); |
9407 | 860 |
break; |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
861 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
862 |
case HANDOVER_LEAVING: |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
863 |
NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state " << ToString (m_state)); |
9407 | 864 |
break; |
865 |
||
866 |
case HANDOVER_JOINING: |
|
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
867 |
{ |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
868 |
m_handoverJoiningTimeout.Cancel (); |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
869 |
NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME"); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
870 |
EpcEnbS1SapProvider::PathSwitchRequestParameters params; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
871 |
params.rnti = m_rnti; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
872 |
params.cellId = m_rrc->m_cellId; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
873 |
params.mmeUeS1Id = m_imsi; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
874 |
SwitchToState (HANDOVER_PATH_SWITCH); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
875 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
876 |
it != m_drbMap.end (); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
877 |
++it) |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
878 |
{ |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
879 |
EpcEnbS1SapProvider::BearerToBeSwitched b; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
880 |
b.epsBearerId = it->second->m_epsBearerIdentity; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
881 |
b.teid = it->second->m_gtpTeid; |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
882 |
params.bearersToBeSwitched.push_back (b); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
883 |
} |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
884 |
m_rrc->m_s1SapProvider->PathSwitchRequest (params); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
885 |
} |
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
886 |
break; |
9407 | 887 |
|
888 |
default: |
|
889 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
|
890 |
break; |
|
891 |
} |
|
9406 | 892 |
} |
893 |
||
894 |
void |
|
895 |
UeManager::RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionReestablishmentRequest msg) |
|
896 |
{ |
|
897 |
NS_LOG_FUNCTION (this); |
|
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
898 |
switch (m_state) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
899 |
{ |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
900 |
case CONNECTED_NORMALLY: |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
901 |
break; |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
902 |
|
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
903 |
case HANDOVER_LEAVING: |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
904 |
m_handoverLeavingTimeout.Cancel (); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
905 |
break; |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
906 |
|
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
907 |
default: |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
908 |
NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state)); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
909 |
break; |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
910 |
} |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
911 |
|
9406 | 912 |
LteRrcSap::RrcConnectionReestablishment msg2; |
913 |
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
|
914 |
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
|
915 |
m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2); |
|
916 |
SwitchToState (CONNECTION_REESTABLISHMENT); |
|
917 |
} |
|
918 |
||
919 |
void |
|
920 |
UeManager::RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionReestablishmentComplete msg) |
|
921 |
{ |
|
922 |
NS_LOG_FUNCTION (this); |
|
923 |
SwitchToState (CONNECTED_NORMALLY); |
|
924 |
} |
|
925 |
||
9601
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
926 |
void |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
927 |
UeManager::RecvMeasurementReport (LteRrcSap::MeasurementReport msg) |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
928 |
{ |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
929 |
NS_LOG_FUNCTION (this); |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
930 |
NS_LOG_LOGIC ("measId " << (uint16_t) msg.measResults.measId |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
931 |
<< " haveMeasResultNeighCells " << msg.measResults.haveMeasResultNeighCells |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
932 |
<< " measResultListEutra " << msg.measResults.measResultListEutra.size ()); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
933 |
NS_LOG_LOGIC ("serving cellId " << m_rrc->m_cellId |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
934 |
<< " RSRP " << (uint16_t) msg.measResults.rsrpResult |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
935 |
<< " RSRQ " << (uint16_t) msg.measResults.rsrqResult); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
936 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
937 |
for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.measResultListEutra.begin (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
938 |
it != msg.measResults.measResultListEutra.end (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
939 |
++it) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
940 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
941 |
NS_LOG_LOGIC ("neighbour cellId " << it->physCellId |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
942 |
<< " RSRP " << (it->haveRsrpResult ? (uint16_t) it->rsrpResult : 255) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
943 |
<< " RSRQ " << (it->haveRsrqResult ? (uint16_t) it->rsrqResult : 255)); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
944 |
} |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
945 |
|
10011
6853962462ca
Add trace callback when MeasurementReport is received
Manuel Requena <manuel.requena@cttc.es>
parents:
10008
diff
changeset
|
946 |
m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->m_cellId, m_rnti, msg); |
6853962462ca
Add trace callback when MeasurementReport is received
Manuel Requena <manuel.requena@cttc.es>
parents:
10008
diff
changeset
|
947 |
|
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
948 |
// Just these two measId are supported |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
949 |
NS_ASSERT_MSG ((msg.measResults.measId == 1) || (msg.measResults.measId == 2), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
950 |
"Measure identity is unknown"); |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
951 |
|
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
952 |
/// Event A2 (Serving becomes worse than threshold) |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
953 |
if (msg.measResults.measId == 1) |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
954 |
{ |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
955 |
// Keep new RSRQ value reported for the serving cell |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
956 |
m_servingCellMeasures->m_rsrq = msg.measResults.rsrqResult; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
957 |
m_servingCellMeasures->m_rsrp = msg.measResults.rsrpResult; |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
958 |
|
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
959 |
// Serving cell is worse than a handover threshold. |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
960 |
// This handover threshold is independent from the event A2 threshold |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
961 |
if (m_servingCellMeasures->m_rsrq <= m_rrc->m_servingCellHandoverThreshold) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
962 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
963 |
// Find the best neighbour cell (eNB) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
964 |
Ptr<UeMeasure> bestNeighbour = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
965 |
uint8_t bestNeighbourRsrq = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
966 |
NS_LOG_LOGIC ("Number of neighbour cells = " << m_neighbourCellMeasures.size ()); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
967 |
for (std::map <uint16_t, Ptr<UeMeasure> >::iterator it = m_neighbourCellMeasures.begin (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
968 |
it != m_neighbourCellMeasures.end (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
969 |
++it) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
970 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
971 |
if (it->second->m_rsrq > bestNeighbourRsrq) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
972 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
973 |
bestNeighbour = it->second; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
974 |
bestNeighbourRsrq = it->second->m_rsrq; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
975 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
976 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
977 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
978 |
// Trigger Handover, if needed |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
979 |
if (bestNeighbour) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
980 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
981 |
uint16_t targetCellId = bestNeighbour->m_cellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
982 |
NS_LOG_LOGIC ("Best neighbour cellId " << targetCellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
983 |
if (bestNeighbour->m_rsrq - m_servingCellMeasures->m_rsrq >= m_rrc->m_neighbourCellHandoverOffset) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
984 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
985 |
NS_LOG_LOGIC ("Trigger Handover to cellId " << targetCellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
986 |
NS_LOG_LOGIC ("target cell RSRQ " << (uint16_t) bestNeighbour->m_rsrq); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
987 |
NS_LOG_LOGIC ("serving cell RSRQ " << (uint16_t) m_servingCellMeasures->m_rsrq); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
988 |
PrepareHandover (targetCellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
989 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
990 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
991 |
} |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
992 |
} |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
993 |
/// Event A4 (Neighbour becomes better than threshold) |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
994 |
else if (msg.measResults.measId == 2) |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
995 |
{ |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
996 |
// Update the NRT |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
997 |
if (msg.measResults.haveMeasResultNeighCells && ! (msg.measResults.measResultListEutra.empty ())) |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
998 |
{ |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
999 |
for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.measResultListEutra.begin (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1000 |
it != msg.measResults.measResultListEutra.end (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1001 |
++it) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1002 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1003 |
// Keep new RSRQ value reported for the neighbour cell |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1004 |
NS_ASSERT_MSG (it->haveRsrqResult == true, "RSRQ measure missing for cellId " << it->physCellId); |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1005 |
|
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1006 |
// Update Neighbour Relation Table |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1007 |
if (m_rrc->m_neighbourRelationTable.find (it->physCellId) != m_rrc->m_neighbourRelationTable.end ()) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1008 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1009 |
// Update neighbour info |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1010 |
Ptr<NeighbourRelation> neighbourRelation = m_rrc->m_neighbourRelationTable[it->physCellId]; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1011 |
NS_ASSERT_MSG (neighbourRelation->m_physCellId == it->physCellId, |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1012 |
"Wrong cellId " << neighbourRelation->m_physCellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1013 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1014 |
if (neighbourRelation->m_noX2 == false) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1015 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1016 |
neighbourRelation->m_noHo = false; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1017 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1018 |
neighbourRelation->m_detectedAsNeighbour = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1019 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1020 |
else // new neighbour |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1021 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1022 |
Ptr<NeighbourRelation> neighbourRelation = CreateObject <NeighbourRelation> (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1023 |
neighbourRelation->m_physCellId = it->physCellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1024 |
neighbourRelation->m_noRemove = false; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1025 |
neighbourRelation->m_noHo = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1026 |
neighbourRelation->m_noX2 = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1027 |
neighbourRelation->m_detectedAsNeighbour = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1028 |
m_rrc->m_neighbourRelationTable[it->physCellId] = neighbourRelation; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1029 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1030 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1031 |
// Update measure info of the neighbour cell |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1032 |
Ptr<UeMeasure> neighbourCellMeasures; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1033 |
if (m_neighbourCellMeasures.find (it->physCellId) != m_neighbourCellMeasures.end ()) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1034 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1035 |
neighbourCellMeasures = m_neighbourCellMeasures[it->physCellId]; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1036 |
neighbourCellMeasures->m_cellId = it->physCellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1037 |
neighbourCellMeasures->m_rsrq = it->rsrqResult; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1038 |
neighbourCellMeasures->m_rsrp = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1039 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1040 |
else |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1041 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1042 |
neighbourCellMeasures = CreateObject <UeMeasure> (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1043 |
neighbourCellMeasures->m_cellId = it->physCellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1044 |
neighbourCellMeasures->m_rsrq = it->rsrqResult; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1045 |
neighbourCellMeasures->m_rsrp = 0; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1046 |
m_neighbourCellMeasures[it->physCellId] = neighbourCellMeasures; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1047 |
} |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1048 |
} |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1049 |
} |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1050 |
else |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1051 |
{ |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1052 |
NS_LOG_LOGIC ("WARNING"); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1053 |
// NS_ASSERT_MSG ("Event A4 received without measure results for neighbour cells"); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1054 |
// TODO Remove neighbours in the neighbourCellMeasures table |
10008
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1055 |
} |
e964b76bc631
Add some code in the reception of the MeasurementReport message
Manuel Requena <manuel.requena@cttc.es>
parents:
10006
diff
changeset
|
1056 |
} |
9601
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1057 |
} |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1058 |
|
9406 | 1059 |
|
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1060 |
// methods forwarded from CMAC SAP |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1061 |
|
9406 | 1062 |
void |
1063 |
UeManager::CmacUeConfigUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
|
1064 |
{ |
|
1065 |
NS_LOG_FUNCTION (this << m_rnti); |
|
1066 |
// at this stage used only by the scheduler for updating txMode |
|
1067 |
||
1068 |
m_physicalConfigDedicated.antennaInfo.transmissionMode = cmacParams.m_transmissionMode; |
|
1069 |
||
9541
7811eb81a32c
postpone eNB TX mode reconf to rx of RRC CONN RECONF COMPLETED
Nicola Baldo <nbaldo@cttc.es>
parents:
9528
diff
changeset
|
1070 |
m_needTransmissionModeConfiguration = true; |
9406 | 1071 |
|
1072 |
// reconfigure the UE RRC |
|
1073 |
ScheduleRrcConnectionReconfiguration (); |
|
1074 |
} |
|
1075 |
||
1076 |
||
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1077 |
// methods forwarded from PDCP SAP |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1078 |
|
9406 | 1079 |
void |
1080 |
UeManager::DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params) |
|
1081 |
{ |
|
1082 |
NS_LOG_FUNCTION (this); |
|
1083 |
if (params.lcid > 2) |
|
1084 |
{ |
|
1085 |
// data radio bearer |
|
1086 |
EpsBearerTag tag; |
|
1087 |
tag.SetRnti (params.rnti); |
|
1088 |
tag.SetBid (Lcid2Bid (params.lcid)); |
|
1089 |
params.pdcpSdu->AddPacketTag (tag); |
|
1090 |
m_rrc->m_forwardUpCallback (params.pdcpSdu); |
|
1091 |
} |
|
1092 |
} |
|
1093 |
||
1094 |
||
1095 |
uint16_t |
|
1096 |
UeManager::GetRnti (void) |
|
1097 |
{ |
|
1098 |
return m_rnti; |
|
1099 |
} |
|
1100 |
||
8007 | 1101 |
uint64_t |
9406 | 1102 |
UeManager::GetImsi (void) |
8007 | 1103 |
{ |
1104 |
return m_imsi; |
|
1105 |
} |
|
1106 |
||
9036 | 1107 |
uint16_t |
9406 | 1108 |
UeManager::GetSrsConfigurationIndex (void) |
9036 | 1109 |
{ |
9406 | 1110 |
return m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex; |
9036 | 1111 |
} |
1112 |
||
1113 |
void |
|
9406 | 1114 |
UeManager::SetSrsConfigurationIndex (uint16_t srsConfIndex) |
9036 | 1115 |
{ |
9406 | 1116 |
NS_LOG_FUNCTION (this); |
1117 |
m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = srsConfIndex; |
|
1118 |
m_rrc->m_cphySapProvider->SetSrsConfigurationIndex (m_rnti, srsConfIndex); |
|
1119 |
switch (m_state) |
|
1120 |
{ |
|
1121 |
case INITIAL_RANDOM_ACCESS: |
|
1122 |
// do nothing, srs conf index will be correctly enforced upon |
|
1123 |
// RRC connection establishment |
|
1124 |
break; |
|
1125 |
||
1126 |
default: |
|
1127 |
ScheduleRrcConnectionReconfiguration (); |
|
1128 |
break; |
|
1129 |
} |
|
1130 |
} |
|
1131 |
||
1132 |
UeManager::State |
|
1133 |
UeManager::GetState (void) |
|
1134 |
{ |
|
1135 |
return m_state; |
|
9036 | 1136 |
} |
1137 |
||
7886 | 1138 |
uint8_t |
9406 | 1139 |
UeManager::AddDataRadioBearerInfo (Ptr<LteDataRadioBearerInfo> drbInfo) |
7886 | 1140 |
{ |
1141 |
NS_LOG_FUNCTION (this); |
|
9406 | 1142 |
const uint8_t MAX_DRB_ID = 32; |
1143 |
for (uint8_t drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID; |
|
1144 |
drbid != m_lastAllocatedDrbid; |
|
1145 |
drbid = (drbid + 1) % MAX_DRB_ID) |
|
7886 | 1146 |
{ |
9406 | 1147 |
if (drbid != 0) // 0 is not allowed |
7886 | 1148 |
{ |
9406 | 1149 |
if (m_drbMap.find (drbid) == m_drbMap.end ()) |
7886 | 1150 |
{ |
9406 | 1151 |
m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (drbid, drbInfo)); |
1152 |
drbInfo->m_drbIdentity = drbid; |
|
1153 |
m_lastAllocatedDrbid = drbid; |
|
1154 |
return drbid; |
|
7886 | 1155 |
} |
1156 |
} |
|
1157 |
} |
|
9406 | 1158 |
NS_FATAL_ERROR ("no more data radio bearer ids available"); |
7886 | 1159 |
return 0; |
1160 |
} |
|
1161 |
||
9406 | 1162 |
Ptr<LteDataRadioBearerInfo> |
1163 |
UeManager::GetDataRadioBearerInfo (uint8_t drbid) |
|
7886 | 1164 |
{ |
9406 | 1165 |
NS_LOG_FUNCTION (this << (uint32_t) drbid); |
1166 |
NS_ASSERT (0 != drbid); |
|
1167 |
std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
1168 |
NS_ABORT_IF (it == m_drbMap.end ()); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
1169 |
return it->second; |
7886 | 1170 |
} |
1171 |
||
1172 |
||
1173 |
void |
|
9406 | 1174 |
UeManager::RemoveDataRadioBearerInfo (uint8_t drbid) |
1175 |
{ |
|
1176 |
NS_LOG_FUNCTION (this << (uint32_t) drbid); |
|
1177 |
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid); |
|
1178 |
NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid); |
|
1179 |
m_drbMap.erase (it); |
|
1180 |
} |
|
1181 |
||
1182 |
||
1183 |
LteRrcSap::RrcConnectionReconfiguration |
|
1184 |
UeManager::BuildRrcConnectionReconfiguration () |
|
1185 |
{ |
|
1186 |
LteRrcSap::RrcConnectionReconfiguration msg; |
|
1187 |
msg.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier (); |
|
1188 |
msg.haveRadioResourceConfigDedicated = true; |
|
1189 |
msg.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated (); |
|
1190 |
msg.haveMobilityControlInfo = false; |
|
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1191 |
msg.haveMeasConfig = true; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1192 |
msg.measConfig = BuildMeasConfig (); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1193 |
|
9406 | 1194 |
return msg; |
1195 |
} |
|
1196 |
||
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1197 |
LteRrcSap::MeasConfig |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1198 |
UeManager::BuildMeasConfig () |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1199 |
{ |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1200 |
// Just intra-frequency measurements are supported, |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1201 |
// so just one measurement object is created |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1202 |
LteRrcSap::MeasObjectToAddMod measObject; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1203 |
measObject.measObjectId = 1; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1204 |
measObject.measObjectEutra.carrierFreq = m_rrc->m_dlEarfcn; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1205 |
measObject.measObjectEutra.allowedMeasBandwidth = m_rrc->m_dlBandwidth; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1206 |
measObject.measObjectEutra.presenceAntennaPort1 = false; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1207 |
measObject.measObjectEutra.neighCellConfig = 0; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1208 |
measObject.measObjectEutra.offsetFreq = 0; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1209 |
measObject.measObjectEutra.haveCellForWhichToReportCGI = false; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1210 |
|
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1211 |
// Just event A2 and event A4 are supported |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1212 |
LteRrcSap::ReportConfigToAddMod reportConfigA2; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1213 |
reportConfigA2.reportConfigId = 1; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1214 |
reportConfigA2.reportConfigEutra.triggerType = LteRrcSap::ReportConfigEutra::EVENT; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1215 |
reportConfigA2.reportConfigEutra.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1216 |
reportConfigA2.reportConfigEutra.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1217 |
reportConfigA2.reportConfigEutra.threshold1.range = m_rrc->m_eventA2Threshold; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1218 |
reportConfigA2.reportConfigEutra.hysteresis = 0; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1219 |
reportConfigA2.reportConfigEutra.timeToTrigger = 0; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1220 |
reportConfigA2.reportConfigEutra.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1221 |
reportConfigA2.reportConfigEutra.reportQuantity = LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1222 |
reportConfigA2.reportConfigEutra.maxReportCells = LteRrcSap::MaxReportCells; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1223 |
reportConfigA2.reportConfigEutra.reportInterval = LteRrcSap::ReportConfigEutra::MS480; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1224 |
reportConfigA2.reportConfigEutra.reportAmount = 255; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1225 |
|
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1226 |
LteRrcSap::ReportConfigToAddMod reportConfigA4; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1227 |
reportConfigA4.reportConfigId = 2; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1228 |
reportConfigA4.reportConfigEutra.triggerType = LteRrcSap::ReportConfigEutra::EVENT; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1229 |
reportConfigA4.reportConfigEutra.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1230 |
reportConfigA4.reportConfigEutra.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1231 |
reportConfigA4.reportConfigEutra.threshold1.range = m_rrc->m_eventA4Threshold; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1232 |
reportConfigA4.reportConfigEutra.hysteresis = 0; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1233 |
reportConfigA4.reportConfigEutra.timeToTrigger = 0; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1234 |
reportConfigA4.reportConfigEutra.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ; |
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1235 |
reportConfigA4.reportConfigEutra.reportQuantity = LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1236 |
reportConfigA4.reportConfigEutra.maxReportCells = LteRrcSap::MaxReportCells; |
10028
f988b82ef6ec
Capitalize constants in enums, according to ns3 coding style.
Lluís Parcerisa <parcerisa@gmail.com>
parents:
10022
diff
changeset
|
1237 |
reportConfigA4.reportConfigEutra.reportInterval = LteRrcSap::ReportConfigEutra::MS480; |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1238 |
reportConfigA4.reportConfigEutra.reportAmount = 255; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1239 |
|
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1240 |
LteRrcSap::MeasIdToAddMod measId[2]; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1241 |
measId[0].measId = 1; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1242 |
measId[0].measObjectId = 1; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1243 |
measId[0].reportConfigId = 1; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1244 |
measId[1].measId = 2; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1245 |
measId[1].measObjectId = 1; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1246 |
measId[1].reportConfigId = 2; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1247 |
|
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1248 |
LteRrcSap::MeasConfig measConfig; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1249 |
measConfig.measObjectToAddModList.push_back (measObject); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1250 |
measConfig.reportConfigToAddModList.push_back (reportConfigA2); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1251 |
measConfig.reportConfigToAddModList.push_back (reportConfigA4); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1252 |
measConfig.measIdToAddModList.push_back (measId[0]); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1253 |
measConfig.measIdToAddModList.push_back (measId[1]); |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1254 |
measConfig.haveQuantityConfig = true; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1255 |
measConfig.quantityConfig.filterCoefficientRSRP = 4; // default = fc4 (See TS 36.331) |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1256 |
measConfig.quantityConfig.filterCoefficientRSRQ = 4; // default = fc4 (See TS 36.331) |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1257 |
measConfig.haveMeasGapConfig = false; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1258 |
measConfig.haveSmeasure = false; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1259 |
measConfig.haveSpeedStatePars = false; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1260 |
|
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1261 |
return measConfig; |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1262 |
} |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1263 |
|
9406 | 1264 |
LteRrcSap::RadioResourceConfigDedicated |
1265 |
UeManager::BuildRadioResourceConfigDedicated () |
|
1266 |
{ |
|
1267 |
LteRrcSap::RadioResourceConfigDedicated rrcd; |
|
1268 |
||
1269 |
if (m_srb1 != 0) |
|
1270 |
{ |
|
1271 |
LteRrcSap::SrbToAddMod stam; |
|
1272 |
stam.srbIdentity = m_srb1->m_srbIdentity; |
|
1273 |
stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig; |
|
1274 |
rrcd.srbToAddModList.push_back (stam); |
|
1275 |
} |
|
1276 |
||
1277 |
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin (); |
|
1278 |
it != m_drbMap.end (); |
|
1279 |
++it) |
|
1280 |
{ |
|
1281 |
LteRrcSap::DrbToAddMod dtam; |
|
1282 |
dtam.epsBearerIdentity = it->second->m_epsBearerIdentity; |
|
1283 |
dtam.drbIdentity = it->second->m_drbIdentity; |
|
1284 |
dtam.rlcConfig = it->second->m_rlcConfig; |
|
1285 |
dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity; |
|
1286 |
dtam.logicalChannelConfig = it->second->m_logicalChannelConfig; |
|
1287 |
rrcd.drbToAddModList.push_back (dtam); |
|
1288 |
} |
|
1289 |
||
1290 |
rrcd.havePhysicalConfigDedicated = true; |
|
1291 |
rrcd.physicalConfigDedicated = m_physicalConfigDedicated; |
|
1292 |
return rrcd; |
|
1293 |
} |
|
1294 |
||
1295 |
uint8_t |
|
1296 |
UeManager::GetNewRrcTransactionIdentifier () |
|
1297 |
{ |
|
1298 |
return ++m_lastRrcTransactionIdentifier; |
|
1299 |
} |
|
1300 |
||
1301 |
uint8_t |
|
1302 |
UeManager::Lcid2Drbid (uint8_t lcid) |
|
1303 |
{ |
|
1304 |
NS_ASSERT (lcid > 2); |
|
1305 |
return lcid - 2; |
|
1306 |
} |
|
1307 |
||
1308 |
uint8_t |
|
1309 |
UeManager::Drbid2Lcid (uint8_t drbid) |
|
7886 | 1310 |
{ |
9406 | 1311 |
return drbid + 2; |
1312 |
} |
|
1313 |
uint8_t |
|
1314 |
UeManager::Lcid2Bid (uint8_t lcid) |
|
1315 |
{ |
|
1316 |
NS_ASSERT (lcid > 2); |
|
1317 |
return lcid - 2; |
|
1318 |
} |
|
1319 |
||
1320 |
uint8_t |
|
1321 |
UeManager::Bid2Lcid (uint8_t bid) |
|
1322 |
{ |
|
1323 |
return bid + 2; |
|
1324 |
} |
|
1325 |
||
1326 |
uint8_t |
|
1327 |
UeManager::Drbid2Bid (uint8_t drbid) |
|
1328 |
{ |
|
1329 |
return drbid; |
|
1330 |
} |
|
1331 |
||
1332 |
uint8_t |
|
1333 |
UeManager::Bid2Drbid (uint8_t bid) |
|
1334 |
{ |
|
1335 |
return bid; |
|
7886 | 1336 |
} |
9406 | 1337 |
|
1338 |
||
1339 |
void |
|
1340 |
UeManager::SwitchToState (State newState) |
|
1341 |
{ |
|
1342 |
NS_LOG_FUNCTION (this << newState); |
|
1343 |
State oldState = m_state; |
|
1344 |
m_state = newState; |
|
1345 |
NS_LOG_INFO ("IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager " << ToString (oldState) << " --> " << ToString (newState)); |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1346 |
m_stateTransitionTrace (m_imsi, m_rrc->m_cellId, m_rnti, oldState, newState); |
9406 | 1347 |
|
1348 |
switch (newState) |
|
1349 |
{ |
|
1350 |
case INITIAL_RANDOM_ACCESS: |
|
1351 |
case HANDOVER_JOINING: |
|
1352 |
NS_FATAL_ERROR ("cannot switch to an initial state"); |
|
1353 |
break; |
|
1354 |
||
1355 |
case CONNECTION_SETUP: |
|
1356 |
break; |
|
1357 |
||
1358 |
case CONNECTED_NORMALLY: |
|
1359 |
{ |
|
1360 |
if (m_pendingRrcConnectionReconfiguration == true) |
|
1361 |
{ |
|
1362 |
ScheduleRrcConnectionReconfiguration (); |
|
1363 |
} |
|
1364 |
} |
|
1365 |
break; |
|
1366 |
||
1367 |
case CONNECTION_RECONFIGURATION: |
|
1368 |
break; |
|
1369 |
||
1370 |
case CONNECTION_REESTABLISHMENT: |
|
1371 |
break; |
|
1372 |
||
1373 |
case HANDOVER_LEAVING: |
|
1374 |
break; |
|
1375 |
||
1376 |
default: |
|
1377 |
break; |
|
1378 |
} |
|
1379 |
} |
|
1380 |
||
1381 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1382 |
|
7886 | 1383 |
// /////////////////////////// |
1384 |
// eNB RRC methods |
|
1385 |
// /////////////////////////// |
|
1386 |
||
7905
80557b09aa7f
Added missing NS_OBJECT_ENSURE_REGISTERED to all ns3::Objects created.
jnin
parents:
7903
diff
changeset
|
1387 |
NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc); |
7886 | 1388 |
|
1389 |
LteEnbRrc::LteEnbRrc () |
|
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1390 |
: m_x2SapProvider (0), |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1391 |
m_cmacSapProvider (0), |
9406 | 1392 |
m_rrcSapUser (0), |
7886 | 1393 |
m_macSapProvider (0), |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1394 |
m_s1SapProvider (0), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1395 |
m_cphySapProvider (0), |
7886 | 1396 |
m_configured (false), |
9036 | 1397 |
m_lastAllocatedRnti (0), |
1398 |
m_srsCurrentPeriodicityId (0), |
|
1399 |
m_lastAllocatedConfigurationIndex (0), |
|
1400 |
m_reconfigureUes (false) |
|
7886 | 1401 |
{ |
1402 |
NS_LOG_FUNCTION (this); |
|
7888 | 1403 |
m_cmacSapUser = new EnbRrcMemberLteEnbCmacSapUser (this); |
9406 | 1404 |
m_rrcSapProvider = new MemberLteEnbRrcSapProvider<LteEnbRrc> (this); |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1405 |
m_x2SapUser = new EpcX2SpecificEpcX2SapUser<LteEnbRrc> (this); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1406 |
m_s1SapUser = new MemberEpcEnbS1SapUser<LteEnbRrc> (this); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1407 |
m_cphySapUser = new MemberLteEnbCphySapUser<LteEnbRrc> (this); |
9406 | 1408 |
|
1409 |
||
7886 | 1410 |
} |
1411 |
||
1412 |
||
1413 |
LteEnbRrc::~LteEnbRrc () |
|
1414 |
{ |
|
1415 |
NS_LOG_FUNCTION (this); |
|
1416 |
} |
|
1417 |
||
1418 |
||
1419 |
void |
|
1420 |
LteEnbRrc::DoDispose () |
|
1421 |
{ |
|
1422 |
NS_LOG_FUNCTION (this); |
|
9623
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
1423 |
m_ueMap.clear (); |
7886 | 1424 |
delete m_cmacSapUser; |
9406 | 1425 |
delete m_rrcSapProvider; |
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1426 |
delete m_x2SapUser; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1427 |
delete m_s1SapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1428 |
delete m_cphySapUser; |
7886 | 1429 |
} |
1430 |
||
1431 |
TypeId |
|
1432 |
LteEnbRrc::GetTypeId (void) |
|
1433 |
{ |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
1434 |
NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId"); |
7886 | 1435 |
static TypeId tid = TypeId ("ns3::LteEnbRrc") |
1436 |
.SetParent<Object> () |
|
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
1437 |
.AddConstructor<LteEnbRrc> () |
9406 | 1438 |
.AddAttribute ("UeMap", "List of UeManager by C-RNTI.", |
7901
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
1439 |
ObjectMapValue (), |
2451f71f1ce4
Added attributes to enable access to RLC instances in Enb
jnin
parents:
7888
diff
changeset
|
1440 |
MakeObjectMapAccessor (&LteEnbRrc::m_ueMap), |
9406 | 1441 |
MakeObjectMapChecker<UeManager> ()) |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
1442 |
.AddAttribute ("DefaultTransmissionMode", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
1443 |
"The default UEs' transmission mode (0: SISO)", |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
1444 |
UintegerValue (0), // default tx-mode |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
1445 |
MakeUintegerAccessor (&LteEnbRrc::m_defaultTransmissionMode), |
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
1446 |
MakeUintegerChecker<uint8_t> ()) |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1447 |
.AddAttribute ("EpsBearerToRlcMapping", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1448 |
"Specify which type of RLC will be used for each type of EPS bearer. ", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1449 |
EnumValue (RLC_SM_ALWAYS), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1450 |
MakeEnumAccessor (&LteEnbRrc::m_epsBearerToRlcMapping), |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1451 |
MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1452 |
RLC_UM_ALWAYS, "RlcUmAlways", |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1453 |
RLC_AM_ALWAYS, "RlcAmAlways", |
9406 | 1454 |
PER_BASED, "PacketErrorRateBased")) |
1455 |
.AddAttribute ("SystemInformationPeriodicity", |
|
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1456 |
"The interval for sending system information (Time value)", |
9406 | 1457 |
TimeValue (MilliSeconds (80)), |
1458 |
MakeTimeAccessor (&LteEnbRrc::m_systemInformationPeriodicity), |
|
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1459 |
MakeTimeChecker ()) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1460 |
.AddAttribute ("SrsPeriodicity", |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1461 |
"The SRS periodicity in milliseconds", |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1462 |
UintegerValue (40), |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1463 |
MakeUintegerAccessor (&LteEnbRrc::SetSrsPeriodicity, |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
1464 |
&LteEnbRrc::GetSrsPeriodicity), |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1465 |
MakeUintegerChecker<uint32_t> ()) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1466 |
.AddAttribute ("ConnectionTimeoutDuration", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1467 |
"After a RA attempt, if no RRC Connection Request is received before this time, the UE context is destroyed. Must account for reception of RAR and transmission of RRC CONNECTION REQUEST over UL GRANT.", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1468 |
TimeValue (MilliSeconds (15)), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1469 |
MakeTimeAccessor (&LteEnbRrc::m_connectionTimeoutDuration), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1470 |
MakeTimeChecker ()) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1471 |
.AddAttribute ("ConnectionRejectedTimeoutDuration", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1472 |
"Time to wait between sending a RRC CONNECTION REJECT and destroying the UE context", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1473 |
TimeValue (MilliSeconds (30)), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1474 |
MakeTimeAccessor (&LteEnbRrc::m_connectionRejectedTimeoutDuration), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1475 |
MakeTimeChecker ()) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1476 |
.AddAttribute ("HandoverJoiningTimeoutDuration", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1477 |
"After accepting a handover request, if no RRC Connection Reconfiguration Completed is received before this time, the UE context is destroyed. Must account for reception of X2 HO REQ ACK by source eNB, transmission of the Handover Command, non-contention-based random access and reception of the RRC Connection Reconfiguration Completed message.", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1478 |
TimeValue (MilliSeconds (200)), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1479 |
MakeTimeAccessor (&LteEnbRrc::m_handoverJoiningTimeoutDuration), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1480 |
MakeTimeChecker ()) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1481 |
.AddAttribute ("HandoverLeavingTimeoutDuration", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1482 |
"After issuing a Handover Command, if neither RRC Connection Reestablishment nor X2 UE Context Release has been previously received, the UE context is destroyed.", |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1483 |
TimeValue (MilliSeconds (500)), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1484 |
MakeTimeAccessor (&LteEnbRrc::m_handoverLeavingTimeoutDuration), |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1485 |
MakeTimeChecker ()) |
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1486 |
.AddAttribute ("AdmitHandoverRequest", |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1487 |
"Whether to admit an X2 handover request from another eNB", |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1488 |
BooleanValue (true), |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1489 |
MakeBooleanAccessor (&LteEnbRrc::m_admitHandoverRequest), |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1490 |
MakeBooleanChecker ()) |
9528
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1491 |
.AddAttribute ("AdmitRrcConnectionRequest", |
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1492 |
"Whether to admit a connection request from a Ue", |
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1493 |
BooleanValue (true), |
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1494 |
MakeBooleanAccessor (&LteEnbRrc::m_admitRrcConnectionRequest), |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1495 |
MakeBooleanChecker ()) |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1496 |
.AddAttribute ("EventA2Threshold", |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1497 |
"Threshold of the event A2 (Serving becomes worse than threshold)", |
10006
d4dffaadf383
Events A2 and A4 trigger with all RSRQ values
Manuel Requena <manuel.requena@cttc.es>
parents:
9998
diff
changeset
|
1498 |
UintegerValue (34), |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1499 |
MakeUintegerAccessor (&LteEnbRrc::m_eventA2Threshold), |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1500 |
MakeUintegerChecker<uint8_t> ()) |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1501 |
.AddAttribute ("EventA4Threshold", |
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1502 |
"Threshold of the event A4 (Neighbour becomes better than threshold)", |
10006
d4dffaadf383
Events A2 and A4 trigger with all RSRQ values
Manuel Requena <manuel.requena@cttc.es>
parents:
9998
diff
changeset
|
1503 |
UintegerValue (0), |
9991
3d1c37a99e73
Add MeasConfig IE in the RRC Connection Reconfiguration message
Manuel Requena <manuel.requena@cttc.es>
parents:
9668
diff
changeset
|
1504 |
MakeUintegerAccessor (&LteEnbRrc::m_eventA4Threshold), |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1505 |
MakeUintegerChecker<uint8_t> ()) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1506 |
.AddAttribute ("ServingCellHandoverThreshold", |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1507 |
"If serving cell is worse than this threshold, neighbour cells are consider for Handover", |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1508 |
UintegerValue (15), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1509 |
MakeUintegerAccessor (&LteEnbRrc::m_servingCellHandoverThreshold), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1510 |
MakeUintegerChecker<uint8_t> ()) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1511 |
.AddAttribute ("NeighbourCellHandoverOffset", |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1512 |
"Minimum offset between serving and best neighbour cell to trigger the Handover", |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1513 |
UintegerValue (1), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1514 |
MakeUintegerAccessor (&LteEnbRrc::m_neighbourCellHandoverOffset), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
1515 |
MakeUintegerChecker<uint8_t> ()) |
9615 | 1516 |
.AddTraceSource ("NewUeContext", |
1517 |
"trace fired upon creation of a new UE context", |
|
1518 |
MakeTraceSourceAccessor (&LteEnbRrc::m_newUeContextTrace)) |
|
9452
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1519 |
.AddTraceSource ("ConnectionEstablished", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1520 |
"trace fired upon successful RRC connection establishment", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1521 |
MakeTraceSourceAccessor (&LteEnbRrc::m_connectionEstablishedTrace)) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1522 |
.AddTraceSource ("ConnectionReconfiguration", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1523 |
"trace fired upon RRC connection reconfiguration", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1524 |
MakeTraceSourceAccessor (&LteEnbRrc::m_connectionReconfigurationTrace)) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1525 |
.AddTraceSource ("HandoverStart", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1526 |
"trace fired upon start of a handover procedure", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1527 |
MakeTraceSourceAccessor (&LteEnbRrc::m_handoverStartTrace)) |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1528 |
.AddTraceSource ("HandoverEndOk", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1529 |
"trace fired upon successful termination of a handover procedure", |
9fa1012bd84b
dynamic connection of RadioBearerStatsCalculator so it works properly with handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9447
diff
changeset
|
1530 |
MakeTraceSourceAccessor (&LteEnbRrc::m_handoverEndOkTrace)) |
10011
6853962462ca
Add trace callback when MeasurementReport is received
Manuel Requena <manuel.requena@cttc.es>
parents:
10008
diff
changeset
|
1531 |
.AddTraceSource ("RecvMeasurementReport", |
6853962462ca
Add trace callback when MeasurementReport is received
Manuel Requena <manuel.requena@cttc.es>
parents:
10008
diff
changeset
|
1532 |
"trace fired when measurement report is received", |
6853962462ca
Add trace callback when MeasurementReport is received
Manuel Requena <manuel.requena@cttc.es>
parents:
10008
diff
changeset
|
1533 |
MakeTraceSourceAccessor (&LteEnbRrc::m_recvMeasurementReportTrace)) |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8032
diff
changeset
|
1534 |
; |
7886 | 1535 |
return tid; |
1536 |
} |
|
1537 |
||
1538 |
void |
|
9323
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1539 |
LteEnbRrc::SetEpcX2SapProvider (EpcX2SapProvider * s) |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1540 |
{ |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1541 |
NS_LOG_FUNCTION (this << s); |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1542 |
m_x2SapProvider = s; |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1543 |
} |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1544 |
|
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1545 |
EpcX2SapUser* |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1546 |
LteEnbRrc::GetEpcX2SapUser () |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1547 |
{ |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1548 |
NS_LOG_FUNCTION (this); |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1549 |
return m_x2SapUser; |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1550 |
} |
c4c734a16f4f
Add support for X2 SAP
Manuel Requena <manuel.requena@cttc.es>
parents:
8717
diff
changeset
|
1551 |
|
7886 | 1552 |
void |
1553 |
LteEnbRrc::SetLteEnbCmacSapProvider (LteEnbCmacSapProvider * s) |
|
1554 |
{ |
|
1555 |
NS_LOG_FUNCTION (this << s); |
|
1556 |
m_cmacSapProvider = s; |
|
1557 |
} |
|
1558 |
||
1559 |
LteEnbCmacSapUser* |
|
1560 |
LteEnbRrc::GetLteEnbCmacSapUser () |
|
1561 |
{ |
|
1562 |
NS_LOG_FUNCTION (this); |
|
1563 |
return m_cmacSapUser; |
|
1564 |
} |
|
1565 |
||
1566 |
void |
|
9406 | 1567 |
LteEnbRrc::SetLteEnbRrcSapUser (LteEnbRrcSapUser * s) |
1568 |
{ |
|
1569 |
NS_LOG_FUNCTION (this << s); |
|
1570 |
m_rrcSapUser = s; |
|
1571 |
} |
|
1572 |
||
1573 |
LteEnbRrcSapProvider* |
|
1574 |
LteEnbRrc::GetLteEnbRrcSapProvider () |
|
7886 | 1575 |
{ |
1576 |
NS_LOG_FUNCTION (this); |
|
9406 | 1577 |
return m_rrcSapProvider; |
7886 | 1578 |
} |
1579 |
||
1580 |
void |
|
1581 |
LteEnbRrc::SetLteMacSapProvider (LteMacSapProvider * s) |
|
1582 |
{ |
|
1583 |
NS_LOG_FUNCTION (this); |
|
1584 |
m_macSapProvider = s; |
|
1585 |
} |
|
1586 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1587 |
void |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1588 |
LteEnbRrc::SetS1SapProvider (EpcEnbS1SapProvider * s) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1589 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1590 |
m_s1SapProvider = s; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1591 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1592 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1593 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1594 |
EpcEnbS1SapUser* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1595 |
LteEnbRrc::GetS1SapUser () |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1596 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1597 |
return m_s1SapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1598 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1599 |
|
9406 | 1600 |
void |
1601 |
LteEnbRrc::SetLteEnbCphySapProvider (LteEnbCphySapProvider * s) |
|
1602 |
{ |
|
1603 |
NS_LOG_FUNCTION (this << s); |
|
1604 |
m_cphySapProvider = s; |
|
1605 |
} |
|
1606 |
||
1607 |
LteEnbCphySapUser* |
|
1608 |
LteEnbRrc::GetLteEnbCphySapUser () |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
1609 |
{ |
9406 | 1610 |
NS_LOG_FUNCTION (this); |
1611 |
return m_cphySapUser; |
|
1612 |
} |
|
1613 |
||
1614 |
Ptr<UeManager> |
|
1615 |
LteEnbRrc::GetUeManager (uint16_t rnti) |
|
1616 |
{ |
|
1617 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
1618 |
NS_ASSERT (0 != rnti); |
|
1619 |
std::map<uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); |
|
1620 |
NS_ASSERT_MSG (it != m_ueMap.end (), "RNTI " << rnti << " not found in eNB with cellId " << m_cellId); |
|
1621 |
return it->second; |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
1622 |
} |
7886 | 1623 |
|
1624 |
void |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1625 |
LteEnbRrc::ConfigureCell (uint8_t ulBandwidth, uint8_t dlBandwidth, uint16_t ulEarfcn, uint16_t dlEarfcn, uint16_t cellId) |
7886 | 1626 |
{ |
1627 |
NS_LOG_FUNCTION (this); |
|
1628 |
NS_ASSERT (!m_configured); |
|
1629 |
m_cmacSapProvider->ConfigureMac (ulBandwidth, dlBandwidth); |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1630 |
m_cphySapProvider->SetBandwidth (ulBandwidth, dlBandwidth); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1631 |
m_cphySapProvider->SetEarfcn (ulEarfcn, dlEarfcn); |
9406 | 1632 |
m_dlEarfcn = dlEarfcn; |
1633 |
m_ulEarfcn = ulEarfcn; |
|
1634 |
m_dlBandwidth = dlBandwidth; |
|
1635 |
m_ulBandwidth = ulBandwidth; |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1636 |
m_cellId = cellId; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
1637 |
m_cphySapProvider->SetCellId (cellId); |
9406 | 1638 |
LteRrcSap::MasterInformationBlock mib; |
1639 |
mib.dlBandwidth = m_dlBandwidth; |
|
1640 |
m_cphySapProvider->SetMasterInformationBlock (mib); |
|
7886 | 1641 |
m_configured = true; |
9406 | 1642 |
|
1643 |
// the first time System Information is sent |
|
1644 |
Simulator::Schedule (MilliSeconds (16), &LteEnbRrc::SendSystemInformation, this); |
|
1645 |
} |
|
1646 |
||
1647 |
||
1648 |
void |
|
1649 |
LteEnbRrc::SetCellId (uint16_t cellId) |
|
1650 |
{ |
|
1651 |
m_cellId = cellId; |
|
1652 |
} |
|
1653 |
||
1654 |
bool |
|
1655 |
LteEnbRrc::SendData (Ptr<Packet> packet) |
|
1656 |
{ |
|
1657 |
NS_LOG_FUNCTION (this << packet); |
|
1658 |
||
1659 |
EpsBearerTag tag; |
|
1660 |
bool found = packet->RemovePacketTag (tag); |
|
1661 |
NS_ASSERT_MSG (found, "no EpsBearerTag found in packet to be sent"); |
|
1662 |
Ptr<UeManager> ueManager = GetUeManager (tag.GetRnti ()); |
|
1663 |
ueManager->SendData (tag.GetBid (), packet); |
|
1664 |
||
1665 |
return true; |
|
1666 |
} |
|
1667 |
||
1668 |
void |
|
1669 |
LteEnbRrc::SetForwardUpCallback (Callback <void, Ptr<Packet> > cb) |
|
1670 |
{ |
|
1671 |
m_forwardUpCallback = cb; |
|
7886 | 1672 |
} |
1673 |
||
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1674 |
void |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1675 |
LteEnbRrc::ConnectionTimeout (uint16_t rnti) |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1676 |
{ |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1677 |
NS_LOG_FUNCTION (this << rnti); |
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1678 |
NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::INITIAL_RANDOM_ACCESS, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1679 |
"ConnectionTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ())); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1680 |
RemoveUe (rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1681 |
} |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1682 |
|
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1683 |
void |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1684 |
LteEnbRrc::ConnectionRejectedTimeout (uint16_t rnti) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1685 |
{ |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1686 |
NS_LOG_FUNCTION (this << rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1687 |
NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::CONNECTION_REJECTED, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1688 |
"ConnectionTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ())); |
9567
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1689 |
RemoveUe (rnti); |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1690 |
} |
6941db633724
remove context at eNB after UE connection timeout
Nicola Baldo <nbaldo@cttc.es>
parents:
9564
diff
changeset
|
1691 |
|
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1692 |
void |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1693 |
LteEnbRrc::HandoverJoiningTimeout (uint16_t rnti) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1694 |
{ |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1695 |
NS_LOG_FUNCTION (this << rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1696 |
NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_JOINING, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1697 |
"HandoverJoiningTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ())); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1698 |
RemoveUe (rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1699 |
} |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1700 |
|
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1701 |
void |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1702 |
LteEnbRrc::HandoverLeavingTimeout (uint16_t rnti) |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1703 |
{ |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1704 |
NS_LOG_FUNCTION (this << rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1705 |
NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_LEAVING, |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1706 |
"HandoverLeavingTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ())); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1707 |
RemoveUe (rnti); |
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1708 |
} |
9406 | 1709 |
|
1710 |
void |
|
1711 |
LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId) |
|
7886 | 1712 |
{ |
9406 | 1713 |
NS_LOG_FUNCTION (this << rnti << cellId); |
1714 |
NS_LOG_LOGIC ("Request to send HANDOVER REQUEST"); |
|
1715 |
NS_ASSERT (m_configured); |
|
1716 |
||
1717 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1718 |
ueManager->PrepareHandover (cellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1719 |
|
9406 | 1720 |
} |
9346 | 1721 |
|
9406 | 1722 |
void |
1723 |
LteEnbRrc::DoCompleteSetupUe (uint16_t rnti, LteEnbRrcSapProvider::CompleteSetupUeParameters params) |
|
1724 |
{ |
|
1725 |
NS_LOG_FUNCTION (this << rnti); |
|
1726 |
GetUeManager (rnti)->CompleteSetupUe (params); |
|
1727 |
} |
|
9346 | 1728 |
|
9406 | 1729 |
void |
1730 |
LteEnbRrc::DoRecvRrcConnectionRequest (uint16_t rnti, LteRrcSap::RrcConnectionRequest msg) |
|
1731 |
{ |
|
1732 |
NS_LOG_FUNCTION (this << rnti); |
|
9528
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1733 |
|
19959697c48e
Add implementation of RRC Connection Reject in Ue Recv.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9523
diff
changeset
|
1734 |
GetUeManager (rnti)->RecvRrcConnectionRequest (msg); |
9406 | 1735 |
} |
1736 |
||
1737 |
void |
|
1738 |
LteEnbRrc::DoRecvRrcConnectionSetupCompleted (uint16_t rnti, LteRrcSap::RrcConnectionSetupCompleted msg) |
|
1739 |
{ |
|
1740 |
NS_LOG_FUNCTION (this << rnti); |
|
1741 |
GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg); |
|
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1742 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1743 |
|
9346 | 1744 |
void |
9406 | 1745 |
LteEnbRrc::DoRecvRrcConnectionReconfigurationCompleted (uint16_t rnti, LteRrcSap::RrcConnectionReconfigurationCompleted msg) |
1746 |
{ |
|
1747 |
NS_LOG_FUNCTION (this << rnti); |
|
1748 |
GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg); |
|
1749 |
} |
|
1750 |
||
1751 |
void |
|
1752 |
LteEnbRrc::DoRecvRrcConnectionReestablishmentRequest (uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentRequest msg) |
|
1753 |
{ |
|
1754 |
NS_LOG_FUNCTION (this << rnti); |
|
1755 |
GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg); |
|
1756 |
} |
|
1757 |
||
1758 |
void |
|
1759 |
LteEnbRrc::DoRecvRrcConnectionReestablishmentComplete (uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentComplete msg) |
|
1760 |
{ |
|
1761 |
NS_LOG_FUNCTION (this << rnti); |
|
1762 |
GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg); |
|
1763 |
} |
|
1764 |
||
9601
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1765 |
void |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1766 |
LteEnbRrc::DoRecvMeasurementReport (uint16_t rnti, LteRrcSap::MeasurementReport msg) |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1767 |
{ |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1768 |
NS_LOG_FUNCTION (this << rnti); |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1769 |
GetUeManager (rnti)->RecvMeasurementReport (msg); |
869b6ed3ad40
Add MeasurementReport to Send/Rcv functions in real and ideal protocol.
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9599
diff
changeset
|
1770 |
} |
9406 | 1771 |
|
1772 |
void |
|
1773 |
LteEnbRrc::DoDataRadioBearerSetupRequest (EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters request) |
|
1774 |
{ |
|
1775 |
Ptr<UeManager> ueManager = GetUeManager (request.rnti); |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
1776 |
ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtpTeid, request.transportLayerAddress); |
9406 | 1777 |
} |
1778 |
||
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1779 |
void |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1780 |
LteEnbRrc::DoPathSwitchRequestAcknowledge (EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params) |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1781 |
{ |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1782 |
Ptr<UeManager> ueManager = GetUeManager (params.rnti); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1783 |
ueManager->SendUeContextRelease (); |
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9438
diff
changeset
|
1784 |
} |
9406 | 1785 |
|
1786 |
void |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1787 |
LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams req) |
7886 | 1788 |
{ |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1789 |
NS_LOG_FUNCTION (this); |
9406 | 1790 |
|
1791 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST"); |
|
1792 |
||
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1793 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << req.oldEnbUeX2apId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1794 |
NS_LOG_LOGIC ("sourceCellId = " << req.sourceCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1795 |
NS_LOG_LOGIC ("targetCellId = " << req.targetCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1796 |
NS_LOG_LOGIC ("mmeUeS1apId = " << req.mmeUeS1apId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1797 |
|
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1798 |
NS_ASSERT (req.targetCellId == m_cellId); |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1799 |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1800 |
if (m_admitHandoverRequest == false) |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1801 |
{ |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1802 |
NS_LOG_INFO ("rejecting handover request from cellId " << req.sourceCellId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1803 |
EpcX2Sap::HandoverPreparationFailureParams res; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1804 |
res.oldEnbUeX2apId = req.oldEnbUeX2apId; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1805 |
res.sourceCellId = req.sourceCellId ; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1806 |
res.targetCellId = req.targetCellId ; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1807 |
res.cause = 0; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1808 |
res.criticalityDiagnostics = 0; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1809 |
m_x2SapProvider->SendHandoverPreparationFailure (res); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1810 |
return; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1811 |
} |
9406 | 1812 |
|
1813 |
uint16_t rnti = AddUe (UeManager::HANDOVER_JOINING); |
|
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1814 |
LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue anrcrv = m_cmacSapProvider->AllocateNcRaPreamble (rnti); |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1815 |
if (anrcrv.valid == false) |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1816 |
{ |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1817 |
NS_LOG_INFO (this << "failed to allocate a preamble for non-contention based RA => cannot accept HO"); |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1818 |
RemoveUe (rnti); |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1819 |
NS_FATAL_ERROR ("should trigger HO Preparation Failure, but it is not implemented"); |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1820 |
return; |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1821 |
} |
9406 | 1822 |
|
9407 | 1823 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1824 |
ueManager->SetSource (req.sourceCellId, req.oldEnbUeX2apId); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1825 |
ueManager->SetImsi (req.mmeUeS1apId); |
9406 | 1826 |
|
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1827 |
EpcX2SapProvider::HandoverRequestAckParams ackParams; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1828 |
ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1829 |
ackParams.newEnbUeX2apId = rnti; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1830 |
ackParams.sourceCellId = req.sourceCellId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1831 |
ackParams.targetCellId = req.targetCellId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1832 |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1833 |
for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = req.bearers.begin (); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1834 |
it != req.bearers.end (); |
9406 | 1835 |
++it) |
1836 |
{ |
|
9497
bd3e1a06df5c
really defer DRB activation to rx of RRC connection setup/reconfiguration completed
Nicola Baldo <nbaldo@cttc.es>
parents:
9480
diff
changeset
|
1837 |
ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->erabId, it->gtpTeid, it->transportLayerAddress); |
9501
3c52c63f19fd
check admittedBearers upon handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9500
diff
changeset
|
1838 |
EpcX2Sap::ErabAdmittedItem i; |
3c52c63f19fd
check admittedBearers upon handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9500
diff
changeset
|
1839 |
i.erabId = it->erabId; |
3c52c63f19fd
check admittedBearers upon handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9500
diff
changeset
|
1840 |
ackParams.admittedBearers.push_back (i); |
9406 | 1841 |
} |
1842 |
||
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1843 |
LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcConnectionReconfigurationForHandover (); |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1844 |
handoverCommand.haveMobilityControlInfo = true; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1845 |
handoverCommand.mobilityControlInfo.targetPhysCellId = m_cellId; |
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1846 |
handoverCommand.mobilityControlInfo.haveCarrierFreq = true; |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1847 |
handoverCommand.mobilityControlInfo.carrierFreq.dlCarrierFreq = m_dlEarfcn; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1848 |
handoverCommand.mobilityControlInfo.carrierFreq.ulCarrierFreq = m_ulEarfcn; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1849 |
handoverCommand.mobilityControlInfo.haveCarrierBandwidth = true; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1850 |
handoverCommand.mobilityControlInfo.carrierBandwidth.dlBandwidth = m_dlBandwidth; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1851 |
handoverCommand.mobilityControlInfo.carrierBandwidth.ulBandwidth = m_ulBandwidth; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
1852 |
handoverCommand.mobilityControlInfo.newUeIdentity = rnti; |
9420
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1853 |
handoverCommand.mobilityControlInfo.haveRachConfigDedicated = true; |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1854 |
handoverCommand.mobilityControlInfo.rachConfigDedicated.raPreambleIndex = anrcrv.raPreambleId; |
cd49c7790894
X2 handover working on the control plane
Nicola Baldo <nbaldo@cttc.es>
parents:
9419
diff
changeset
|
1855 |
handoverCommand.mobilityControlInfo.rachConfigDedicated.raPrachMaskIndex = anrcrv.raPrachMaskIndex; |
9660
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1856 |
|
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1857 |
LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider->GetRachConfig (); |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1858 |
handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1859 |
handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1860 |
handoverCommand.mobilityControlInfo.radioResourceConfigCommon.rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSize; |
82b2691be894
fixed valgrind errors in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
9623
diff
changeset
|
1861 |
|
9406 | 1862 |
Ptr<Packet> encodedHandoverCommand = m_rrcSapUser->EncodeHandoverCommand (handoverCommand); |
1863 |
||
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1864 |
ackParams.rrcContext = encodedHandoverCommand; |
9406 | 1865 |
|
1866 |
NS_LOG_LOGIC ("Send X2 message: HANDOVER REQUEST ACK"); |
|
1867 |
||
1868 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << ackParams.oldEnbUeX2apId); |
|
1869 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << ackParams.newEnbUeX2apId); |
|
1870 |
NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId); |
|
1871 |
NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId); |
|
1872 |
||
1873 |
m_x2SapProvider->SendHandoverRequestAck (ackParams); |
|
9346 | 1874 |
} |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1875 |
|
9346 | 1876 |
void |
9406 | 1877 |
LteEnbRrc::DoRecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params) |
9346 | 1878 |
{ |
1879 |
NS_LOG_FUNCTION (this); |
|
9406 | 1880 |
|
1881 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK"); |
|
1882 |
||
1883 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
|
1884 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
|
1885 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
|
1886 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
|
1887 |
||
1888 |
uint16_t rnti = params.oldEnbUeX2apId; |
|
1889 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
|
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1890 |
ueManager->RecvHandoverRequestAck (params); |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1891 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1892 |
|
9407 | 1893 |
void |
9456
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1894 |
LteEnbRrc::DoRecvHandoverPreparationFailure (EpcX2SapUser::HandoverPreparationFailureParams params) |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1895 |
{ |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1896 |
NS_LOG_FUNCTION (this); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1897 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1898 |
NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE"); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1899 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1900 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1901 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1902 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1903 |
NS_LOG_LOGIC ("cause = " << params.cause); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1904 |
NS_LOG_LOGIC ("criticalityDiagnostics = " << params.criticalityDiagnostics); |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1905 |
|
9464
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1906 |
uint16_t rnti = params.oldEnbUeX2apId; |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1907 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
e2e3b9b3585a
added LteEnbRrc::AdmitHandoverRequest attribute; implemented handling of X2 HO prep failure
Nicola Baldo <nbaldo@cttc.es>
parents:
9458
diff
changeset
|
1908 |
ueManager->RecvHandoverPreparationFailure (params.targetCellId); |
9456
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1909 |
} |
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1910 |
|
3102416ce9d7
Add support of HandoverPreparationFailure primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9435
diff
changeset
|
1911 |
void |
9479
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1912 |
LteEnbRrc::DoRecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1913 |
{ |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1914 |
NS_LOG_FUNCTION (this); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1915 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1916 |
NS_LOG_LOGIC ("Recv X2 message: SN STATUS TRANSFER"); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1917 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1918 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1919 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1920 |
NS_LOG_LOGIC ("erabsSubjectToStatusTransferList size = " << params.erabsSubjectToStatusTransferList.size ()); |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1921 |
|
9500
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1922 |
uint16_t rnti = params.newEnbUeX2apId; |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1923 |
Ptr<UeManager> ueManager = GetUeManager (rnti); |
17e4bf873a93
LteEnbRrc send/recv X2 sn status transfer
Nicola Baldo <nbaldo@cttc.es>
parents:
9497
diff
changeset
|
1924 |
ueManager->RecvSnStatusTransfer (params); |
9479
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1925 |
} |
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1926 |
|
a647c4d9b6e7
Add support of SnStatusTransfer in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9456
diff
changeset
|
1927 |
void |
9407 | 1928 |
LteEnbRrc::DoRecvUeContextRelease (EpcX2SapUser::UeContextReleaseParams params) |
9346 | 1929 |
{ |
1930 |
NS_LOG_FUNCTION (this); |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1931 |
|
9407 | 1932 |
NS_LOG_LOGIC ("Recv X2 message: UE CONTEXT RELEASE"); |
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1933 |
|
9407 | 1934 |
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId); |
1935 |
NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId); |
|
1936 |
||
1937 |
uint16_t rnti = params.oldEnbUeX2apId; |
|
10022
4942b556f517
refactored timeouts in LteEnbRrc
Nicola Baldo <nbaldo@cttc.es>
parents:
10019
diff
changeset
|
1938 |
GetUeManager (rnti)->RecvUeContextRelease (params); |
9407 | 1939 |
RemoveUe (rnti); |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1940 |
} |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
1941 |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1942 |
void |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1943 |
LteEnbRrc::DoRecvLoadInformation (EpcX2SapUser::LoadInformationParams params) |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1944 |
{ |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1945 |
NS_LOG_FUNCTION (this); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1946 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1947 |
NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION"); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1948 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1949 |
NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationList.size ()); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1950 |
|
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1951 |
NS_ASSERT ("Processing of LOAD INFORMATION X2 message IS NOT IMPLEMENTED"); |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1952 |
} |
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1953 |
|
9435
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1954 |
void |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1955 |
LteEnbRrc::DoRecvResourceStatusUpdate (EpcX2SapUser::ResourceStatusUpdateParams params) |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1956 |
{ |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1957 |
NS_LOG_FUNCTION (this); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1958 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1959 |
NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE"); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1960 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1961 |
NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurementResultList.size ()); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1962 |
|
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1963 |
NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED"); |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1964 |
} |
a60d3218e8f4
Add support of ResourceStatusUpdate X2 primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9418
diff
changeset
|
1965 |
|
9555
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1966 |
void |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1967 |
LteEnbRrc::DoRecvUeData (EpcX2SapUser::UeDataParams params) |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1968 |
{ |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1969 |
NS_LOG_FUNCTION (this); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1970 |
|
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1971 |
NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface"); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1972 |
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1973 |
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1974 |
NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1975 |
NS_LOG_LOGIC ("ueData = " << params.ueData); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1976 |
NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ()); |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1977 |
|
9599
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1978 |
std::map<uint32_t, X2uTeidInfo>::iterator |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1979 |
teidInfoIt = m_x2uTeidInfoMap.find (params.gtpTeid); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1980 |
if (teidInfoIt != m_x2uTeidInfoMap.end ()) |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1981 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1982 |
GetUeManager (teidInfoIt->second.rnti)->SendData (teidInfoIt->second.drbid, params.ueData); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1983 |
} |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1984 |
else |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1985 |
{ |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1986 |
NS_FATAL_ERROR ("X2-U data received but no X2uTeidInfo found"); |
fc4c980050f2
LteEnbRrc forwarding data over X2-U during handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9593
diff
changeset
|
1987 |
} |
9555
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1988 |
} |
2fc5d91bb366
Add initial support for UE data forwarding in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9479
diff
changeset
|
1989 |
|
9418
150d133b96af
Add support of Load Information primitive in RRC
Manuel Requena <manuel.requena@cttc.es>
parents:
9408
diff
changeset
|
1990 |
|
9406 | 1991 |
uint16_t |
1992 |
LteEnbRrc::DoAllocateTemporaryCellRnti () |
|
1993 |
{ |
|
1994 |
NS_LOG_FUNCTION (this); |
|
1995 |
return AddUe (UeManager::INITIAL_RANDOM_ACCESS); |
|
1996 |
} |
|
1997 |
||
1998 |
void |
|
1999 |
LteEnbRrc::DoRrcConfigurationUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
|
2000 |
{ |
|
2001 |
Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti); |
|
2002 |
ueManager->CmacUeConfigUpdateInd (cmacParams); |
|
2003 |
} |
|
2004 |
||
2005 |
void |
|
2006 |
LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) |
|
2007 |
{ |
|
2008 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
2009 |
NS_FATAL_ERROR ("not implemented"); |
|
2010 |
} |
|
2011 |
||
2012 |
||
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
2013 |
|
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
2014 |
uint16_t |
9406 | 2015 |
LteEnbRrc::AddUe (UeManager::State state) |
9345
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
2016 |
{ |
8290ae6cab62
add/remove UEs and bearers upon handover
Nicola Baldo <nicola@baldo.biz>
parents:
9344
diff
changeset
|
2017 |
NS_LOG_FUNCTION (this); |
9406 | 2018 |
bool found = false; |
2019 |
uint16_t rnti; |
|
2020 |
for (rnti = m_lastAllocatedRnti; |
|
2021 |
(rnti != m_lastAllocatedRnti - 1) && (!found); |
|
2022 |
++rnti) |
|
2023 |
{ |
|
2024 |
if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ())) |
|
2025 |
{ |
|
2026 |
found = true; |
|
2027 |
break; |
|
2028 |
} |
|
2029 |
} |
|
9346 | 2030 |
|
9406 | 2031 |
NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UEs in a cell?)"); |
2032 |
m_lastAllocatedRnti = rnti; |
|
2033 |
Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state); |
|
2034 |
m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager)); |
|
9471
082640d26eea
Implement real DoSendRrcConnectionSetupCompleted
Lluis Parcerisa <parcerisa@gmail.com>
parents:
9464
diff
changeset
|
2035 |
ueManager->Start (); |
9615 | 2036 |
NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << m_cellId << " srs CI " << ueManager->GetSrsConfigurationIndex ()); |
2037 |
m_newUeContextTrace (m_cellId, rnti); |
|
7886 | 2038 |
return rnti; |
2039 |
} |
|
2040 |
||
2041 |
void |
|
2042 |
LteEnbRrc::RemoveUe (uint16_t rnti) |
|
2043 |
{ |
|
2044 |
NS_LOG_FUNCTION (this << (uint32_t) rnti); |
|
9406 | 2045 |
std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti); |
2046 |
NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown rnti " << rnti); |
|
2047 |
uint16_t srsCi = (*it).second->GetSrsConfigurationIndex (); |
|
2048 |
m_ueMap.erase (it); |
|
9623
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2049 |
m_cmacSapProvider->RemoveUe (rnti); |
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2050 |
m_cphySapProvider->RemoveUe (rnti); |
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2051 |
if (m_s1SapProvider != 0) |
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2052 |
{ |
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2053 |
m_s1SapProvider->UeContextRelease (rnti); |
0be7b61853e3
fixed some RRC valgrind errors
Nicola Baldo <nbaldo@cttc.es>
parents:
9615
diff
changeset
|
2054 |
} |
9406 | 2055 |
// need to do this after UeManager has been deleted |
2056 |
RemoveSrsConfigurationIndex (srsCi); |
|
2057 |
} |
|
7886 | 2058 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2059 |
TypeId |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2060 |
LteEnbRrc::GetRlcType (EpsBearer bearer) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2061 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2062 |
switch (m_epsBearerToRlcMapping) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2063 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2064 |
case RLC_SM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2065 |
return LteRlcSm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2066 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2067 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2068 |
case RLC_UM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2069 |
return LteRlcUm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2070 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2071 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2072 |
case RLC_AM_ALWAYS: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2073 |
return LteRlcAm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2074 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2075 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2076 |
case PER_BASED: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2077 |
if (bearer.GetPacketErrorLossRate () > 1.0e-5) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2078 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2079 |
return LteRlcUm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2080 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2081 |
else |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2082 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2083 |
return LteRlcAm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2084 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2085 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2086 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2087 |
default: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2088 |
return LteRlcSm::GetTypeId (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2089 |
break; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2090 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2091 |
} |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2092 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2093 |
|
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2094 |
void |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2095 |
LteEnbRrc::AddX2Neighbour (uint16_t cellId) |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2096 |
{ |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2097 |
NS_LOG_FUNCTION (cellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2098 |
NS_ASSERT_MSG (m_neighbourRelationTable.find (cellId) == m_neighbourRelationTable.end (), |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2099 |
"There is already an entry in the Neighbour Relation Table for cellId " << cellId); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2100 |
|
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2101 |
Ptr<NeighbourRelation> neighbourRelation = CreateObject <NeighbourRelation> (); |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2102 |
neighbourRelation->m_physCellId = cellId; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2103 |
neighbourRelation->m_noRemove = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2104 |
neighbourRelation->m_noHo = true; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2105 |
neighbourRelation->m_noX2 = false; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2106 |
neighbourRelation->m_detectedAsNeighbour = false; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2107 |
m_neighbourRelationTable[cellId] = neighbourRelation; |
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2108 |
} |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
2109 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8156
diff
changeset
|
2110 |
|
9036 | 2111 |
// from 3GPP TS 36.213 table 8.2-1 UE Specific SRS Periodicity |
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2112 |
const uint8_t SRS_ENTRIES = 9; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2113 |
uint16_t g_srsPeriodicity[SRS_ENTRIES] = {0, 2, 5, 10, 20, 40, 80, 160, 320}; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2114 |
uint16_t g_srsCiLow[SRS_ENTRIES] = {0, 0, 2, 7, 17, 37, 77, 157, 317}; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2115 |
uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156, 316, 636}; |
9543
5976c95cf6e3
always use max SRS periodicity with more than 10 UEs
Nicola Baldo <nbaldo@cttc.es>
parents:
9541
diff
changeset
|
2116 |
|
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2117 |
void |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2118 |
LteEnbRrc::SetSrsPeriodicity (uint32_t p) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2119 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2120 |
NS_LOG_FUNCTION (this << p); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2121 |
for (uint32_t id = 1; id < SRS_ENTRIES; ++id) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2122 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2123 |
if (g_srsPeriodicity[id] == p) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2124 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2125 |
m_srsCurrentPeriodicityId = id; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2126 |
return; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2127 |
} |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2128 |
} |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2129 |
// no match found |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2130 |
std::ostringstream allowedValues; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2131 |
for (uint32_t id = 1; id < SRS_ENTRIES; ++id) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2132 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2133 |
allowedValues << g_srsPeriodicity[id] << " "; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2134 |
} |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2135 |
NS_FATAL_ERROR ("illecit SRS periodicity value " << p << ". Allowed values: " << allowedValues.str ()); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2136 |
} |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2137 |
|
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2138 |
uint32_t |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2139 |
LteEnbRrc::GetSrsPeriodicity () const |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2140 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2141 |
NS_LOG_FUNCTION (this); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2142 |
NS_ASSERT (m_srsCurrentPeriodicityId > 0); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2143 |
NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2144 |
return g_srsPeriodicity[m_srsCurrentPeriodicityId]; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2145 |
} |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2146 |
|
9036 | 2147 |
|
2148 |
uint16_t |
|
2149 |
LteEnbRrc::GetNewSrsConfigurationIndex () |
|
2150 |
{ |
|
2151 |
NS_LOG_FUNCTION (this << m_ueSrsConfigurationIndexSet.size ()); |
|
2152 |
// SRS |
|
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2153 |
NS_ASSERT (m_srsCurrentPeriodicityId > 0); |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2154 |
NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2155 |
NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId] << " set " << m_ueSrsConfigurationIndexSet.size ()); |
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2156 |
if (m_ueSrsConfigurationIndexSet.size () >= g_srsPeriodicity[m_srsCurrentPeriodicityId]) |
9036 | 2157 |
{ |
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2158 |
NS_FATAL_ERROR ("too many UEs (" << m_ueSrsConfigurationIndexSet.size () + 1 |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2159 |
<< ") for current SRS periodicity " |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2160 |
<< g_srsPeriodicity[m_srsCurrentPeriodicityId] |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2161 |
<< ", consider increasing the value of ns3::LteEnbRrc::SrsPeriodicity"); |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2162 |
} |
9406 | 2163 |
|
9568
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2164 |
if (m_ueSrsConfigurationIndexSet.empty ()) |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2165 |
{ |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2166 |
// first entry |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2167 |
m_lastAllocatedConfigurationIndex = g_srsCiLow[m_srsCurrentPeriodicityId]; |
2ef7e29ee20d
make SRS periodicity static to avoid excessive RRC overhead of dynamic one
Nicola Baldo <nbaldo@cttc.es>
parents:
9567
diff
changeset
|
2168 |
m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex); |
9036 | 2169 |
} |
2170 |
else |
|
2171 |
{ |
|
2172 |
// find a CI from the available ones |
|
2173 |
std::set<uint16_t>::reverse_iterator rit = m_ueSrsConfigurationIndexSet.rbegin (); |
|
9425
b7eddbdb3a5a
added lte-x2-handover test suite
Nicola Baldo <nbaldo@cttc.es>
parents:
9420
diff
changeset
|
2174 |
NS_ASSERT (rit != m_ueSrsConfigurationIndexSet.rend ()); |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2175 |
NS_LOG_DEBUG (this << " lower bound " << (*rit) << " of " << g_srsCiHigh[m_srsCurrentPeriodicityId]); |
9469
28a7b04a0b11
removed spurious LteUePhy::m_enbCellId; fixed bug in LteEnbRrc::GetNewSrsConfigurationIndex ()
Nicola Baldo <nbaldo@cttc.es>
parents:
9464
diff
changeset
|
2176 |
if ((*rit) < g_srsCiHigh[m_srsCurrentPeriodicityId]) |
9036 | 2177 |
{ |
2178 |
// got it from the upper bound |
|
2179 |
m_lastAllocatedConfigurationIndex = (*rit) + 1; |
|
2180 |
m_ueSrsConfigurationIndexSet.insert (m_lastAllocatedConfigurationIndex); |
|
2181 |
} |
|
2182 |
else |
|
2183 |
{ |
|
2184 |
// look for released ones |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2185 |
for (uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; srcCi < g_srsCiHigh[m_srsCurrentPeriodicityId]; srcCi++) |
9036 | 2186 |
{ |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2187 |
std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); |
9036 | 2188 |
if (it==m_ueSrsConfigurationIndexSet.end ()) |
2189 |
{ |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2190 |
m_lastAllocatedConfigurationIndex = srcCi; |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2191 |
m_ueSrsConfigurationIndexSet.insert (srcCi); |
9036 | 2192 |
break; |
2193 |
} |
|
2194 |
} |
|
2195 |
} |
|
2196 |
} |
|
2197 |
return m_lastAllocatedConfigurationIndex; |
|
2198 |
||
2199 |
} |
|
2200 |
||
2201 |
||
2202 |
void |
|
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2203 |
LteEnbRrc::RemoveSrsConfigurationIndex (uint16_t srcCi) |
9036 | 2204 |
{ |
9038
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2205 |
NS_LOG_FUNCTION (this << srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2206 |
std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi); |
e1d67c8aa95b
Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents:
9036
diff
changeset
|
2207 |
NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove unkwown SRS CI " << srcCi); |
9036 | 2208 |
m_ueSrsConfigurationIndexSet.erase (it); |
2209 |
} |
|
2210 |
||
9406 | 2211 |
uint8_t |
2212 |
LteEnbRrc::GetLogicalChannelGroup (EpsBearer bearer) |
|
7886 | 2213 |
{ |
9406 | 2214 |
if (bearer.IsGbr ()) |
2215 |
{ |
|
2216 |
return 1; |
|
2217 |
} |
|
2218 |
else |
|
2219 |
{ |
|
2220 |
return 2; |
|
2221 |
} |
|
2222 |
} |
|
2223 |
||
2224 |
uint8_t |
|
2225 |
LteEnbRrc::GetLogicalChannelPriority (EpsBearer bearer) |
|
2226 |
{ |
|
2227 |
return bearer.qci; |
|
7886 | 2228 |
} |
2229 |
||
2230 |
void |
|
9406 | 2231 |
LteEnbRrc::SendSystemInformation () |
9036 | 2232 |
{ |
10019
6efd95740e39
Add automatic triger of the HO based on the RSRQ measures
Manuel Requena <manuel.requena@cttc.es>
parents:
10011
diff
changeset
|
2233 |
// NS_LOG_FUNCTION (this); |
9406 | 2234 |
// for simplicity, we use the same periodicity for all sibs |
2235 |
// note that in real systems the periodicy of each sibs could be different |
|
2236 |
LteRrcSap::SystemInformation si; |
|
2237 |
si.haveSib2 = true; |
|
2238 |
si.sib2.freqInfo.ulCarrierFreq = m_ulEarfcn; |
|
2239 |
si.sib2.freqInfo.ulBandwidth = m_ulBandwidth; |
|
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2240 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2241 |
LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider->GetRachConfig (); |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2242 |
LteRrcSap::RachConfigCommon rachConfigCommon; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2243 |
rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2244 |
rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2245 |
rachConfigCommon.raSupervisionInfo.raResponseWindowSize = rc.raResponseWindowSize; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9408
diff
changeset
|
2246 |
si.sib2.radioResourceConfigCommon.rachConfigCommon = rachConfigCommon; |
7886 | 2247 |
|
9406 | 2248 |
m_rrcSapUser->SendSystemInformation (si); |
2249 |
Simulator::Schedule (m_systemInformationPeriodicity, &LteEnbRrc::SendSystemInformation, this); |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8717
diff
changeset
|
2250 |
} |
7886 | 2251 |
|
2252 |
} // namespace ns3 |
|
2253 |