A Discrete-Event Network Simulator
API
lte-enb-rrc.cc
Go to the documentation of this file.
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  * Authors: Nicola Baldo <nbaldo@cttc.es>
19  * Marco Miozzo <mmiozzo@cttc.es>
20  * Manuel Requena <manuel.requena@cttc.es>
21  * Modified by: Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015),
22  * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
23  */
24 
25 #include "lte-enb-rrc.h"
26 
27 #include <ns3/fatal-error.h>
28 #include <ns3/log.h>
29 #include <ns3/abort.h>
30 
31 #include <ns3/pointer.h>
32 #include <ns3/object-map.h>
33 #include <ns3/object-factory.h>
34 #include <ns3/simulator.h>
35 
36 #include <ns3/lte-radio-bearer-info.h>
37 #include <ns3/eps-bearer-tag.h>
38 #include <ns3/packet.h>
39 
40 #include <ns3/lte-rlc.h>
41 #include <ns3/lte-rlc-tm.h>
42 #include <ns3/lte-rlc-um.h>
43 #include <ns3/lte-rlc-am.h>
44 #include <ns3/lte-pdcp.h>
45 
46 
47 
48 
49 namespace ns3 {
50 
51 NS_LOG_COMPONENT_DEFINE ("LteEnbRrc");
52 
54 // CMAC SAP forwarder
56 
61 {
62 public:
69  EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc, uint8_t componentCarrierId);
70 
71  virtual uint16_t AllocateTemporaryCellRnti ();
72  virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success);
73  virtual void RrcConfigurationUpdateInd (UeConfig params);
74 
75 private:
78 };
79 
81  : m_rrc (rrc)
82  , m_componentCarrierId {componentCarrierId}
83 {
84 }
85 
86 uint16_t
88 {
90 }
91 
92 void
93 EnbRrcMemberLteEnbCmacSapUser::NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success)
94 {
95  m_rrc->DoNotifyLcConfigResult (rnti, lcid, success);
96 }
97 
98 void
100 {
102 }
103 
104 
105 
107 // UeManager
109 
110 
112 static const std::string g_ueManagerStateName[UeManager::NUM_STATES] =
113 {
114  "INITIAL_RANDOM_ACCESS",
115  "CONNECTION_SETUP",
116  "CONNECTION_REJECTED",
117  "CONNECTED_NORMALLY",
118  "CONNECTION_RECONFIGURATION",
119  "CONNECTION_REESTABLISHMENT",
120  "HANDOVER_PREPARATION",
121  "HANDOVER_JOINING",
122  "HANDOVER_PATH_SWITCH",
123  "HANDOVER_LEAVING",
124 };
125 
130 static const std::string & ToString (UeManager::State s)
131 {
132  return g_ueManagerStateName[s];
133 }
134 
135 
136 NS_OBJECT_ENSURE_REGISTERED (UeManager);
137 
138 
140 {
141  NS_FATAL_ERROR ("this constructor is not expected to be used");
142 }
143 
144 
145 UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s, uint8_t componentCarrierId)
146  : m_lastAllocatedDrbid (0),
147  m_rnti (rnti),
148  m_imsi (0),
149  m_componentCarrierId (componentCarrierId),
150  m_lastRrcTransactionIdentifier (0),
151  m_rrc (rrc),
152  m_state (s),
153  m_pendingRrcConnectionReconfiguration (false),
154  m_sourceX2apId (0),
155  m_sourceCellId (0),
156  m_needPhyMacConfiguration (false),
157  m_caSupportConfigured (false),
158  m_pendingStartDataRadioBearers (false)
159 {
160  NS_LOG_FUNCTION (this);
161 }
162 
163 void
165 {
166  NS_LOG_FUNCTION (this);
168 
170  m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTransmissionMode;
177 
178 
179  for (uint8_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
180  {
181  m_rrc->m_cmacSapProvider.at (i)->AddUe (m_rnti);
182  m_rrc->m_cphySapProvider.at (i)->AddUe (m_rnti);
183  }
184 
185  // setup the eNB side of SRB0
186  {
187  uint8_t lcid = 0;
188 
189  Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
190  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
191  rlc->SetRnti (m_rnti);
192  rlc->SetLcId (lcid);
193 
194  m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
195  m_srb0->m_rlc = rlc;
196  m_srb0->m_srbIdentity = 0;
197  // no need to store logicalChannelConfig as SRB0 is pre-configured
198 
200  lcinfo.rnti = m_rnti;
201  lcinfo.lcId = lcid;
202  // Initialise the rest of lcinfo structure even if CCCH (LCID 0) is pre-configured, and only m_rnti and lcid will be used from passed lcinfo structure.
203  // See FF LTE MAC Scheduler Iinterface Specification v1.11, 4.3.4 logicalChannelConfigListElement
204  lcinfo.lcGroup = 0;
205  lcinfo.qci = 0;
206  lcinfo.isGbr = false;
207  lcinfo.mbrUl = 0;
208  lcinfo.mbrDl = 0;
209  lcinfo.gbrUl = 0;
210  lcinfo.gbrDl = 0;
211 
212  // MacSapUserForRlc in the ComponentCarrierManager MacSapUser
213  LteMacSapUser* lteMacSapUser = m_rrc->m_ccmRrcSapProvider->ConfigureSignalBearer(lcinfo, rlc->GetLteMacSapUser ());
214  // Signal Channel are only on Primary Carrier
215  m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, lteMacSapUser);
216  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, lteMacSapUser);
217  }
218 
219  // setup the eNB side of SRB1; the UE side will be set up upon RRC connection establishment
220  {
221  uint8_t lcid = 1;
222 
223  Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> ();
224  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
225  rlc->SetRnti (m_rnti);
226  rlc->SetLcId (lcid);
227 
228  Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> ();
229  pdcp->SetRnti (m_rnti);
230  pdcp->SetLcId (lcid);
231  pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser);
232  pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ());
233  rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ());
234 
235  m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
236  m_srb1->m_rlc = rlc;
237  m_srb1->m_pdcp = pdcp;
238  m_srb1->m_srbIdentity = 1;
239  m_srb1->m_logicalChannelConfig.priority = 1;
240  m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100;
241  m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100;
242  m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0;
243 
245  lcinfo.rnti = m_rnti;
246  lcinfo.lcId = lcid;
247  lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0
248  lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires a CQI even for SRBs...
249  lcinfo.isGbr = true;
250  lcinfo.mbrUl = 1e6;
251  lcinfo.mbrDl = 1e6;
252  lcinfo.gbrUl = 1e4;
253  lcinfo.gbrDl = 1e4;
254  // MacSapUserForRlc in the ComponentCarrierManager MacSapUser
255  LteMacSapUser* MacSapUserForRlc = m_rrc->m_ccmRrcSapProvider->ConfigureSignalBearer(lcinfo, rlc->GetLteMacSapUser ());
256  // Signal Channel are only on Primary Carrier
257  m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, MacSapUserForRlc);
258  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, MacSapUserForRlc);
259  }
260 
262  ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider ();
263  ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider ();
264  m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams);
265 
266  // configure MAC (and scheduler)
268  req.m_rnti = m_rnti;
270 
271  // configure PHY
272  for (uint16_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
273  {
274  m_rrc->m_cmacSapProvider.at (i)->UeUpdateConfigurationReq (req);
275  m_rrc->m_cphySapProvider.at (i)->SetTransmissionMode (m_rnti, m_physicalConfigDedicated.antennaInfo.transmissionMode);
276  m_rrc->m_cphySapProvider.at (i)->SetSrsConfigurationIndex (m_rnti, m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex);
277  }
278  // schedule this UeManager instance to be deleted if the UE does not give any sign of life within a reasonable time
279  Time maxConnectionDelay;
280  switch (m_state)
281  {
283  m_connectionRequestTimeout = Simulator::Schedule (m_rrc->m_connectionRequestTimeoutDuration,
285  m_rrc, m_rnti);
286  break;
287 
288  case HANDOVER_JOINING:
289  m_handoverJoiningTimeout = Simulator::Schedule (m_rrc->m_handoverJoiningTimeoutDuration,
291  m_rrc, m_rnti);
292  break;
293 
294  default:
295  NS_FATAL_ERROR ("unexpected state " << ToString (m_state));
296  break;
297  }
298  m_caSupportConfigured = false;
299 }
300 
301 
303 {
304 }
305 
306 void
308 {
309  delete m_drbPdcpSapUser;
310  // delete eventual X2-U TEIDs
311  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
312  it != m_drbMap.end ();
313  ++it)
314  {
315  m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid);
316  }
317 
318 }
319 
321 {
322  static TypeId tid = TypeId ("ns3::UeManager")
323  .SetParent<Object> ()
324  .AddConstructor<UeManager> ()
325  .AddAttribute ("DataRadioBearerMap", "List of UE DataRadioBearerInfo by DRBID.",
326  ObjectMapValue (),
328  MakeObjectMapChecker<LteDataRadioBearerInfo> ())
329  .AddAttribute ("Srb0", "SignalingRadioBearerInfo for SRB0",
330  PointerValue (),
332  MakePointerChecker<LteSignalingRadioBearerInfo> ())
333  .AddAttribute ("Srb1", "SignalingRadioBearerInfo for SRB1",
334  PointerValue (),
336  MakePointerChecker<LteSignalingRadioBearerInfo> ())
337  .AddAttribute ("C-RNTI",
338  "Cell Radio Network Temporary Identifier",
339  TypeId::ATTR_GET, // read-only attribute
340  UintegerValue (0), // unused, read-only attribute
342  MakeUintegerChecker<uint16_t> ())
343  .AddTraceSource ("StateTransition",
344  "fired upon every UE state transition seen by the "
345  "UeManager at the eNB RRC",
347  "ns3::UeManager::StateTracedCallback")
348  ;
349  return tid;
350 }
351 
352 void
353 UeManager::SetSource (uint16_t sourceCellId, uint16_t sourceX2apId)
354 {
355  m_sourceX2apId = sourceX2apId;
356  m_sourceCellId = sourceCellId;
357 }
358 
359 void
360 UeManager::SetImsi (uint64_t imsi)
361 {
362  m_imsi = imsi;
363 }
364 
365 void
366 UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
367 {
368  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
369 
370  Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> ();
371  uint8_t drbid = AddDataRadioBearerInfo (drbInfo);
372  uint8_t lcid = Drbid2Lcid (drbid);
373  uint8_t bid = Drbid2Bid (drbid);
374  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");
375  drbInfo->m_epsBearer = bearer;
376  drbInfo->m_epsBearerIdentity = bid;
377  drbInfo->m_drbIdentity = drbid;
378  drbInfo->m_logicalChannelIdentity = lcid;
379  drbInfo->m_gtpTeid = gtpTeid;
380  drbInfo->m_transportLayerAddress = transportLayerAddress;
381 
382  if (m_state == HANDOVER_JOINING)
383  {
384  // setup TEIDs for receiving data eventually forwarded over X2-U
385  LteEnbRrc::X2uTeidInfo x2uTeidInfo;
386  x2uTeidInfo.rnti = m_rnti;
387  x2uTeidInfo.drbid = drbid;
388  std::pair<std::map<uint32_t, LteEnbRrc::X2uTeidInfo>::iterator, bool>
389  ret = m_rrc->m_x2uTeidInfoMap.insert (std::pair<uint32_t, LteEnbRrc::X2uTeidInfo> (gtpTeid, x2uTeidInfo));
390  NS_ASSERT_MSG (ret.second == true, "overwriting a pre-existing entry in m_x2uTeidInfoMap");
391  }
392 
393  TypeId rlcTypeId = m_rrc->GetRlcType (bearer);
394 
395  ObjectFactory rlcObjectFactory;
396  rlcObjectFactory.SetTypeId (rlcTypeId);
397  Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> ();
398  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
399  rlc->SetRnti (m_rnti);
400 
401  drbInfo->m_rlc = rlc;
402 
403  rlc->SetLcId (lcid);
404 
405  // we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM
406  // if we are using RLC/SM we don't care of anything above RLC
407  if (rlcTypeId != LteRlcSm::GetTypeId ())
408  {
409  Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> ();
410  pdcp->SetRnti (m_rnti);
411  pdcp->SetLcId (lcid);
412  pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser);
413  pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ());
414  rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ());
415  drbInfo->m_pdcp = pdcp;
416  }
417 
418  std::vector<LteCcmRrcSapProvider::LcsConfig> lcOnCcMapping = m_rrc->m_ccmRrcSapProvider->SetupDataRadioBearer (bearer, bearerId, m_rnti, lcid, m_rrc->GetLogicalChannelGroup (bearer), rlc->GetLteMacSapUser ());
419  // LteEnbCmacSapProvider::LcInfo lcinfo;
420  // lcinfo.rnti = m_rnti;
421  // lcinfo.lcId = lcid;
422  // lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer);
423  // lcinfo.qci = bearer.qci;
424  // lcinfo.isGbr = bearer.IsGbr ();
425  // lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl;
426  // lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl;
427  // lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl;
428  // lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl;
429  // use a for cycle to send the AddLc to the appropriate Mac Sap
430  // if the sap is not initialized the appropriated method has to be called
431  std::vector<LteCcmRrcSapProvider::LcsConfig>::iterator itLcOnCcMapping = lcOnCcMapping.begin ();
432  NS_ASSERT_MSG (itLcOnCcMapping != lcOnCcMapping.end (), "Problem");
433  for (itLcOnCcMapping = lcOnCcMapping.begin (); itLcOnCcMapping != lcOnCcMapping.end (); ++itLcOnCcMapping)
434  {
435  NS_LOG_DEBUG (this << " RNTI " << itLcOnCcMapping->lc.rnti << "Lcid " << (uint16_t) itLcOnCcMapping->lc.lcId << " lcGroup " << (uint16_t) itLcOnCcMapping->lc.lcGroup << " ComponentCarrierId " << itLcOnCcMapping->componentCarrierId);
436  uint8_t index = itLcOnCcMapping->componentCarrierId;
437  LteEnbCmacSapProvider::LcInfo lcinfo = itLcOnCcMapping->lc;
438  LteMacSapUser *msu = itLcOnCcMapping->msu;
439  m_rrc->m_cmacSapProvider.at (index)->AddLc (lcinfo, msu);
440  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, msu);
441  }
442 
443  if (rlcTypeId == LteRlcAm::GetTypeId ())
444  {
445  drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM;
446  }
447  else
448  {
449  drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL;
450  }
451 
452  drbInfo->m_logicalChannelIdentity = lcid;
453  drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (bearer);
454  drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannelGroup (bearer);
455  if (bearer.IsGbr ())
456  {
457  drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo.gbrUl;
458  }
459  else
460  {
461  drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0;
462  }
463  drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000;
464 
466 }
467 
468 void
470 {
471  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
472  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
473  it != m_drbMap.end ();
474  ++it)
475  {
476  m_drbsToBeStarted.push_back (it->first);
477  }
478 }
479 
480 void
482 {
483  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
484  for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin ();
485  drbIdIt != m_drbsToBeStarted.end ();
486  ++drbIdIt)
487  {
488  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (*drbIdIt);
489  NS_ASSERT (drbIt != m_drbMap.end ());
490  drbIt->second->m_rlc->Initialize ();
491  if (drbIt->second->m_pdcp)
492  {
493  drbIt->second->m_pdcp->Initialize ();
494  }
495  }
496  m_drbsToBeStarted.clear ();
497 }
498 
499 
500 void
502 {
503  NS_LOG_FUNCTION (this << (uint32_t) m_rnti << (uint32_t) drbid);
504  uint8_t lcid = Drbid2Lcid (drbid);
505  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
506  NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid);
507 
508  // first delete eventual X2-U TEIDs
509  m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid);
510 
511  m_drbMap.erase (it);
512  std::vector<uint8_t> ccToRelease = m_rrc->m_ccmRrcSapProvider->ReleaseDataRadioBearer (m_rnti, lcid);
513  std::vector<uint8_t>::iterator itCcToRelease = ccToRelease.begin ();
514  NS_ASSERT_MSG (itCcToRelease != ccToRelease.end (), "request to remove radio bearer with unknown drbid (ComponentCarrierManager)");
515  for (itCcToRelease = ccToRelease.begin (); itCcToRelease != ccToRelease.end (); ++itCcToRelease)
516  {
517  m_rrc->m_cmacSapProvider.at (*itCcToRelease)->ReleaseLc (m_rnti, lcid);
518  }
520  rrcd.havePhysicalConfigDedicated = false;
521  rrcd.drbToReleaseList.push_back (drbid);
522  //populating RadioResourceConfigDedicated information element as per 3GPP TS 36.331 version 9.2.0
523  rrcd.havePhysicalConfigDedicated = true;
525 
526  //populating RRCConnectionReconfiguration message as per 3GPP TS 36.331 version 9.2.0 Release 9
528  msg.haveMeasConfig = false;
529  msg.haveMobilityControlInfo = false;
530  msg.radioResourceConfigDedicated = rrcd;
532  // ToDo: Resend in eny case this configuration
533  // needs to be initialized
534  msg.haveNonCriticalExtension = false;
535  //RRC Connection Reconfiguration towards UE
536  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg);
537 }
538 
539 void
540 LteEnbRrc::DoSendReleaseDataRadioBearer (uint64_t imsi, uint16_t rnti, uint8_t bearerId)
541 {
542  Ptr<UeManager> ueManager = GetUeManager (rnti);
543  // Bearer de-activation towards UE
544  ueManager->ReleaseDataRadioBearer (bearerId);
545  // Bearer de-activation indication towards epc-enb application
546  m_s1SapProvider->DoSendReleaseIndication (imsi,rnti,bearerId);
547 }
548 
549 void
551 {
552  NS_LOG_FUNCTION (this);
553  switch (m_state)
554  {
556  case CONNECTION_SETUP:
560  case HANDOVER_JOINING:
561  case HANDOVER_LEAVING:
562  // a previous reconfiguration still ongoing, we need to wait for it to be finished
564  break;
565 
566  case CONNECTED_NORMALLY:
567  {
570  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg);
573  }
574  break;
575 
576  default:
577  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
578  break;
579  }
580 }
581 
582 void
583 UeManager::PrepareHandover (uint16_t cellId)
584 {
585  NS_LOG_FUNCTION (this << cellId);
586  switch (m_state)
587  {
588  case CONNECTED_NORMALLY:
589  {
590  m_targetCellId = cellId;
592  params.oldEnbUeX2apId = m_rnti;
594  params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
595  params.targetCellId = cellId;
596  params.mmeUeS1apId = m_imsi;
597  params.ueAggregateMaxBitRateDownlink = 200 * 1000;
598  params.ueAggregateMaxBitRateUplink = 100 * 1000;
599  params.bearers = GetErabList ();
600 
603  hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn;
604  hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig;
608  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity;
610  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIndication;
611  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIdentity;
612  LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->GetRachConfig ();
618  params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInformation (hpi);
619 
620  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
621  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
622  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
623  NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId);
624  NS_LOG_LOGIC ("rrcContext = " << params.rrcContext);
625 
626  m_rrc->m_x2SapProvider->SendHandoverRequest (params);
628  }
629  break;
630 
631  default:
632  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
633  break;
634  }
635 
636 }
637 
638 void
640 {
641  NS_LOG_FUNCTION (this);
642 
643  NS_ASSERT_MSG (params.notAdmittedBearers.empty (), "not admission of some bearers upon handover is not supported");
644  NS_ASSERT_MSG (params.admittedBearers.size () == m_drbMap.size (), "not enough bearers in admittedBearers");
645 
646  // note: the Handover command from the target eNB to the source eNB
647  // is expected to be sent transparently to the UE; however, here we
648  // decode the message and eventually re-encode it. This way we can
649  // support both a real RRC protocol implementation and an ideal one
650  // without actual RRC protocol encoding.
651 
652  Ptr<Packet> encodedHandoverCommand = params.rrcContext;
653  LteRrcSap::RrcConnectionReconfiguration handoverCommand = m_rrc->m_rrcSapUser->DecodeHandoverCommand (encodedHandoverCommand);
654  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, handoverCommand);
656  m_handoverLeavingTimeout = Simulator::Schedule (m_rrc->m_handoverLeavingTimeoutDuration,
658  m_rrc, m_rnti);
659  NS_ASSERT (handoverCommand.haveMobilityControlInfo);
660  m_rrc->m_handoverStartTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, handoverCommand.mobilityControlInfo.targetPhysCellId);
661 
663  sst.oldEnbUeX2apId = params.oldEnbUeX2apId;
664  sst.newEnbUeX2apId = params.newEnbUeX2apId;
665  sst.sourceCellId = params.sourceCellId;
666  sst.targetCellId = params.targetCellId;
667  for ( std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.begin ();
668  drbIt != m_drbMap.end ();
669  ++drbIt)
670  {
671  // SN status transfer is only for AM RLC
672  if (0 != drbIt->second->m_rlc->GetObject<LteRlcAm> ())
673  {
674  LtePdcp::Status status = drbIt->second->m_pdcp->GetStatus ();
676  i.dlPdcpSn = status.txSn;
677  i.ulPdcpSn = status.rxSn;
678  sst.erabsSubjectToStatusTransferList.push_back (i);
679  }
680  }
681  m_rrc->m_x2SapProvider->SendSnStatusTransfer (sst);
682 }
683 
684 
687 {
688  NS_LOG_FUNCTION (this);
690 }
691 
694 {
695  NS_LOG_FUNCTION (this);
697 }
698 
699 void
701 {
702  NS_LOG_FUNCTION (this << p << (uint16_t) bid);
703  switch (m_state)
704  {
706  case CONNECTION_SETUP:
707  NS_LOG_WARN ("not connected, discarding packet");
708  return;
709  break;
710 
711  case CONNECTED_NORMALLY:
715  case HANDOVER_JOINING:
717  {
718  NS_LOG_LOGIC ("queueing data on PDCP for transmission over the air");
720  params.pdcpSdu = p;
721  params.rnti = m_rnti;
722  params.lcid = Bid2Lcid (bid);
723  uint8_t drbid = Bid2Drbid (bid);
724  //Transmit PDCP sdu only if DRB ID found in drbMap
725  std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
726  if (it != m_drbMap.end ())
727  {
729  if (bearerInfo != NULL)
730  {
731  LtePdcpSapProvider* pdcpSapProvider = bearerInfo->m_pdcp->GetLtePdcpSapProvider ();
732  pdcpSapProvider->TransmitPdcpSdu (params);
733  }
734  }
735  }
736  break;
737 
738  case HANDOVER_LEAVING:
739  {
740  NS_LOG_LOGIC ("forwarding data to target eNB over X2-U");
741  uint8_t drbid = Bid2Drbid (bid);
742  EpcX2Sap::UeDataParams params;
743  params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
744  params.targetCellId = m_targetCellId;
745  params.gtpTeid = GetDataRadioBearerInfo (drbid)->m_gtpTeid;
746  params.ueData = p;
747  m_rrc->m_x2SapProvider->SendUeData (params);
748  }
749  break;
750 
751  default:
752  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
753  break;
754  }
755 }
756 
757 std::vector<EpcX2Sap::ErabToBeSetupItem>
759 {
760  NS_LOG_FUNCTION (this);
761  std::vector<EpcX2Sap::ErabToBeSetupItem> ret;
762  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
763  it != m_drbMap.end ();
764  ++it)
765  {
767  etbsi.erabId = it->second->m_epsBearerIdentity;
768  etbsi.erabLevelQosParameters = it->second->m_epsBearer;
769  etbsi.dlForwarding = false;
770  etbsi.transportLayerAddress = it->second->m_transportLayerAddress;
771  etbsi.gtpTeid = it->second->m_gtpTeid;
772  ret.push_back (etbsi);
773  }
774  return ret;
775 }
776 
777 void
779 {
780  NS_LOG_FUNCTION (this);
781  switch (m_state)
782  {
784  NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB");
785  EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams;
786  ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId;
787  ueCtxReleaseParams.newEnbUeX2apId = m_rnti;
788  ueCtxReleaseParams.sourceCellId = m_sourceCellId;
789  ueCtxReleaseParams.targetCellId = m_targetCellId;
790  m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams);
792  m_rrc->m_handoverEndOkTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
793  break;
794 
795  default:
796  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
797  break;
798  }
799 }
800 
801 void
803 {
804  NS_LOG_FUNCTION (this << cellId);
805  switch (m_state)
806  {
808  NS_ASSERT (cellId == m_targetCellId);
809  NS_LOG_INFO ("target eNB sent HO preparation failure, aborting HO");
811  break;
812 
813  default:
814  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
815  break;
816  }
817 }
818 
819 void
821 {
822  NS_LOG_FUNCTION (this);
823  for (std::vector<EpcX2Sap::ErabsSubjectToStatusTransferItem>::iterator erabIt
824  = params.erabsSubjectToStatusTransferList.begin ();
825  erabIt != params.erabsSubjectToStatusTransferList.end ();
826  ++erabIt)
827  {
828  // LtePdcp::Status status;
829  // status.txSn = erabIt->dlPdcpSn;
830  // status.rxSn = erabIt->ulPdcpSn;
831  // uint8_t drbId = Bid2Drbid (erabIt->erabId);
832  // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (drbId);
833  // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (uint32_t) drbId);
834  // drbIt->second->m_pdcp->SetStatus (status);
835  }
836 }
837 
838 void
840 {
841  NS_LOG_FUNCTION (this);
842  NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << ToString (m_state));
844 }
845 
846 
847 // methods forwarded from RRC SAP
848 
849 void
851 {
852  NS_LOG_FUNCTION (this);
853  m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser);
854  m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser);
855 }
856 
857 void
859 {
860  NS_LOG_FUNCTION (this);
861  switch (m_state)
862  {
864  {
866 
867  if (m_rrc->m_admitRrcConnectionRequest == true)
868  {
869  m_imsi = msg.ueIdentity;
870  if (m_rrc->m_s1SapProvider != 0)
871  {
872  m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti);
873  }
874 
875  // send RRC CONNECTION SETUP to UE
879  m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2);
880 
883  m_rrc->m_connectionSetupTimeoutDuration,
886  }
887  else
888  {
889  NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti);
890 
891  // send RRC CONNECTION REJECT to UE
893  rejectMsg.waitTime = 3;
894  m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg);
895 
897  m_rrc->m_connectionRejectedTimeoutDuration,
900  }
901  }
902  break;
903 
904  default:
905  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
906  break;
907  }
908 }
909 
910 void
912 {
913  NS_LOG_FUNCTION (this);
914  switch (m_state)
915  {
916  case CONNECTION_SETUP:
918  if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers > 1)
919  {
920  m_pendingRrcConnectionReconfiguration = true; // Force Reconfiguration
922  }
923  else
924  {
927  }
929  m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
930  break;
931 
932  default:
933  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
934  break;
935  }
936 }
937 
938 void
940 {
941  NS_LOG_FUNCTION (this);
942  switch (m_state)
943  {
947  {
948  // configure MAC (and scheduler)
950  req.m_rnti = m_rnti;
952  for (uint8_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
953  {
954  m_rrc->m_cmacSapProvider.at (i)->UeUpdateConfigurationReq (req);
955 
956  // configure PHY
957  m_rrc->m_cphySapProvider.at (i)->SetTransmissionMode (req.m_rnti, req.m_transmissionMode);
959  m_rrc->m_cphySapProvider.at (i)->SetPa (m_rnti, paDouble);
960  }
961 
963  }
965  m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
966  break;
967 
968  // This case is added to NS-3 in order to handle bearer de-activation scenario for CONNECTED state UE
969  case CONNECTED_NORMALLY:
970  NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state " << ToString (m_state));
971  break;
972 
973  case HANDOVER_LEAVING:
974  NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state " << ToString (m_state));
975  break;
976 
977  case HANDOVER_JOINING:
978  {
980  NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME");
982  params.rnti = m_rnti;
983  params.cellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
984  params.mmeUeS1Id = m_imsi;
986  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
987  it != m_drbMap.end ();
988  ++it)
989  {
991  b.epsBearerId = it->second->m_epsBearerIdentity;
992  b.teid = it->second->m_gtpTeid;
993  params.bearersToBeSwitched.push_back (b);
994  }
995  m_rrc->m_s1SapProvider->PathSwitchRequest (params);
996  }
997  break;
998 
999  default:
1000  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
1001  break;
1002  }
1003 }
1004 
1005 void
1007 {
1008  NS_LOG_FUNCTION (this);
1009  switch (m_state)
1010  {
1011  case CONNECTED_NORMALLY:
1012  break;
1013 
1014  case HANDOVER_LEAVING:
1016  break;
1017 
1018  default:
1019  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
1020  break;
1021  }
1022 
1026  m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2);
1028 }
1029 
1030 void
1032 {
1033  NS_LOG_FUNCTION (this);
1035 }
1036 
1037 void
1039 {
1040  uint8_t measId = msg.measResults.measId;
1041  NS_LOG_FUNCTION (this << (uint16_t) measId);
1042  NS_LOG_LOGIC ("measId " << (uint16_t) measId
1043  << " haveMeasResultNeighCells " << msg.measResults.haveMeasResultNeighCells
1044  << " measResultListEutra " << msg.measResults.measResultListEutra.size ()
1045  << " haveScellsMeas " << msg.measResults.haveScellsMeas
1046  << " measScellResultList " << msg.measResults.measScellResultList.measResultScell.size ());
1047  NS_LOG_LOGIC ("serving cellId " << m_rrc->ComponentCarrierToCellId (m_componentCarrierId)
1048  << " RSRP " << (uint16_t) msg.measResults.rsrpResult
1049  << " RSRQ " << (uint16_t) msg.measResults.rsrqResult);
1050 
1051  for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.measResultListEutra.begin ();
1052  it != msg.measResults.measResultListEutra.end ();
1053  ++it)
1054  {
1055  NS_LOG_LOGIC ("neighbour cellId " << it->physCellId
1056  << " RSRP " << (it->haveRsrpResult ? (uint16_t) it->rsrpResult : 255)
1057  << " RSRQ " << (it->haveRsrqResult ? (uint16_t) it->rsrqResult : 255));
1058  }
1059 
1060  if ((m_rrc->m_handoverManagementSapProvider != 0)
1061  && (m_rrc->m_handoverMeasIds.find (measId) != m_rrc->m_handoverMeasIds.end ()))
1062  {
1063  // this measurement was requested by the handover algorithm
1064  m_rrc->m_handoverManagementSapProvider->ReportUeMeas (m_rnti,
1065  msg.measResults);
1066  }
1067 
1068  if ((m_rrc->m_ccmRrcSapProvider != 0)
1069  && (m_rrc->m_componentCarrierMeasIds.find (measId) != m_rrc->m_componentCarrierMeasIds.end ()))
1070  {
1071  // this measurement was requested by the handover algorithm
1072  m_rrc->m_ccmRrcSapProvider->ReportUeMeas (m_rnti,
1073  msg.measResults);
1074  }
1075 
1076  if ((m_rrc->m_anrSapProvider != 0)
1077  && (m_rrc->m_anrMeasIds.find (measId) != m_rrc->m_anrMeasIds.end ()))
1078  {
1079  // this measurement was requested by the ANR function
1080  m_rrc->m_anrSapProvider->ReportUeMeas (msg.measResults);
1081  }
1082 
1083  if ((m_rrc->m_ffrRrcSapProvider.at (0) != 0)
1084  && (m_rrc->m_ffrMeasIds.find (measId) != m_rrc->m_ffrMeasIds.end ()))
1085  {
1086  // this measurement was requested by the FFR function
1087  m_rrc->m_ffrRrcSapProvider.at (0)->ReportUeMeas (m_rnti, msg.measResults);
1088  }
1089  if (msg.measResults.haveScellsMeas == true)
1090  {
1091  for (std::list <LteRrcSap::MeasResultScell>::iterator it = msg.measResults.measScellResultList.measResultScell.begin ();
1093  ++it)
1094  {
1095  m_rrc->m_ffrRrcSapProvider.at (it->servFreqId)->ReportUeMeas (m_rnti, msg.measResults);
1098  }
1099  }
1100 
1102  m_rrc->m_ccmRrcSapProvider->ReportUeMeas (m_rnti, msg.measResults);
1103  // fire a trace source
1104  m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, msg);
1105 
1106 } // end of UeManager::RecvMeasurementReport
1107 
1108 
1109 // methods forwarded from CMAC SAP
1110 
1111 void
1113 {
1114  NS_LOG_FUNCTION (this << m_rnti);
1115  // at this stage used only by the scheduler for updating txMode
1116 
1118 
1120 
1121  // reconfigure the UE RRC
1123 }
1124 
1125 
1126 // methods forwarded from PDCP SAP
1127 
1128 void
1130 {
1131  NS_LOG_FUNCTION (this);
1132  if (params.lcid > 2)
1133  {
1134  // data radio bearer
1135  EpsBearerTag tag;
1136  tag.SetRnti (params.rnti);
1137  tag.SetBid (Lcid2Bid (params.lcid));
1138  params.pdcpSdu->AddPacketTag (tag);
1139  m_rrc->m_forwardUpCallback (params.pdcpSdu);
1140  }
1141 }
1142 
1143 
1144 uint16_t
1146 {
1147  return m_rnti;
1148 }
1149 
1150 uint64_t
1152 {
1153  return m_imsi;
1154 }
1155 
1156 uint8_t
1158 {
1159  return m_componentCarrierId;
1160 }
1161 
1162 uint16_t
1164 {
1166 }
1167 
1168 void
1170 {
1171  NS_LOG_FUNCTION (this);
1173  for (uint16_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
1174  {
1175  m_rrc->m_cphySapProvider.at (i)->SetSrsConfigurationIndex (m_rnti, srsConfIndex);
1176  }
1177  switch (m_state)
1178  {
1179  case INITIAL_RANDOM_ACCESS:
1180  // do nothing, srs conf index will be correctly enforced upon
1181  // RRC connection establishment
1182  break;
1183 
1184  default:
1186  break;
1187  }
1188 }
1189 
1192 {
1193  return m_state;
1194 }
1195 
1196 void
1198 {
1199  NS_LOG_FUNCTION (this);
1200  m_physicalConfigDedicated.pdschConfigDedicated = pdschConfigDedicated;
1201 
1203 
1204  // reconfigure the UE RRC
1206 }
1207 
1208 uint8_t
1210 {
1211  NS_LOG_FUNCTION (this);
1212  const uint8_t MAX_DRB_ID = 32;
1213  for (int drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;
1214  drbid != m_lastAllocatedDrbid;
1215  drbid = (drbid + 1) % MAX_DRB_ID)
1216  {
1217  if (drbid != 0) // 0 is not allowed
1218  {
1219  if (m_drbMap.find (drbid) == m_drbMap.end ())
1220  {
1221  m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (drbid, drbInfo));
1222  drbInfo->m_drbIdentity = drbid;
1223  m_lastAllocatedDrbid = drbid;
1224  return drbid;
1225  }
1226  }
1227  }
1228  NS_FATAL_ERROR ("no more data radio bearer ids available");
1229  return 0;
1230 }
1231 
1234 {
1235  NS_LOG_FUNCTION (this << (uint32_t) drbid);
1236  NS_ASSERT (0 != drbid);
1237  std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
1238  NS_ABORT_IF (it == m_drbMap.end ());
1239  return it->second;
1240 }
1241 
1242 
1243 void
1245 {
1246  NS_LOG_FUNCTION (this << (uint32_t) drbid);
1247  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
1248  NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid);
1249  m_drbMap.erase (it);
1250 }
1251 
1252 
1255 {
1256  NS_LOG_FUNCTION (this);
1261  msg.haveMobilityControlInfo = false;
1262  msg.haveMeasConfig = true;
1263  msg.measConfig = m_rrc->m_ueMeasConfig;
1264  if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers > 1)
1265  {
1266  m_caSupportConfigured = true;
1267  NS_LOG_FUNCTION ( this << "CA not configured. Configure now!" );
1268  msg.haveNonCriticalExtension = true;
1270  NS_LOG_FUNCTION ( this << " haveNonCriticalExtension " << msg.haveNonCriticalExtension );
1271  }
1272  else
1273  {
1274  msg.haveNonCriticalExtension = false;
1275  }
1276 
1277  return msg;
1278 }
1279 
1282 {
1284 
1285  if (m_srb1 != 0)
1286  {
1288  stam.srbIdentity = m_srb1->m_srbIdentity;
1289  stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig;
1290  rrcd.srbToAddModList.push_back (stam);
1291  }
1292 
1293  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
1294  it != m_drbMap.end ();
1295  ++it)
1296  {
1298  dtam.epsBearerIdentity = it->second->m_epsBearerIdentity;
1299  dtam.drbIdentity = it->second->m_drbIdentity;
1300  dtam.rlcConfig = it->second->m_rlcConfig;
1301  dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity;
1302  dtam.logicalChannelConfig = it->second->m_logicalChannelConfig;
1303  rrcd.drbToAddModList.push_back (dtam);
1304  }
1305 
1306  rrcd.havePhysicalConfigDedicated = true;
1308  return rrcd;
1309 }
1310 
1311 uint8_t
1313 {
1317 }
1318 
1319 uint8_t
1321 {
1322  NS_ASSERT (lcid > 2);
1323  return lcid - 2;
1324 }
1325 
1326 uint8_t
1327 UeManager::Drbid2Lcid (uint8_t drbid)
1328 {
1329  return drbid + 2;
1330 }
1331 uint8_t
1332 UeManager::Lcid2Bid (uint8_t lcid)
1333 {
1334  NS_ASSERT (lcid > 2);
1335  return lcid - 2;
1336 }
1337 
1338 uint8_t
1339 UeManager::Bid2Lcid (uint8_t bid)
1340 {
1341  return bid + 2;
1342 }
1343 
1344 uint8_t
1345 UeManager::Drbid2Bid (uint8_t drbid)
1346 {
1347  return drbid;
1348 }
1349 
1350 uint8_t
1352 {
1353  return bid;
1354 }
1355 
1356 
1357 void
1359 {
1360  NS_LOG_FUNCTION (this << ToString (newState));
1361  State oldState = m_state;
1362  m_state = newState;
1363  NS_LOG_INFO (this << " IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager "
1364  << ToString (oldState) << " --> " << ToString (newState));
1365  m_stateTransitionTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, oldState, newState);
1366 
1367  switch (newState)
1368  {
1369  case INITIAL_RANDOM_ACCESS:
1370  case HANDOVER_JOINING:
1371  NS_FATAL_ERROR ("cannot switch to an initial state");
1372  break;
1373 
1374  case CONNECTION_SETUP:
1375  break;
1376 
1377  case CONNECTED_NORMALLY:
1378  {
1380  {
1382  }
1384  {
1386  }
1387  }
1388  break;
1389 
1391  break;
1392 
1394  break;
1395 
1396  case HANDOVER_LEAVING:
1397  break;
1398 
1399  default:
1400  break;
1401  }
1402 }
1403 
1406 {
1407  NS_LOG_FUNCTION ( this );
1409 
1410  // LteRrcSap::SCellToAddMod scell;
1411  std::list<LteRrcSap::SCellToAddMod> SccCon;
1412 
1413  // sCellToReleaseList is always empty since no Scc is released
1414 
1415  for (auto &it: m_rrc->m_componentCarrierPhyConf)
1416  {
1417  uint8_t ccId = it.first;
1418 
1419  if (ccId == m_componentCarrierId)
1420  {
1421  // Skip primary CC.
1422  continue;
1423  }
1424  else if (ccId < m_componentCarrierId)
1425  {
1426  // Shift all IDs below PCC forward so PCC can use CC ID 1.
1427  ccId++;
1428  }
1429 
1430  Ptr<ComponentCarrierEnb> eNbCcm = it.second;
1431  LteRrcSap::SCellToAddMod component;
1432  component.sCellIndex = ccId;
1433  component.cellIdentification.physCellId = eNbCcm->GetCellId ();
1434  component.cellIdentification.dlCarrierFreq = eNbCcm->GetDlEarfcn ();
1436  component.radioResourceConfigCommonSCell.nonUlConfiguration.dlBandwidth = eNbCcm->GetDlBandwidth ();
1438  component.radioResourceConfigCommonSCell.nonUlConfiguration.pdschConfigCommon.referenceSignalPower = m_rrc->m_cphySapProvider.at (0)->GetReferenceSignalPower ();
1441  component.radioResourceConfigCommonSCell.ulConfiguration.ulFreqInfo.ulCarrierFreq = eNbCcm->GetUlEarfcn ();
1442  component.radioResourceConfigCommonSCell.ulConfiguration.ulFreqInfo.ulBandwidth = eNbCcm->GetUlBandwidth ();
1444  //component.radioResourceConfigCommonSCell.ulConfiguration.soundingRsUlConfigCommon.type = LteRrcSap::SoundingRsUlConfigDedicated::SETUP;
1448 
1449  if (true)
1450  {
1451  component.haveRadioResourceConfigDedicatedSCell = true;
1467  }
1468  else
1469  {
1470  component.haveRadioResourceConfigDedicatedSCell = false;
1471  }
1472  SccCon.push_back (component);
1473  }
1474  ncec.sCellsToAddModList = SccCon;
1475 
1476  return ncec;
1477 }
1478 
1479 
1481 // eNB RRC methods
1483 
1485 
1487  : m_x2SapProvider (0),
1488  m_cmacSapProvider (0),
1489  m_handoverManagementSapProvider (0),
1490  m_ccmRrcSapProvider (0),
1491  m_anrSapProvider (0),
1492  m_ffrRrcSapProvider (0),
1493  m_rrcSapUser (0),
1494  m_macSapProvider (0),
1495  m_s1SapProvider (0),
1496  m_cphySapProvider (0),
1497  m_configured (false),
1498  m_lastAllocatedRnti (0),
1499  m_srsCurrentPeriodicityId (0),
1500  m_lastAllocatedConfigurationIndex (0),
1501  m_reconfigureUes (false),
1502  m_numberOfComponentCarriers (0),
1503  m_carriersConfigured (false)
1504 {
1505  NS_LOG_FUNCTION (this);
1506  m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, 0));
1509  m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this));
1513  m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this));
1515  m_cphySapProvider.push_back (0);
1516  m_cmacSapProvider.push_back (0);
1517  m_ffrRrcSapProvider.push_back (0);
1518 }
1519 
1520 void
1522 {
1523  NS_ASSERT_MSG (!m_carriersConfigured, "Secondary carriers can be configured only once.");
1524  m_componentCarrierPhyConf = ccPhyConf;
1525  m_numberOfComponentCarriers = ccPhyConf.size ();
1526 
1528 
1529  for (uint8_t i = 1; i < m_numberOfComponentCarriers; i++)
1530  {
1531  m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this));
1532  m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, i));
1533  m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this));
1534  m_cphySapProvider.push_back (0);
1535  m_cmacSapProvider.push_back (0);
1536  m_ffrRrcSapProvider.push_back (0);
1537  }
1538  m_carriersConfigured = true;
1540 }
1541 
1543 {
1544  NS_LOG_FUNCTION (this);
1545 }
1546 
1547 
1548 void
1550 {
1551  NS_LOG_FUNCTION (this);
1552  for ( uint8_t i = 0; i < m_numberOfComponentCarriers ; i++)
1553  {
1554  delete m_cphySapUser[i];
1555  delete m_cmacSapUser[i];
1556  delete m_ffrRrcSapUser[i];
1557  }
1558  //delete m_cphySapUser;
1559  m_cphySapUser.erase (m_cphySapUser.begin (),m_cphySapUser.end ());
1560  m_cphySapUser.clear ();
1561  //delete m_cmacSapUser;
1562  m_cmacSapUser.erase (m_cmacSapUser.begin (),m_cmacSapUser.end ());
1563  m_cmacSapUser.clear ();
1564  //delete m_ffrRrcSapUser;
1565  m_ffrRrcSapUser.erase (m_ffrRrcSapUser.begin (),m_ffrRrcSapUser.end ());
1566  m_ffrRrcSapUser.clear ();
1567  m_ueMap.clear ();
1569  delete m_ccmRrcSapUser;
1570  delete m_anrSapUser;
1571  delete m_rrcSapProvider;
1572  delete m_x2SapUser;
1573  delete m_s1SapUser;
1574 
1575 }
1576 
1577 TypeId
1579 {
1580  NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId");
1581  static TypeId tid = TypeId ("ns3::LteEnbRrc")
1582  .SetParent<Object> ()
1583  .SetGroupName("Lte")
1584  .AddConstructor<LteEnbRrc> ()
1585  .AddAttribute ("UeMap", "List of UeManager by C-RNTI.",
1586  ObjectMapValue (),
1588  MakeObjectMapChecker<UeManager> ())
1589  .AddAttribute ("DefaultTransmissionMode",
1590  "The default UEs' transmission mode (0: SISO)",
1591  UintegerValue (0), // default tx-mode
1593  MakeUintegerChecker<uint8_t> ())
1594  .AddAttribute ("EpsBearerToRlcMapping",
1595  "Specify which type of RLC will be used for each type of EPS bearer. ",
1598  MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways",
1599  RLC_UM_ALWAYS, "RlcUmAlways",
1600  RLC_AM_ALWAYS, "RlcAmAlways",
1601  PER_BASED, "PacketErrorRateBased"))
1602  .AddAttribute ("SystemInformationPeriodicity",
1603  "The interval for sending system information (Time value)",
1604  TimeValue (MilliSeconds (80)),
1606  MakeTimeChecker ())
1607 
1608  // SRS related attributes
1609  .AddAttribute ("SrsPeriodicity",
1610  "The SRS periodicity in milliseconds",
1611  UintegerValue (40),
1614  MakeUintegerChecker<uint32_t> ())
1615 
1616  // Timeout related attributes
1617  .AddAttribute ("ConnectionRequestTimeoutDuration",
1618  "After a RA attempt, if no RRC CONNECTION REQUEST is "
1619  "received before this time, the UE context is destroyed. "
1620  "Must account for reception of RAR and transmission of "
1621  "RRC CONNECTION REQUEST over UL GRANT.",
1622  TimeValue (MilliSeconds (15)),
1624  MakeTimeChecker ())
1625  .AddAttribute ("ConnectionSetupTimeoutDuration",
1626  "After accepting connection request, if no RRC CONNECTION "
1627  "SETUP COMPLETE is received before this time, the UE "
1628  "context is destroyed. Must account for the UE's reception "
1629  "of RRC CONNECTION SETUP and transmission of RRC CONNECTION "
1630  "SETUP COMPLETE.",
1631  TimeValue (MilliSeconds (150)),
1633  MakeTimeChecker ())
1634  .AddAttribute ("ConnectionRejectedTimeoutDuration",
1635  "Time to wait between sending a RRC CONNECTION REJECT and "
1636  "destroying the UE context",
1637  TimeValue (MilliSeconds (30)),
1639  MakeTimeChecker ())
1640  .AddAttribute ("HandoverJoiningTimeoutDuration",
1641  "After accepting a handover request, if no RRC CONNECTION "
1642  "RECONFIGURATION COMPLETE is received before this time, the "
1643  "UE context is destroyed. Must account for reception of "
1644  "X2 HO REQ ACK by source eNB, transmission of the Handover "
1645  "Command, non-contention-based random access and reception "
1646  "of the RRC CONNECTION RECONFIGURATION COMPLETE message.",
1647  TimeValue (MilliSeconds (200)),
1649  MakeTimeChecker ())
1650  .AddAttribute ("HandoverLeavingTimeoutDuration",
1651  "After issuing a Handover Command, if neither RRC "
1652  "CONNECTION RE-ESTABLISHMENT nor X2 UE Context Release has "
1653  "been previously received, the UE context is destroyed.",
1654  TimeValue (MilliSeconds (500)),
1656  MakeTimeChecker ())
1657 
1658  // Cell selection related attribute
1659  .AddAttribute ("QRxLevMin",
1660  "One of information transmitted within the SIB1 message, "
1661  "indicating the required minimum RSRP level that any UE must "
1662  "receive from this cell before it is allowed to camp to this "
1663  "cell. The default value -70 corresponds to -140 dBm and is "
1664  "the lowest possible value as defined by Section 6.3.4 of "
1665  "3GPP TS 36.133. This restriction, however, only applies to "
1666  "initial cell selection and EPC-enabled simulation.",
1668  IntegerValue (-70),
1670  MakeIntegerChecker<int8_t> (-70, -22))
1671  .AddAttribute ("NumberOfComponentCarriers",
1672  "Number of Component Carriers ",
1673  UintegerValue (1),
1675  MakeIntegerChecker<int16_t> (MIN_NO_CC, MAX_NO_CC))
1676 
1677  // Handover related attributes
1678  .AddAttribute ("AdmitHandoverRequest",
1679  "Whether to admit an X2 handover request from another eNB",
1680  BooleanValue (true),
1682  MakeBooleanChecker ())
1683  .AddAttribute ("AdmitRrcConnectionRequest",
1684  "Whether to admit a connection request from a UE",
1685  BooleanValue (true),
1687  MakeBooleanChecker ())
1688 
1689  // UE measurements related attributes
1690  .AddAttribute ("RsrpFilterCoefficient",
1691  "Determines the strength of smoothing effect induced by "
1692  "layer 3 filtering of RSRP in all attached UE; "
1693  "if set to 0, no layer 3 filtering is applicable",
1694  // i.e. the variable k in 3GPP TS 36.331 section 5.5.3.2
1695  UintegerValue (4),
1697  MakeUintegerChecker<uint8_t> (0))
1698  .AddAttribute ("RsrqFilterCoefficient",
1699  "Determines the strength of smoothing effect induced by "
1700  "layer 3 filtering of RSRQ in all attached UE; "
1701  "if set to 0, no layer 3 filtering is applicable",
1702  // i.e. the variable k in 3GPP TS 36.331 section 5.5.3.2
1703  UintegerValue (4),
1705  MakeUintegerChecker<uint8_t> (0))
1706 
1707  // Trace sources
1708  .AddTraceSource ("NewUeContext",
1709  "Fired upon creation of a new UE context.",
1711  "ns3::LteEnbRrc::NewUeContextTracedCallback")
1712  .AddTraceSource ("ConnectionEstablished",
1713  "Fired upon successful RRC connection establishment.",
1715  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1716  .AddTraceSource ("ConnectionReconfiguration",
1717  "trace fired upon RRC connection reconfiguration",
1719  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1720  .AddTraceSource ("HandoverStart",
1721  "trace fired upon start of a handover procedure",
1723  "ns3::LteEnbRrc::HandoverStartTracedCallback")
1724  .AddTraceSource ("HandoverEndOk",
1725  "trace fired upon successful termination of a handover procedure",
1727  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1728  .AddTraceSource ("RecvMeasurementReport",
1729  "trace fired when measurement report is received",
1731  "ns3::LteEnbRrc::ReceiveReportTracedCallback")
1732  ;
1733  return tid;
1734 }
1735 
1736 void
1738 {
1739  NS_LOG_FUNCTION (this << s);
1740  m_x2SapProvider = s;
1741 }
1742 
1743 EpcX2SapUser*
1745 {
1746  NS_LOG_FUNCTION (this);
1747  return m_x2SapUser;
1748 }
1749 
1750 void
1752 {
1753  NS_LOG_FUNCTION (this << s);
1754  m_cmacSapProvider.at (0) = s;
1755 }
1756 
1757 void
1759 {
1760  NS_LOG_FUNCTION (this << s);
1761  m_cmacSapProvider.at (pos) = s;
1762 }
1763 
1766 {
1767  NS_LOG_FUNCTION (this);
1768  return m_cmacSapUser.at (0);
1769 }
1770 
1773 {
1774  NS_LOG_FUNCTION (this);
1775  return m_cmacSapUser.at (pos);
1776 }
1777 
1778 void
1780 {
1781  NS_LOG_FUNCTION (this << s);
1783 }
1784 
1787 {
1788  NS_LOG_FUNCTION (this);
1790 }
1791 
1792 void
1794 {
1795  NS_LOG_FUNCTION (this << s);
1796  m_ccmRrcSapProvider = s;
1797 }
1798 
1801 {
1802  NS_LOG_FUNCTION (this);
1803  return m_ccmRrcSapUser;
1804 }
1805 
1806 void
1808 {
1809  NS_LOG_FUNCTION (this << s);
1810  m_anrSapProvider = s;
1811 }
1812 
1815 {
1816  NS_LOG_FUNCTION (this);
1817  return m_anrSapUser;
1818 }
1819 
1820 void
1822 {
1823  NS_LOG_FUNCTION (this << s);
1824  m_ffrRrcSapProvider.at (0) = s;
1825 }
1826 
1827 void
1829 {
1830  NS_LOG_FUNCTION (this << s);
1831  m_ffrRrcSapProvider.at (index) = s;
1832 }
1833 
1836 {
1837  NS_LOG_FUNCTION (this);
1838  return m_ffrRrcSapUser.at (0);
1839 }
1840 
1843 {
1844  NS_LOG_FUNCTION (this);
1845  NS_ASSERT_MSG (index < m_numberOfComponentCarriers, "Invalid component carrier index:"<<index<<" provided in order to obtain FfrRrcSapUser.");
1846  return m_ffrRrcSapUser.at (index);
1847 }
1848 
1849 void
1851 {
1852  NS_LOG_FUNCTION (this << s);
1853  m_rrcSapUser = s;
1854 }
1855 
1858 {
1859  NS_LOG_FUNCTION (this);
1860  return m_rrcSapProvider;
1861 }
1862 
1863 void
1865 {
1866  NS_LOG_FUNCTION (this);
1867  m_macSapProvider = s;
1868 }
1869 
1870 void
1872 {
1873  m_s1SapProvider = s;
1874 }
1875 
1876 
1879 {
1880  return m_s1SapUser;
1881 }
1882 
1883 void
1885 {
1886  NS_LOG_FUNCTION (this << s);
1887  m_cphySapProvider.at(0) = s;
1888 }
1889 
1892 {
1893  NS_LOG_FUNCTION (this);
1894  return m_cphySapUser.at(0);
1895 }
1896 
1897 void
1899 {
1900  NS_LOG_FUNCTION (this << s);
1901  m_cphySapProvider.at(pos) = s;
1902 }
1903 
1906 {
1907  NS_LOG_FUNCTION (this);
1908  return m_cphySapUser.at(pos);
1909 }
1910 
1911 bool
1912 LteEnbRrc::HasUeManager (uint16_t rnti) const
1913 {
1914  NS_LOG_FUNCTION (this << (uint32_t) rnti);
1915  std::map<uint16_t, Ptr<UeManager> >::const_iterator it = m_ueMap.find (rnti);
1916  return (it != m_ueMap.end ());
1917 }
1918 
1921 {
1922  NS_LOG_FUNCTION (this << (uint32_t) rnti);
1923  NS_ASSERT (0 != rnti);
1924  std::map<uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti);
1925  NS_ASSERT_MSG (it != m_ueMap.end (), "UE manager for RNTI " << rnti << " not found");
1926  return it->second;
1927 }
1928 
1929 uint8_t
1931 {
1932  NS_LOG_FUNCTION (this);
1933 
1934  // SANITY CHECK
1935 
1937  "Measurement identities and reporting configuration should not have different quantity");
1938 
1939  if (Simulator::Now () != Seconds (0))
1940  {
1941  NS_FATAL_ERROR ("AddUeMeasReportConfig may not be called after the simulation has run");
1942  }
1943 
1944  // INPUT VALIDATION
1945 
1946  switch (config.triggerQuantity)
1947  {
1951  {
1952  NS_FATAL_ERROR ("The given triggerQuantity (RSRP) does not match with the given threshold2.choice");
1953  }
1954 
1960  {
1961  NS_FATAL_ERROR ("The given triggerQuantity (RSRP) does not match with the given threshold1.choice");
1962  }
1963  break;
1964 
1968  {
1969  NS_FATAL_ERROR ("The given triggerQuantity (RSRQ) does not match with the given threshold2.choice");
1970  }
1971 
1977  {
1978  NS_FATAL_ERROR ("The given triggerQuantity (RSRQ) does not match with the given threshold1.choice");
1979  }
1980  break;
1981 
1982  default:
1983  NS_FATAL_ERROR ("unsupported triggerQuantity");
1984  break;
1985  }
1986 
1988  {
1989  NS_FATAL_ERROR ("Only REPORT_STRONGEST_CELLS purpose is supported");
1990  }
1991 
1993  {
1994  NS_LOG_WARN ("reportQuantity = BOTH will be used instead of the given reportQuantity");
1995  }
1996 
1997  uint8_t nextId = m_ueMeasConfig.reportConfigToAddModList.size () + 1;
1998 
1999  // create the reporting configuration
2000  LteRrcSap::ReportConfigToAddMod reportConfig;
2001  reportConfig.reportConfigId = nextId;
2002  reportConfig.reportConfigEutra = config;
2003 
2004  // create the measurement identity
2006  measId.measId = nextId;
2007  measId.measObjectId = 1;
2008  measId.reportConfigId = nextId;
2009 
2010  // add both to the list of UE measurement configuration
2011  m_ueMeasConfig.reportConfigToAddModList.push_back (reportConfig);
2012  m_ueMeasConfig.measIdToAddModList.push_back (measId);
2013 
2014  return nextId;
2015 }
2016 
2017 void
2019 {
2020  auto it = ccPhyConf.begin ();
2021  NS_ASSERT (it != ccPhyConf.end ());
2022  uint8_t ulBandwidth = it->second->GetUlBandwidth ();
2023  uint8_t dlBandwidth = it->second->GetDlBandwidth ();
2024  uint32_t ulEarfcn = it->second->GetUlEarfcn ();
2025  uint32_t dlEarfcn = it->second->GetDlEarfcn ();
2026  NS_LOG_FUNCTION (this << (uint16_t) ulBandwidth << (uint16_t) dlBandwidth
2027  << ulEarfcn << dlEarfcn);
2029 
2030  for (const auto &it: ccPhyConf)
2031  {
2032  m_cphySapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2033  m_cphySapProvider.at (it.first)->SetEarfcn (it.second->GetUlEarfcn (), it.second->GetDlEarfcn ());
2034  m_cphySapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
2035  m_cmacSapProvider.at (it.first)->ConfigureMac (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2036  m_ffrRrcSapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
2037  m_ffrRrcSapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2038  }
2039 
2040  m_dlEarfcn = dlEarfcn;
2041  m_ulEarfcn = ulEarfcn;
2042  m_dlBandwidth = dlBandwidth;
2043  m_ulBandwidth = ulBandwidth;
2044 
2045  /*
2046  * Initializing the list of UE measurement configuration (m_ueMeasConfig).
2047  * Only intra-frequency measurements are supported, so only one measurement
2048  * object is created.
2049  */
2050 
2051  LteRrcSap::MeasObjectToAddMod measObject;
2052  measObject.measObjectId = 1;
2053  measObject.measObjectEutra.carrierFreq = m_dlEarfcn;
2055  measObject.measObjectEutra.presenceAntennaPort1 = false;
2056  measObject.measObjectEutra.neighCellConfig = 0;
2057  measObject.measObjectEutra.offsetFreq = 0;
2058  measObject.measObjectEutra.haveCellForWhichToReportCGI = false;
2059 
2060  m_ueMeasConfig.measObjectToAddModList.push_back (measObject);
2065  m_ueMeasConfig.haveSmeasure = false;
2067 
2068  m_sib1.clear ();
2069  m_sib1.reserve (ccPhyConf.size ());
2070  for (const auto &it: ccPhyConf)
2071  {
2072  // Enabling MIB transmission
2074  mib.dlBandwidth = it.second->GetDlBandwidth ();
2075  mib.systemFrameNumber = 0;
2076  m_cphySapProvider.at (it.first)->SetMasterInformationBlock (mib);
2077 
2078  // Enabling SIB1 transmission with default values
2080  sib1.cellAccessRelatedInfo.cellIdentity = it.second->GetCellId ();
2081  sib1.cellAccessRelatedInfo.csgIndication = false;
2084  sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value
2085  sib1.cellSelectionInfo.qRxLevMin = m_qRxLevMin; // set as minimum value
2086  m_sib1.push_back (sib1);
2087  m_cphySapProvider.at (it.first)->SetSystemInformationBlockType1 (sib1);
2088  }
2089  /*
2090  * Enabling transmission of other SIB. The first time System Information is
2091  * transmitted is arbitrarily assumed to be at +0.016s, and then it will be
2092  * regularly transmitted every 80 ms by default (set the
2093  * SystemInformationPeriodicity attribute to configure this).
2094  */
2096 
2097  m_configured = true;
2098 
2099 }
2100 
2101 
2102 void
2103 LteEnbRrc::SetCellId (uint16_t cellId)
2104 {
2105  // update SIB1
2106  m_sib1.at (0).cellAccessRelatedInfo.cellIdentity = cellId;
2107  m_cphySapProvider.at (0)->SetSystemInformationBlockType1 (m_sib1.at (0));
2108 }
2109 
2110 void
2111 LteEnbRrc::SetCellId (uint16_t cellId, uint8_t ccIndex)
2112 {
2113  // update SIB1
2114  m_sib1.at (ccIndex).cellAccessRelatedInfo.cellIdentity = cellId;
2115  m_cphySapProvider.at (ccIndex)->SetSystemInformationBlockType1 (m_sib1.at (ccIndex));
2116 }
2117 
2118 uint8_t
2120 {
2121  NS_LOG_FUNCTION (this << cellId);
2122  for (auto &it: m_componentCarrierPhyConf)
2123  {
2124  if (it.second->GetCellId () == cellId)
2125  {
2126  return it.first;
2127  }
2128  }
2129  NS_FATAL_ERROR ("Cell " << cellId << " not found in CC map");
2130 }
2131 
2132 uint16_t
2133 LteEnbRrc::ComponentCarrierToCellId (uint8_t componentCarrierId)
2134 {
2135  NS_LOG_FUNCTION (this << +componentCarrierId);
2136  return m_componentCarrierPhyConf.at (componentCarrierId)->GetCellId ();
2137 }
2138 
2139 bool
2141 {
2142  NS_LOG_FUNCTION (this << packet);
2143 
2144  EpsBearerTag tag;
2145  bool found = packet->RemovePacketTag (tag);
2146  NS_ASSERT_MSG (found, "no EpsBearerTag found in packet to be sent");
2147  Ptr<UeManager> ueManager = GetUeManager (tag.GetRnti ());
2148  ueManager->SendData (tag.GetBid (), packet);
2149 
2150  return true;
2151 }
2152 
2153 void
2155 {
2156  m_forwardUpCallback = cb;
2157 }
2158 
2159 void
2161 {
2162  NS_LOG_FUNCTION (this << rnti);
2164  "ConnectionRequestTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2165  RemoveUe (rnti);
2166 }
2167 
2168 void
2170 {
2171  NS_LOG_FUNCTION (this << rnti);
2172  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::CONNECTION_SETUP,
2173  "ConnectionSetupTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2174  RemoveUe (rnti);
2175 }
2176 
2177 void
2179 {
2180  NS_LOG_FUNCTION (this << rnti);
2182  "ConnectionRejectedTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2183  RemoveUe (rnti);
2184 }
2185 
2186 void
2188 {
2189  NS_LOG_FUNCTION (this << rnti);
2190  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_JOINING,
2191  "HandoverJoiningTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2192  RemoveUe (rnti);
2193 }
2194 
2195 void
2197 {
2198  NS_LOG_FUNCTION (this << rnti);
2199  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_LEAVING,
2200  "HandoverLeavingTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2201  RemoveUe (rnti);
2202 }
2203 
2204 void
2205 LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId)
2206 {
2207  NS_LOG_FUNCTION (this << rnti << cellId);
2208  NS_LOG_LOGIC ("Request to send HANDOVER REQUEST");
2210 
2211  Ptr<UeManager> ueManager = GetUeManager (rnti);
2212  ueManager->PrepareHandover (cellId);
2213 
2214 }
2215 
2216 void
2218 {
2219  NS_LOG_FUNCTION (this << rnti);
2220  GetUeManager (rnti)->CompleteSetupUe (params);
2221 }
2222 
2223 void
2225 {
2226  NS_LOG_FUNCTION (this << rnti);
2227  GetUeManager (rnti)->RecvRrcConnectionRequest (msg);
2228 }
2229 
2230 void
2232 {
2233  NS_LOG_FUNCTION (this << rnti);
2234  GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg);
2235 }
2236 
2237 void
2239 {
2240  NS_LOG_FUNCTION (this << rnti);
2241  GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg);
2242 }
2243 
2244 void
2246 {
2247  NS_LOG_FUNCTION (this << rnti);
2248  GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg);
2249 }
2250 
2251 void
2253 {
2254  NS_LOG_FUNCTION (this << rnti);
2255  GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg);
2256 }
2257 
2258 void
2260 {
2261  NS_LOG_FUNCTION (this << rnti);
2262  GetUeManager (rnti)->RecvMeasurementReport (msg);
2263 }
2264 
2265 void
2267 {
2268  Ptr<UeManager> ueManager = GetUeManager (request.rnti);
2269  ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtpTeid, request.transportLayerAddress);
2270 }
2271 
2272 void
2274 {
2275  Ptr<UeManager> ueManager = GetUeManager (params.rnti);
2276  ueManager->SendUeContextRelease ();
2277 }
2278 
2279 void
2281 {
2282  NS_LOG_FUNCTION (this);
2283 
2284  NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST");
2285 
2286  NS_LOG_LOGIC ("oldEnbUeX2apId = " << req.oldEnbUeX2apId);
2287  NS_LOG_LOGIC ("sourceCellId = " << req.sourceCellId);
2288  NS_LOG_LOGIC ("targetCellId = " << req.targetCellId);
2289  NS_LOG_LOGIC ("mmeUeS1apId = " << req.mmeUeS1apId);
2290 
2291  if (m_admitHandoverRequest == false)
2292  {
2293  NS_LOG_INFO ("rejecting handover request from cellId " << req.sourceCellId);
2295  res.oldEnbUeX2apId = req.oldEnbUeX2apId;
2296  res.sourceCellId = req.sourceCellId;
2297  res.targetCellId = req.targetCellId;
2298  res.cause = 0;
2299  res.criticalityDiagnostics = 0;
2301  return;
2302  }
2303 
2305  LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue anrcrv = m_cmacSapProvider.at (0)->AllocateNcRaPreamble (rnti);
2306  if (anrcrv.valid == false)
2307  {
2308  NS_LOG_INFO (this << " failed to allocate a preamble for non-contention based RA => cannot accept HO");
2309  RemoveUe (rnti);
2310  NS_FATAL_ERROR ("should trigger HO Preparation Failure, but it is not implemented");
2311  return;
2312  }
2313 
2314  Ptr<UeManager> ueManager = GetUeManager (rnti);
2315  ueManager->SetSource (req.sourceCellId, req.oldEnbUeX2apId);
2316  ueManager->SetImsi (req.mmeUeS1apId);
2317 
2319  ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId;
2320  ackParams.newEnbUeX2apId = rnti;
2321  ackParams.sourceCellId = req.sourceCellId;
2322  ackParams.targetCellId = req.targetCellId;
2323 
2324  for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = req.bearers.begin ();
2325  it != req.bearers.end ();
2326  ++it)
2327  {
2328  ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->erabId, it->gtpTeid, it->transportLayerAddress);
2330  i.erabId = it->erabId;
2331  ackParams.admittedBearers.push_back (i);
2332  }
2333 
2334  LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcConnectionReconfigurationForHandover ();
2335  handoverCommand.haveMobilityControlInfo = true;
2336  handoverCommand.mobilityControlInfo.targetPhysCellId = req.targetCellId;
2337  handoverCommand.mobilityControlInfo.haveCarrierFreq = true;
2340  handoverCommand.mobilityControlInfo.haveCarrierBandwidth = true;
2343  handoverCommand.mobilityControlInfo.newUeIdentity = rnti;
2344  handoverCommand.mobilityControlInfo.haveRachConfigDedicated = true;
2347 
2348  LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (0)->GetRachConfig ();
2352  handoverCommand.haveNonCriticalExtension = false;
2353 
2354  Ptr<Packet> encodedHandoverCommand = m_rrcSapUser->EncodeHandoverCommand (handoverCommand);
2355 
2356  ackParams.rrcContext = encodedHandoverCommand;
2357 
2358  NS_LOG_LOGIC ("Send X2 message: HANDOVER REQUEST ACK");
2359 
2360  NS_LOG_LOGIC ("oldEnbUeX2apId = " << ackParams.oldEnbUeX2apId);
2361  NS_LOG_LOGIC ("newEnbUeX2apId = " << ackParams.newEnbUeX2apId);
2362  NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId);
2363  NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId);
2364 
2366 }
2367 
2368 void
2370 {
2371  NS_LOG_FUNCTION (this);
2372 
2373  NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK");
2374 
2375  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2376  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2377  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2378  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2379 
2380  uint16_t rnti = params.oldEnbUeX2apId;
2381  Ptr<UeManager> ueManager = GetUeManager (rnti);
2382  ueManager->RecvHandoverRequestAck (params);
2383 }
2384 
2385 void
2387 {
2388  NS_LOG_FUNCTION (this);
2389 
2390  NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE");
2391 
2392  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2393  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2394  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2395  NS_LOG_LOGIC ("cause = " << params.cause);
2396  NS_LOG_LOGIC ("criticalityDiagnostics = " << params.criticalityDiagnostics);
2397 
2398  uint16_t rnti = params.oldEnbUeX2apId;
2399  Ptr<UeManager> ueManager = GetUeManager (rnti);
2400  ueManager->RecvHandoverPreparationFailure (params.targetCellId);
2401 }
2402 
2403 void
2405 {
2406  NS_LOG_FUNCTION (this);
2407 
2408  NS_LOG_LOGIC ("Recv X2 message: SN STATUS TRANSFER");
2409 
2410  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2411  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2412  NS_LOG_LOGIC ("erabsSubjectToStatusTransferList size = " << params.erabsSubjectToStatusTransferList.size ());
2413 
2414  uint16_t rnti = params.newEnbUeX2apId;
2415  Ptr<UeManager> ueManager = GetUeManager (rnti);
2416  ueManager->RecvSnStatusTransfer (params);
2417 }
2418 
2419 void
2421 {
2422  NS_LOG_FUNCTION (this);
2423 
2424  NS_LOG_LOGIC ("Recv X2 message: UE CONTEXT RELEASE");
2425 
2426  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2427  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2428 
2429  uint16_t rnti = params.oldEnbUeX2apId;
2430  GetUeManager (rnti)->RecvUeContextRelease (params);
2431  RemoveUe (rnti);
2432 }
2433 
2434 void
2436 {
2437  NS_LOG_FUNCTION (this);
2438 
2439  NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION");
2440 
2441  NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationList.size ());
2442 
2443  m_ffrRrcSapProvider.at (0)->RecvLoadInformation (params);
2444 }
2445 
2446 void
2448 {
2449  NS_LOG_FUNCTION (this);
2450 
2451  NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE");
2452 
2453  NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurementResultList.size ());
2454 
2455  NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED");
2456 }
2457 
2458 void
2460 {
2461  NS_LOG_FUNCTION (this);
2462 
2463  NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface");
2464  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2465  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2466  NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid);
2467  NS_LOG_LOGIC ("ueData = " << params.ueData);
2468  NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ());
2469 
2470  std::map<uint32_t, X2uTeidInfo>::iterator
2471  teidInfoIt = m_x2uTeidInfoMap.find (params.gtpTeid);
2472  if (teidInfoIt != m_x2uTeidInfoMap.end ())
2473  {
2474  GetUeManager (teidInfoIt->second.rnti)->SendData (teidInfoIt->second.drbid, params.ueData);
2475  }
2476  else
2477  {
2478  NS_FATAL_ERROR ("X2-U data received but no X2uTeidInfo found");
2479  }
2480 }
2481 
2482 
2483 uint16_t
2484 LteEnbRrc::DoAllocateTemporaryCellRnti (uint8_t componentCarrierId)
2485 {
2486  NS_LOG_FUNCTION (this << +componentCarrierId);
2487  return AddUe (UeManager::INITIAL_RANDOM_ACCESS, componentCarrierId);
2488 }
2489 
2490 void
2492 {
2493  Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti);
2494  ueManager->CmacUeConfigUpdateInd (cmacParams);
2495 }
2496 
2497 void
2498 LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success)
2499 {
2500  NS_LOG_FUNCTION (this << (uint32_t) rnti);
2501  NS_FATAL_ERROR ("not implemented");
2502 }
2503 
2504 
2505 uint8_t
2507 {
2508  NS_LOG_FUNCTION (this);
2509  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2510  m_handoverMeasIds.insert (measId);
2511  return measId;
2512 }
2513 
2514 uint8_t
2516 {
2517  NS_LOG_FUNCTION (this);
2518  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2519  m_componentCarrierMeasIds.insert (measId);
2520  return measId;
2521 }
2522 
2523 void
2524 LteEnbRrc::DoTriggerHandover (uint16_t rnti, uint16_t targetCellId)
2525 {
2526  NS_LOG_FUNCTION (this << rnti << targetCellId);
2527 
2528  bool isHandoverAllowed = true;
2529 
2530  Ptr<UeManager> ueManager = GetUeManager (rnti);
2531  NS_ASSERT_MSG (ueManager != 0, "Cannot find UE context with RNTI " << rnti);
2532 
2533  if (m_anrSapProvider != 0)
2534  {
2535  // ensure that proper neighbour relationship exists between source and target cells
2536  bool noHo = m_anrSapProvider->GetNoHo (targetCellId);
2537  bool noX2 = m_anrSapProvider->GetNoX2 (targetCellId);
2538  NS_LOG_DEBUG (this << " cellId=" << ComponentCarrierToCellId (ueManager->GetComponentCarrierId ())
2539  << " targetCellId=" << targetCellId
2540  << " NRT.NoHo=" << noHo << " NRT.NoX2=" << noX2);
2541 
2542  if (noHo || noX2)
2543  {
2544  isHandoverAllowed = false;
2545  NS_LOG_LOGIC (this << " handover to cell " << targetCellId
2546  << " is not allowed by ANR");
2547  }
2548  }
2549 
2550  if (ueManager->GetState () != UeManager::CONNECTED_NORMALLY)
2551  {
2552  isHandoverAllowed = false;
2553  NS_LOG_LOGIC (this << " handover is not allowed because the UE"
2554  << " rnti=" << rnti << " is in "
2555  << ToString (ueManager->GetState ()) << " state");
2556  }
2557 
2558  if (isHandoverAllowed)
2559  {
2560  // initiate handover execution
2561  ueManager->PrepareHandover (targetCellId);
2562  }
2563 }
2564 
2565 uint8_t
2567 {
2568  NS_LOG_FUNCTION (this);
2569  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2570  m_anrMeasIds.insert (measId);
2571  return measId;
2572 }
2573 
2574 uint8_t
2576 {
2577  NS_LOG_FUNCTION (this);
2578  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2579  m_ffrMeasIds.insert (measId);
2580  return measId;
2581 }
2582 
2583 void
2585 {
2586  NS_LOG_FUNCTION (this);
2587  Ptr<UeManager> ueManager = GetUeManager (rnti);
2588  ueManager->SetPdschConfigDedicated (pdschConfigDedicated);
2589 }
2590 
2591 void
2593 {
2594  NS_LOG_FUNCTION (this);
2595 
2597 }
2598 
2599 uint16_t
2600 LteEnbRrc::AddUe (UeManager::State state, uint8_t componentCarrierId)
2601 {
2602  NS_LOG_FUNCTION (this);
2603  bool found = false;
2604  uint16_t rnti;
2605  for (rnti = m_lastAllocatedRnti + 1;
2606  (rnti != m_lastAllocatedRnti - 1) && (!found);
2607  ++rnti)
2608  {
2609  if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ()))
2610  {
2611  found = true;
2612  break;
2613  }
2614  }
2615 
2616  NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UEs in a cell?)");
2617  m_lastAllocatedRnti = rnti;
2618  Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state, componentCarrierId);
2619  m_ccmRrcSapProvider-> AddUe (rnti, (uint8_t)state);
2620  m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager));
2621  ueManager->Initialize ();
2622  const uint16_t cellId = ComponentCarrierToCellId (componentCarrierId);
2623  NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << cellId << " srs CI " << ueManager->GetSrsConfigurationIndex ());
2624  m_newUeContextTrace (cellId, rnti);
2625  return rnti;
2626 }
2627 
2628 void
2629 LteEnbRrc::RemoveUe (uint16_t rnti)
2630 {
2631  NS_LOG_FUNCTION (this << (uint32_t) rnti);
2632  std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti);
2633  NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown rnti " << rnti);
2634  uint16_t srsCi = (*it).second->GetSrsConfigurationIndex ();
2635  m_ueMap.erase (it);
2636  for (uint8_t i = 0; i < m_numberOfComponentCarriers; i++)
2637  {
2638  m_cmacSapProvider.at (i)->RemoveUe (rnti);
2639  m_cphySapProvider.at (i)->RemoveUe (rnti);
2640  }
2641  if (m_s1SapProvider != 0)
2642  {
2644  }
2645  m_ccmRrcSapProvider-> RemoveUe (rnti);
2646  // need to do this after UeManager has been deleted
2647  RemoveSrsConfigurationIndex (srsCi);
2648 }
2649 
2650 TypeId
2652 {
2653  switch (m_epsBearerToRlcMapping)
2654  {
2655  case RLC_SM_ALWAYS:
2656  return LteRlcSm::GetTypeId ();
2657  break;
2658 
2659  case RLC_UM_ALWAYS:
2660  return LteRlcUm::GetTypeId ();
2661  break;
2662 
2663  case RLC_AM_ALWAYS:
2664  return LteRlcAm::GetTypeId ();
2665  break;
2666 
2667  case PER_BASED:
2668  if (bearer.GetPacketErrorLossRate () > 1.0e-5)
2669  {
2670  return LteRlcUm::GetTypeId ();
2671  }
2672  else
2673  {
2674  return LteRlcAm::GetTypeId ();
2675  }
2676  break;
2677 
2678  default:
2679  return LteRlcSm::GetTypeId ();
2680  break;
2681  }
2682 }
2683 
2684 
2685 void
2686 LteEnbRrc::AddX2Neighbour (uint16_t cellId)
2687 {
2688  NS_LOG_FUNCTION (this << cellId);
2689 
2690  if (m_anrSapProvider != 0)
2691  {
2693  }
2694 }
2695 
2696 void
2697 LteEnbRrc::SetCsgId (uint32_t csgId, bool csgIndication)
2698 {
2699  NS_LOG_FUNCTION (this << csgId << csgIndication);
2700  for (uint8_t componentCarrierId = 0; componentCarrierId < m_sib1.size (); componentCarrierId++)
2701  {
2702  m_sib1.at (componentCarrierId).cellAccessRelatedInfo.csgIdentity = csgId;
2703  m_sib1.at (componentCarrierId).cellAccessRelatedInfo.csgIndication = csgIndication;
2704  m_cphySapProvider.at (componentCarrierId)->SetSystemInformationBlockType1 (m_sib1.at (componentCarrierId));
2705  }
2706 }
2707 
2708 void
2709 LteEnbRrc::SetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers)
2710 {
2711  m_numberOfComponentCarriers = numberOfComponentCarriers;
2712 }
2713 
2715 static const uint8_t SRS_ENTRIES = 9;
2720 static const uint16_t g_srsPeriodicity[SRS_ENTRIES] = {0, 2, 5, 10, 20, 40, 80, 160, 320};
2726 static const uint16_t g_srsCiLow[SRS_ENTRIES] = {0, 0, 2, 7, 17, 37, 77, 157, 317};
2732 static const uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156, 316, 636};
2733 
2734 void
2736 {
2737  NS_LOG_FUNCTION (this << p);
2738  for (uint32_t id = 1; id < SRS_ENTRIES; ++id)
2739  {
2740  if (g_srsPeriodicity[id] == p)
2741  {
2743  return;
2744  }
2745  }
2746  // no match found
2747  std::ostringstream allowedValues;
2748  for (uint32_t id = 1; id < SRS_ENTRIES; ++id)
2749  {
2750  allowedValues << g_srsPeriodicity[id] << " ";
2751  }
2752  NS_FATAL_ERROR ("illecit SRS periodicity value " << p << ". Allowed values: " << allowedValues.str ());
2753 }
2754 
2755 uint32_t
2757 {
2758  NS_LOG_FUNCTION (this);
2762 }
2763 
2764 
2765 uint16_t
2767 {
2769  // SRS
2772  NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId] << " set " << m_ueSrsConfigurationIndexSet.size ());
2774  {
2775  NS_FATAL_ERROR ("too many UEs (" << m_ueSrsConfigurationIndexSet.size () + 1
2776  << ") for current SRS periodicity "
2778  << ", consider increasing the value of ns3::LteEnbRrc::SrsPeriodicity");
2779  }
2780 
2781  if (m_ueSrsConfigurationIndexSet.empty ())
2782  {
2783  // first entry
2786  }
2787  else
2788  {
2789  // find a CI from the available ones
2790  std::set<uint16_t>::reverse_iterator rit = m_ueSrsConfigurationIndexSet.rbegin ();
2791  NS_ASSERT (rit != m_ueSrsConfigurationIndexSet.rend ());
2792  NS_LOG_DEBUG (this << " lower bound " << (*rit) << " of " << g_srsCiHigh[m_srsCurrentPeriodicityId]);
2793  if ((*rit) < g_srsCiHigh[m_srsCurrentPeriodicityId])
2794  {
2795  // got it from the upper bound
2796  m_lastAllocatedConfigurationIndex = (*rit) + 1;
2798  }
2799  else
2800  {
2801  // look for released ones
2802  for (uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; srcCi < g_srsCiHigh[m_srsCurrentPeriodicityId]; srcCi++)
2803  {
2804  std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi);
2805  if (it == m_ueSrsConfigurationIndexSet.end ())
2806  {
2808  m_ueSrsConfigurationIndexSet.insert (srcCi);
2809  break;
2810  }
2811  }
2812  }
2813  }
2815 
2816 }
2817 
2818 
2819 void
2821 {
2822  NS_LOG_FUNCTION (this << srcCi);
2823  std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi);
2824  NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove unkwown SRS CI " << srcCi);
2825  m_ueSrsConfigurationIndexSet.erase (it);
2826 }
2827 
2828 uint8_t
2830 {
2831  if (bearer.IsGbr ())
2832  {
2833  return 1;
2834  }
2835  else
2836  {
2837  return 2;
2838  }
2839 }
2840 
2841 uint8_t
2843 {
2844  return bearer.qci;
2845 }
2846 
2847 void
2849 {
2850  // NS_LOG_FUNCTION (this);
2851 
2852  for (auto &it: m_componentCarrierPhyConf)
2853  {
2854  uint8_t ccId = it.first;
2855 
2857  si.haveSib2 = true;
2858  si.sib2.freqInfo.ulCarrierFreq = it.second->GetUlEarfcn ();
2859  si.sib2.freqInfo.ulBandwidth = it.second->GetUlBandwidth ();
2860  si.sib2.radioResourceConfigCommon.pdschConfigCommon.referenceSignalPower = m_cphySapProvider.at (ccId)->GetReferenceSignalPower ();
2862 
2863  LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (ccId)->GetRachConfig ();
2864  LteRrcSap::RachConfigCommon rachConfigCommon;
2866  rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax;
2868  si.sib2.radioResourceConfigCommon.rachConfigCommon = rachConfigCommon;
2869 
2870  m_rrcSapUser->SendSystemInformation (it.second->GetCellId (), si);
2871  }
2872 
2873  /*
2874  * For simplicity, we use the same periodicity for all SIBs. Note that in real
2875  * systems the periodicy of each SIBs could be different.
2876  */
2878 }
2879 
2880 
2881 } // namespace ns3
2882 
virtual void AddNeighbourRelation(uint16_t cellId)=0
Add a new Neighbour Relation entry.
uint32_t sCellIndex
SCell index.
Definition: lte-rrc-sap.h:814
Callback< void, Ptr< Packet > > m_forwardUpCallback
forward up callback function
Definition: lte-enb-rrc.h:1364
Ipv4Address transportLayerAddress
IP Address of the SGW, see 36.423 9.2.1.
static const uint8_t SRS_ENTRIES
Number of distinct SRS periodicity plus one.
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
Definition: lte-enb-rrc.h:520
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source.
Definition: lte-enb-rrc.h:1570
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:685
enum ns3::LteRrcSap::ReportConfigEutra::@67 reportQuantity
Report type enumeration.
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:459
void ConnectionRequestTimeout(uint16_t rnti)
Method triggered when a UE is expected to request for connection but does not do so in a reasonable t...
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:330
SystemInformationBlockType2 sourceSystemInformationBlockType2
source system information block type 2
Definition: lte-rrc-sap.h:615
Parameters passed to DataRadioBearerSetupRequest ()
void ConnectionSetupTimeout(uint16_t rnti)
Method triggered when a UE is expected to complete a connection setup procedure but does not do so in...
enum ns3::LteRrcSap::ThresholdEutra::@63 choice
Threshold enumeration.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
bool haveNonCriticalExtension
have critical extension?
Definition: lte-rrc-sap.h:838
void SetEpcX2SapProvider(EpcX2SapProvider *s)
Set the X2 SAP this RRC should interact with.
uint32_t mmeUeS1apId
MME UE S1 AP ID.
Definition: epc-x2-sap.h:234
Template for the implementation of the EpcEnbS1SapUser as a member of an owner class of type C to whi...
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
virtual void DoInitialize(void)
Initialize() implementation.
Definition: object.cc:353
AllocateNcRaPreambleReturnValue structure.
SCellToAddMod structure.
Definition: lte-rrc-sap.h:812
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
uint32_t carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:320
Ptr< LteSignalingRadioBearerInfo > m_srb1
The Srb1 attribute.
Definition: lte-enb-rrc.h:487
void SendHandoverRequest(uint16_t rnti, uint16_t cellId)
Send a HandoverRequest through the X2 SAP interface.
void SendSystemInformation()
method used to periodically send System Information
uint8_t drbIdentity
DRB identity.
Definition: lte-rrc-sap.h:238
RadioResourceConfigCommonSCell radioResourceConfigCommonSCell
radio resource config common SCell
Definition: lte-rrc-sap.h:816
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigForHandoverPreparationInfo()
Definition: lte-enb-rrc.cc:686
CarrierFreqEutra carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:555
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
These service primitives of this part of the X2 SAP are provided by the X2 entity and issued by RRC e...
Definition: epc-x2-sap.h:343
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
E-RABs admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:75
LteEnbRrc()
create an RRC instance for use within an eNB
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-rrc-sap.h:223
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:84
MeasurementReport structure.
Definition: lte-rrc-sap.h:894
AttributeValue implementation for Boolean.
Definition: boolean.h:36
uint32_t mmeUeS1Id
mmeUeS1Id in practice, we use the IMSI
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:445
Callback template class.
Definition: callback.h:1176
void ConfigureCell(std::map< uint8_t, Ptr< ComponentCarrierEnb >> ccPhyConf)
Configure cell-specific parameters.
EpcX2SpecificEpcX2SapUser.
Definition: epc-x2-sap.h:608
void RecordDataRadioBearersToBeStarted()
Start all configured data radio bearers.
Definition: lte-enb-rrc.cc:469
ErabsSubjectToStatusTransferItem structure.
Definition: epc-x2-sap.h:101
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-rrc-sap.h:784
virtual void DoDispose()
Destructor implementation.
Definition: lte-enb-rrc.cc:307
uint16_t m_dlBandwidth
Downlink transmission bandwidth configuration in number of Resource Blocks.
Definition: lte-enb-rrc.h:1421
MeasConfig sourceMeasConfig
source measure config
Definition: lte-rrc-sap.h:610
uint32_t sourceDlCarrierFreq
source DL carrier frequency
Definition: lte-rrc-sap.h:616
bool m_caSupportConfigured
Define if the Carrier Aggregation was already configure for the current UE on not.
Definition: lte-enb-rrc.h:563
uint8_t srbIdentity
SB identity.
Definition: lte-rrc-sap.h:230
void RecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message...
Definition: lte-enb-rrc.cc:839
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
void SetSource(uint16_t sourceCellId, uint16_t sourceX2apId)
Set the identifiers of the source eNB for the case where a UE joins the current eNB as part of a hand...
Definition: lte-enb-rrc.cc:353
std::list< MeasObjectToAddMod > measObjectToAddModList
measure object to add mod list
Definition: lte-rrc-sap.h:514
void RecvHandoverPreparationFailure(uint16_t cellId)
Take the necessary actions in response to the reception of an X2 HO preparation failure message...
Definition: lte-enb-rrc.cc:802
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
void DoNotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success)
Notify LC config result function.
uint8_t numberOfRaPreambles
number of RA preambles
Definition: lte-rrc-sap.h:247
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:831
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:250
uint16_t m_rnti
UE id within this cell.
static double ConvertPdschConfigDedicated2Double(PdschConfigDedicated pdschConfigDedicated)
Convert PDSCH config dedicated function.
Definition: lte-rrc-sap.h:180
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
Definition: lte-rrc-sap.h:219
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:77
bool presenceAntennaPort1
antenna port 1 present?
Definition: lte-rrc-sap.h:322
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rlc.cc:189
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:233
void SetCellId(uint16_t m_cellId)
set the cell id of this eNB
uint8_t GetLogicalChannelGroup(EpsBearer bearer)
RSRP is used for the threshold.
Definition: lte-rrc-sap.h:347
uint8_t m_transmissionMode
Transmission mode 1..7
void AddX2Neighbour(uint16_t cellId)
Add a neighbour with an X2 interface.
uint8_t preambleTransMax
preamble transmit maximum
QuantityConfig quantityConfig
quantity config
Definition: lte-rrc-sap.h:520
uint8_t Drbid2Bid(uint8_t drbid)
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:61
RlcConfig rlcConfig
RLC config.
Definition: lte-rrc-sap.h:239
uint16_t txSn
TX sequence number.
Definition: lte-pdcp.h:103
uint16_t rnti
the RNTI identifying the UE for which the DataRadioBearer is to be created
bool m_admitHandoverRequest
The AdmitHandoverRequest attribute.
Definition: lte-enb-rrc.h:1493
std::vector< CellMeasurementResultItem > cellMeasurementResultList
cell measurement result list
Definition: epc-x2-sap.h:319
uint32_t GetSrsPeriodicity() const
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Definition: lte-rrc-sap.h:677
Parameters of the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:228
int8_t qRxLevMin
INTEGER (-70..-22), actual value = IE value * 2 [dBm].
Definition: lte-rrc-sap.h:83
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:452
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: enum.h:209
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: boolean.h:84
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1182
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:374
void DoRecvRrcConnectionReconfigurationCompleted(uint16_t rnti, LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Part of the RRC protocol.
Template for the implementation of the LteHandoverManagementSapUser as a member of an owner class of ...
Status variables of the PDCP.
Definition: lte-pdcp.h:101
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:295
Class for forwarding CMAC SAP User functions.
Definition: lte-enb-rrc.cc:60
Specifies criteria for triggering of an E-UTRA measurement reporting event.
Definition: lte-rrc-sap.h:354
void SetCsgId(uint32_t csgId, bool csgIndication)
Associate this RRC entity with a particular CSG information.
uint8_t DoAddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for component carrier function.
uint8_t raResponseWindowSize
RA response window size.
RadioResourceConfigDedicatedSCell radioResourceConfigDedicateSCell
radio resource config dedicated SCell
Definition: lte-rrc-sap.h:818
uint8_t qci
QoS Class Identifier.
X2uTeidInfo structure.
Definition: lte-enb-rrc.h:1451
static TypeId GetTypeId(void)
Get the type ID.
uint16_t m_sourceCellId
source cell ID
Definition: lte-enb-rrc.h:523
uint16_t nPuschIdentity
3GPP TS 36.331 v.11.10 R11 page 216
Definition: lte-rrc-sap.h:765
virtual ~LteEnbRrc()
Destructor.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
uint16_t m_rnti
The C-RNTI attribute.
Definition: lte-enb-rrc.h:492
std::list< SrbToAddMod > srbToAddModList
SRB to add mod list.
Definition: lte-rrc-sap.h:280
Hold a signed integer type.
Definition: integer.h:44
enum ns3::LteRrcSap::ReportConfigEutra::report purpose
purpose
uint8_t Lcid2Bid(uint8_t lcid)
virtual void SendHandoverPreparationFailure(HandoverPreparationFailureParams params)=0
Send handover preparation failure function.
void SetLteHandoverManagementSapProvider(LteHandoverManagementSapProvider *s)
set the Handover Management SAP this RRC should interact with
EpcX2SapUser * GetEpcX2SapUser()
Get the X2 SAP offered by this RRC.
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:837
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
void SetLteEnbCphySapProvider(LteEnbCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
uint16_t m_lastAllocatedRnti
Last allocated RNTI.
Definition: lte-enb-rrc.h:1425
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:249
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1022
uint16_t GetNewSrsConfigurationIndex(void)
Allocate a new SRS configuration index for a new UE.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:292
bool haveNonUlConfiguration
have non UL configuration?
Definition: lte-rrc-sap.h:779
std::list< BearerToBeSwitched > bearersToBeSwitched
list of bearers to be switched
LteEnbCmacSapUser * GetLteEnbCmacSapUser()
Get the CMAC SAP offered by this RRC.
uint8_t m_transmissionMode
Transmission mode 1..7
std::vector< LteEnbCphySapProvider * > m_cphySapProvider
Interface to the eNodeB PHY instances.
Definition: lte-enb-rrc.h:1412
State GetState() const
PdschConfigCommon pdschConfigCommon
4: Physical configuration, physical channels pdsch-ConfigCommon-r10
Definition: lte-rrc-sap.h:740
Tag used to define the RNTI and EPS bearer ID for packets interchanged between the EpcEnbApplication ...
uint16_t srsConfigIndex
SRS config index.
Definition: lte-rrc-sap.h:137
uint16_t m_ulBandwidth
Uplink transmission bandwidth configuration in number of Resource Blocks.
Definition: lte-enb-rrc.h:1423
uint64_t GetImsi(void) const
uint8_t m_lastRrcTransactionIdentifier
last RRC transaction identifier
Definition: lte-enb-rrc.h:503
uint16_t m_srsCurrentPeriodicityId
The SrsPeriodicity attribute.
Definition: lte-enb-rrc.h:1478
The LTE Radio Resource Control entity at the eNB.
Definition: lte-enb-rrc.h:577
bool m_pendingStartDataRadioBearers
Pending start data radio bearers.
Definition: lte-enb-rrc.h:566
void SetLteEnbRrcSapUser(LteEnbRrcSapUser *s)
set the RRC SAP this RRC should interact with
MeasObjectEutra measObjectEutra
measure object eutra
Definition: lte-rrc-sap.h:446
uint16_t sourceUeIdentity
source UE identity
Definition: lte-rrc-sap.h:612
void SetLteEnbCmacSapProvider(LteEnbCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:278
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
uint64_t m_imsi
International Mobile Subscriber Identity assigned to this UE.
Definition: lte-enb-rrc.h:497
virtual uint16_t AllocateTemporaryCellRnti()
request the allocation of a Temporary C-RNTI
Definition: lte-enb-rrc.cc:87
std::vector< LteEnbCmacSapProvider * > m_cmacSapProvider
Interface to the eNodeB MAC instance.
Definition: lte-enb-rrc.h:1374
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
EpsBearer bearer
the characteristics of the bearer to be set up
The attribute can be written at construction-time.
Definition: type-id.h:65
Time m_handoverLeavingTimeoutDuration
The HandoverLeavingTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1544
LteRlcSapProvider * srb0SapProvider
SRB0 SAP provider.
Definition: lte-rrc-sap.h:1069
uint64_t mbrDl
maximum bitrate in downlink
void SetBid(uint8_t bid)
Set the bearer id to the given value.
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-x2-sap.h:64
bool haveCarrierFreq
have carrier frequency?
Definition: lte-rrc-sap.h:554
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration.
uint8_t neighCellConfig
neighbor cell config
Definition: lte-rrc-sap.h:323
Time m_connectionRejectedTimeoutDuration
The ConnectionRejectedTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1529
LteMacSapProvider * m_macSapProvider
Interface to the eNodeB MAC instance, to be used by RLC instances.
Definition: lte-enb-rrc.h:1402
LteHandoverManagementSapUser * GetLteHandoverManagementSapUser()
Get the Handover Management SAP offered by this RRC.
LteEnbRrcSapProvider * m_rrcSapProvider
Interface to receive messages from UE over the RRC protocol.
Definition: lte-enb-rrc.h:1399
RachConfigDedicated rachConfigDedicated
RACH config dedicated.
Definition: lte-rrc-sap.h:561
bool haveSmeasure
have S measure?
Definition: lte-rrc-sap.h:523
void RemoveSrsConfigurationIndex(uint16_t srcCi)
remove a previously allocated SRS configuration index
std::map< uint8_t, Ptr< ComponentCarrierEnb > > m_componentCarrierPhyConf
component carrier phy configuration
Definition: lte-enb-rrc.h:1581
virtual void RrcConfigurationUpdateInd(UeConfig params)
Notify the RRC of a UE config updated requested by the MAC (normally, by the scheduler) ...
Definition: lte-enb-rrc.cc:99
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:400
MemberLteCcmRrcSapUser class.
void SetImsi(uint64_t imsi)
Set the IMSI.
Definition: lte-enb-rrc.cc:360
uint64_t ueAggregateMaxBitRateUplink
UE aggregrate max bit rate uplink.
Definition: epc-x2-sap.h:236
void SetRnti(uint16_t rnti)
Definition: lte-rlc.cc:131
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:293
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
bool IsGbr() const
Definition: eps-bearer.cc:61
void SendUeContextRelease()
send the UE CONTEXT RELEASE X2 message to the source eNB, thus successfully terminating an X2 handove...
Definition: lte-enb-rrc.cc:778
LteRrcSap::RrcConnectionReconfiguration GetRrcConnectionReconfigurationForHandover()
Definition: lte-enb-rrc.cc:693
void SwitchToState(State s)
Switch the UeManager to the given state.
EnbRrcMemberLteEnbCmacSapUser(LteEnbRrc *rrc, uint8_t componentCarrierId)
Constructor.
Definition: lte-enb-rrc.cc:80
Time m_connectionSetupTimeoutDuration
The ConnectionSetupTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1524
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:90
static const std::string g_ueManagerStateName[UeManager::NUM_STATES]
Map each of UE Manager states to its string representation.
Definition: lte-enb-rrc.cc:112
void RecvRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted interface.
Definition: lte-enb-rrc.cc:939
void ReleaseDataRadioBearer(uint8_t drbid)
Release a given radio bearer.
Definition: lte-enb-rrc.cc:501
void SetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers)
Set number of component carriers.
uint16_t ComponentCarrierToCellId(uint8_t componentCarrierId)
convert the component carrier id to cell id
uint8_t AddDataRadioBearerInfo(Ptr< LteDataRadioBearerInfo > radioBearerInfo)
Add a new LteDataRadioBearerInfo structure to the UeManager.
EpcX2SapUser * m_x2SapUser
Interface to receive messages from neighbour eNodeB over the X2 interface.
Definition: lte-enb-rrc.h:1367
uint8_t m_rsrqFilterCoefficient
The RsrqFilterCoefficient attribute.
Definition: lte-enb-rrc.h:1510
LteEnbRrcSapUser * m_rrcSapUser
Interface to send messages to UE over the RRC protocol.
Definition: lte-enb-rrc.h:1397
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:254
bool haveRadioResourceConfigDedicated
have radio resource config dedicated
Definition: lte-rrc-sap.h:836
bool m_needPhyMacConfiguration
need Phy MAC configuration
Definition: lte-enb-rrc.h:526
Ptr< LteEnbRrc > m_rrc
Pointer to the parent eNodeB RRC.
Definition: lte-enb-rrc.h:507
EpcEnbS1SapProvider * m_s1SapProvider
Interface to send messages to core network over the S1 protocol.
Definition: lte-enb-rrc.h:1405
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Time m_connectionRequestTimeoutDuration
The ConnectionRequestTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1517
bool havePdschConfigDedicated
have PDSCH config dedicated?
Definition: lte-rrc-sap.h:783
bool haveNonUlConfiguration
have non UL configuration?
Definition: lte-rrc-sap.h:799
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
set the callback used to forward data packets up the stack
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:446
void DoRecvRrcConnectionSetupCompleted(uint16_t rnti, LteRrcSap::RrcConnectionSetupCompleted msg)
Part of the RRC protocol.
DrbToAddMod structure.
Definition: lte-rrc-sap.h:235
void DoRecvRrcConnectionReestablishmentComplete(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentComplete msg)
Part of the RRC protocol.
uint64_t gbrUl
Guaranteed Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:41
The attribute can be read.
Definition: type-id.h:63
LteHandoverManagementSapUser * m_handoverManagementSapUser
Receive API calls from the handover algorithm instance.
Definition: lte-enb-rrc.h:1377
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: integer.h:45
void DoCompleteSetupUe(uint16_t rnti, LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Part of the RRC protocol.
SystemInformationBlockType1 sourceSystemInformationBlockType1
source system information block type 1
Definition: lte-rrc-sap.h:614
TracedCallback< uint16_t, uint16_t > m_newUeContextTrace
The NewUeContext trace source.
Definition: lte-enb-rrc.h:1550
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:831
#define MIN_NO_CC
Definition: lte-enb-rrc.h:54
Service Access Point (SAP) offered by the MAC to the RRC See Femto Forum MAC Scheduler Interface Spec...
PreambleInfo preambleInfo
preamble info
Definition: lte-rrc-sap.h:260
Template for the implementation of the LteFfrRrcSapUser as a member of an owner class of type C to wh...
uint8_t rsrpResult
RSRP result.
Definition: lte-rrc-sap.h:674
SystemInformation structure.
Definition: lte-rrc-sap.h:601
Ptr< UeManager > GetUeManager(uint16_t rnti)
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:76
uint8_t lcId
logical channel identifier
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
uint16_t m_rnti
UE id within this cell.
bool m_admitRrcConnectionRequest
The AdmitRrcConnectionRequest attribute.
Definition: lte-enb-rrc.h:1498
int8_t m_qRxLevMin
The QRxLevMin attribute.
Definition: lte-enb-rrc.h:1488
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:79
LtePdcpSapUser * m_drbPdcpSapUser
DRB PDCP SAP user.
Definition: lte-enb-rrc.h:511
uint8_t AddUeMeasReportConfig(LteRrcSap::ReportConfigEutra config)
Add a new UE measurement reporting configuration.
CellIdentification cellIdentification
cell identification
Definition: lte-rrc-sap.h:815
bool haveUlConfiguration
have UL configuration
Definition: lte-rrc-sap.h:801
AntennaInfoCommon antennaInfoCommon
2: Physical configuration, general antennaInfoCommon-r10
Definition: lte-rrc-sap.h:736
EventId m_connectionRejectedTimeout
The delay before a connection rejected timeout occurs.
Definition: lte-enb-rrc.h:546
void SetLteFfrRrcSapProvider(LteFfrRrcSapProvider *s)
set the FFR SAP this RRC should interact with
virtual void UeContextRelease(uint16_t rnti)=0
release UE context at the S1 Application of the source eNB after reception of the UE CONTEXT RELEASE ...
uint16_t m_numberOfComponentCarriers
number of component carriers
Definition: lte-enb-rrc.h:1577
std::vector< LteFfrRrcSapProvider * > m_ffrRrcSapProvider
Interface to the FFR algorithm instance.
Definition: lte-enb-rrc.h:1394
LteRrcSap::NonCriticalExtensionConfiguration BuildNonCriticalExtentionConfigurationCa()
bool m_carriersConfigured
are carriers configured
Definition: lte-enb-rrc.h:1579
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: pointer.h:220
Hold variables of type enum.
Definition: enum.h:54
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1381
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:248
LteRrcSap::RrcConnectionReconfiguration BuildRrcConnectionReconfiguration()
Ptr< LteSignalingRadioBearerInfo > m_srb0
The Srb0 attribute.
Definition: lte-enb-rrc.h:483
void DoRecvRrcConnectionRequest(uint16_t rnti, LteRrcSap::RrcConnectionRequest msg)
Part of the RRC protocol.
uint8_t preambleTransMax
preamble transmit maximum
Definition: lte-rrc-sap.h:253
MeasResults measResults
measure results
Definition: lte-rrc-sap.h:896
FreqInfo ulFreqInfo
UL frequency info.
Definition: lte-rrc-sap.h:748
uint64_t ueAggregateMaxBitRateDownlink
UE aggregrate max bit rate downlink.
Definition: epc-x2-sap.h:235
uint8_t epsBearerIdentity
EPS bearer identity.
Definition: lte-rrc-sap.h:237
AttributeValue implementation for Time.
Definition: nstime.h:1076
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
UlPowerControlCommonSCell ulPowerControlCommonSCell
3GPP TS 36.331 v.11.10 R11 pag.223
Definition: lte-rrc-sap.h:749
uint64_t ueIdentity
UE identity.
Definition: lte-rrc-sap.h:687
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rlc-um.cc:55
int8_t referenceSignalPower
INTEGER (-60..50),.
Definition: lte-rrc-sap.h:149
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:858
void SetSrsConfigurationIndex(uint16_t srsConfIndex)
Set the SRS configuration index and do the necessary reconfiguration.
void DoTriggerHandover(uint16_t rnti, uint16_t targetCellId)
Trigger handover function.
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:231
virtual void SendLoadInformation(LoadInformationParams params)=0
Send load information function.
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:267
ReportConfigEutra reportConfigEutra
report config eutra
Definition: lte-rrc-sap.h:453
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
The ConnectionEstablished trace source.
Definition: lte-enb-rrc.h:1555
std::set< uint8_t > m_componentCarrierMeasIds
List of measurement identities which are intended for component carrier management purposes...
Definition: lte-enb-rrc.h:1448
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition: epc-x2-sap.h:262
CellAccessRelatedInfo cellAccessRelatedInfo
cell access related info
Definition: lte-rrc-sap.h:589
virtual bool GetNoHo(uint16_t cellId) const =0
Get the value of No HO field of a neighbouring cell from the Neighbour Relation Table (NRT)...
Hold an unsigned integer type.
Definition: uinteger.h:44
NonUlConfiguration nonUlConfiguration
non UL configuration
Definition: lte-rrc-sap.h:800
Logical Channel information to be passed to CmacSapProvider::ConfigureLc.
bool haveRadioResourceConfigDedicatedSCell
have radio resource config dedicated SCell?
Definition: lte-rrc-sap.h:817
GbrQosInformation gbrQosInfo
GBR QOS information.
Definition: eps-bearer.h:90
uint32_t m_ulEarfcn
Uplink E-UTRA Absolute Radio Frequency Channel Number.
Definition: lte-enb-rrc.h:1419
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
Definition: lte-rrc-sap.h:370
uint8_t CellToComponentCarrierId(uint16_t cellId)
convert the cell id to component carrier id
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
bool HasUeManager(uint16_t rnti) const
virtual void NotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success)
notify the result of the last LC config operation
Definition: lte-enb-rrc.cc:93
uint32_t dlCarrierFreq
ARFCN - valueEUTRA.
Definition: lte-rrc-sap.h:708
std::vector< ErabAdmittedItem > admittedBearers
admitted bearers
Definition: epc-x2-sap.h:252
bool haveMeasGapConfig
have measure gap config?
Definition: lte-rrc-sap.h:521
std::list< MeasResultScell > measResultScell
measure results Scells
Definition: lte-rrc-sap.h:665
std::vector< CellInformationItem > cellInformationList
cell information list
Definition: epc-x2-sap.h:306
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:829
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:46
std::list< MeasIdToAddMod > measIdToAddModList
measure ID to add mod list
Definition: lte-rrc-sap.h:518
bool haveRachConfigDedicated
Have RACH config dedicated?
Definition: lte-rrc-sap.h:560
SetupUeParameters structure.
Definition: lte-rrc-sap.h:1067
uint8_t raPrachMaskIndex
RA PRACH mask index.
Definition: lte-rrc-sap.h:547
Parameters of the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:276
PhysicalConfigDedicated physicalConfigDedicated
physical config dedicated
Definition: lte-rrc-sap.h:284
std::set< uint8_t > m_ffrMeasIds
List of measurement identities which are intended for FFR purpose.
Definition: lte-enb-rrc.h:1446
uint8_t filterCoefficientRSRP
filter coefficient RSRP
Definition: lte-rrc-sap.h:290
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
Definition: lte-anr-sap.h:97
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:264
uint8_t srsSubframeConfig
SRS subframe config.
Definition: lte-rrc-sap.h:125
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:844
MeasResultServFreqList measScellResultList
measure SCell result list
Definition: lte-rrc-sap.h:679
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:43
uint32_t gtpTeid
S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1.
Template for the implementation of the LteEnbCphySapUser as a member of an owner class of type C to w...
bool haveAntennaInfoUlDedicated
have antenna info UL dedicated?
Definition: lte-rrc-sap.h:788
uint8_t Drbid2Lcid(uint8_t drbid)
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration.
std::list< SCellToAddMod > sCellsToAddModList
SCell to add mod list.
Definition: lte-rrc-sap.h:824
LtePdcpSapProvider * srb1SapProvider
SRB1 SAP provider.
Definition: lte-rrc-sap.h:1070
void SetLteCcmRrcSapProvider(LteCcmRrcSapProvider *s)
set the Component Carrier Management SAP this RRC should interact with
uint16_t rxSn
RX sequence number.
Definition: lte-pdcp.h:104
LteMacSapUser * GetLteMacSapUser()
Definition: lte-rlc.cc:166
void SendData(uint8_t bid, Ptr< Packet > p)
Send a data packet over the appropriate Data Radio Bearer.
Definition: lte-enb-rrc.cc:700
MeasIdToAddMod structure.
Definition: lte-rrc-sap.h:457
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:693
std::set< uint8_t > m_handoverMeasIds
List of measurement identities which are intended for handover purpose.
Definition: lte-enb-rrc.h:1442
double GetPacketErrorLossRate() const
Definition: eps-bearer.cc:144
PrachConfigSCell prachConfigSCell
PRACH config SCell.
Definition: lte-rrc-sap.h:751
uint8_t m_componentCarrierId
ID of the primary CC for this UE.
Definition: lte-enb-rrc.h:501
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:698
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:888
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:694
PathSwitchRequestParameters structure.
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:691
void DoRecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
Receive UE context release function.
uint8_t m_lastAllocatedDrbid
last allocated Data Radio Bearer ID
Definition: lte-enb-rrc.h:472
BearerToBeSwitched structure.
UlPowerControlDedicatedSCell ulPowerControlDedicatedSCell
UL power control dedicated SCell.
Definition: lte-rrc-sap.h:791
uint8_t Bid2Lcid(uint8_t bid)
uint16_t m_sourceX2apId
source X2 ap ID
Definition: lte-enb-rrc.h:522
Parameters for [re]configuring the UE.
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:851
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:238
std::map< uint32_t, X2uTeidInfo > m_x2uTeidInfoMap
TEID, RNTI, DRBID.
Definition: lte-enb-rrc.h:1458
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
TracedCallback< uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport > m_recvMeasurementReportTrace
The RecvMeasurementReport trace source.
Definition: lte-enb-rrc.h:1575
bool crossCarrierSchedulingConfig
currently implemented as boolean variable –> implementing crossCarrierScheduling is out of the scope...
Definition: lte-rrc-sap.h:782
void SetRnti(uint16_t rnti)
Set the RNTI to the given value.
uint8_t raPreambleIndex
RA preamble index.
Definition: lte-rrc-sap.h:546
uint8_t numberOfRaPreambles
number of RA preambles
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:281
virtual ~UeManager(void)
Definition: lte-enb-rrc.cc:302
uint8_t m_rsrpFilterCoefficient
The RsrpFilterCoefficient attribute.
Definition: lte-enb-rrc.h:1504
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:587
E-RABs to be setup item as it is used in the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:59
LteCcmRrcSapUser * m_ccmRrcSapUser
Receive API calls from the LteEnbComponentCarrierManager instance.
Definition: lte-enb-rrc.h:1382
uint8_t GetBid(void) const
Get Bearer Id function.
uint32_t gtpTeid
GTP TEID.
Definition: epc-x2-sap.h:332
RadioResourceConfigDedicated sourceRadioResourceConfig
source radio resource config
Definition: lte-rrc-sap.h:611
Part of the RRC protocol.
Definition: lte-rrc-sap.h:1063
uint8_t DoAddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for ANR function.
void SetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
Setup a new data radio bearer, including both the configuration within the eNB and the necessary RRC ...
Definition: lte-enb-rrc.cc:366
void RemoveDataRadioBearerInfo(uint8_t drbid)
remove the LteDataRadioBearerInfo corresponding to a bearer being released
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-enb-rrc.cc:320
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:461
void RecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Take the necessary actions in response to the reception of an X2 SN STATUS TRANSFER message...
Definition: lte-enb-rrc.cc:820
EpcX2SapProvider * m_x2SapProvider
Interface to send messages to neighbour eNodeB over the X2 interface.
Definition: lte-enb-rrc.h:1369
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:314
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:278
bool haveQuantityConfig
have quantity config?
Definition: lte-rrc-sap.h:519
Hold objects of type Ptr<T>.
Definition: pointer.h:36
virtual void SendHandoverRequestAck(HandoverRequestAckParams params)=0
Send handover request ack function.
LteRrcSap::RadioResourceConfigDedicated BuildRadioResourceConfigDedicated()
void SetLteRlcSapUser(LteRlcSapUser *s)
Definition: lte-rlc.cc:145
LteCcmRrcSapUser * GetLteCcmRrcSapUser()
Get the Component Carrier Management SAP offered by this RRC.
uint16_t targetPhysCellId
target Phy cell ID
Definition: lte-rrc-sap.h:553
enum ns3::EpsBearer::Qci qci
Qos class indicator.
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:882
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:251
PhysicalConfigDedicatedSCell physicalConfigDedicatedSCell
physical config dedicated SCell
Definition: lte-rrc-sap.h:808
EventId m_handoverLeavingTimeout
Time limit before a handover leaving timeout occurs.
Definition: lte-enb-rrc.h:560
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
uint8_t lcGroup
logical channel group
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:860
void SetLteAnrSapProvider(LteAnrSapProvider *s)
set the ANR SAP this RRC should interact with
bool haveMobilityControlInfo
have mobility control info
Definition: lte-rrc-sap.h:834
Parameters of the UE CONTEXT RELEASE message.
Definition: epc-x2-sap.h:290
EpsBearer erabLevelQosParameters
E-RAB level QOS parameters.
Definition: epc-x2-sap.h:62
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:294
Reference Signal Received Power.
Definition: lte-rrc-sap.h:399
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:246
void RecvRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted interface.
Definition: lte-enb-rrc.cc:911
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:861
std::list< uint8_t > m_drbsToBeStarted
DRBS to be started.
Definition: lte-enb-rrc.h:525
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
MasterInformationBlock structure.
Definition: lte-rrc-sap.h:580
bool haveMeasResultNeighCells
have measure result neighbor cells
Definition: lte-rrc-sap.h:676
uint16_t dlBandwidth
1: Cell characteristics
Definition: lte-rrc-sap.h:734
uint32_t physCellId
physical cell ID
Definition: lte-rrc-sap.h:707
uint8_t filterCoefficientRSRQ
filter coefficient RSRQ
Definition: lte-rrc-sap.h:291
PuschConfigDedicatedSCell pushConfigDedicatedSCell
PUSCH config dedicated SCell.
Definition: lte-rrc-sap.h:790
bool havePdschConfigDedicated
have PDSCH config dedicated?
Definition: lte-rrc-sap.h:222
static const uint16_t g_srsCiLow[SRS_ENTRIES]
The lower bound (inclusive) of the SRS configuration indices (ISRS) which use the corresponding SRS p...
uint8_t logicalChannelIdentity
logical channel identify
Definition: lte-rrc-sap.h:240
uint16_t newUeIdentity
new UE identity
Definition: lte-rrc-sap.h:558
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
The HandoverStart trace source.
Definition: lte-enb-rrc.h:1565
RachConfigCommon structure.
Definition: lte-rrc-sap.h:258
bool havePhysicalConfigDedicated
have physical config dedicated?
Definition: lte-rrc-sap.h:283
std::vector< EpcX2Sap::ErabToBeSetupItem > GetErabList()
Definition: lte-enb-rrc.cc:758
uint8_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:91
void ScheduleRrcConnectionReconfiguration()
schedule an RRC Connection Reconfiguration procedure with the UE
Definition: lte-enb-rrc.cc:550
These service primitives of this part of the X2 SAP are provided by the RRC entity and issued by the ...
Definition: epc-x2-sap.h:406
LteAnrSapUser * GetLteAnrSapUser()
Get the ANR SAP offered by this RRC.
LtePdcpSpecificLtePdcpSapUser class.
Definition: lte-pdcp-sap.h:132
PathSwitchRequestAcknowledgeParameters structure.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: nstime.h:1077
Parameters for [re]configuring the UE.
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
Definition: lte-rrc-sap.h:218
Time m_systemInformationPeriodicity
The SystemInformationPeriodicity attribute.
Definition: lte-enb-rrc.h:1474
LteEnbRrcSapProvider * GetLteEnbRrcSapProvider()
RadioResourceConfigCommonSib radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:596
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
std::vector< ErabToBeSetupItem > bearers
bearers
Definition: epc-x2-sap.h:237
uint8_t m_defaultTransmissionMode
The DefaultTransmissionMode attribute.
Definition: lte-enb-rrc.h:1464
void DoRecvResourceStatusUpdate(EpcX2SapUser::ResourceStatusUpdateParams params)
Receive resource status update function.
void SetLcId(uint8_t lcId)
Definition: lte-rlc.cc:138
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:460
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
void DoRecvUeData(EpcX2SapUser::UeDataParams params)
Receive UE data function.
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send a RRC PDU to the RDCP for transmission This method is to be called when upper RRC entity has a R...
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
RadioResourceConfigCommon radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:559
uint32_t plmnIdentity
PLMN identity.
Definition: lte-rrc-sap.h:68
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:230
uint32_t dlCarrierFreq
DL carrier frequency.
Definition: lte-rrc-sap.h:532
void PrepareHandover(uint16_t cellId)
Start the handover preparation and send the handover request.
Definition: lte-enb-rrc.cc:583
CarrierBandwidthEutra carrierBandwidth
carrier bandwidth
Definition: lte-rrc-sap.h:557
void DoSendReleaseDataRadioBearer(uint64_t imsi, uint16_t rnti, uint8_t bearerId)
This function acts as an interface to trigger Release indication messages towards eNB and EPC...
Definition: lte-enb-rrc.cc:540
uint8_t DoAddUeMeasReportConfigForHandover(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for handover function.
uint8_t m_componentCarrierId
Component carrier ID.
Definition: lte-enb-rrc.cc:77
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:280
virtual void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId)=0
Triggers epc-enb-application to send ERAB Release Indication message towards MME. ...
void RecvRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete interface.
EpcEnbS1SapUser * m_s1SapUser
Interface to receive messages from core network over the S1 protocol.
Definition: lte-enb-rrc.h:1407
std::set< uint16_t > m_ueSrsConfigurationIndexSet
UE SRS configuration index set.
Definition: lte-enb-rrc.h:1479
void SetSrsPeriodicity(uint32_t p)
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:673
uint16_t rnti
C-RNTI identifying the UE.
virtual void DoDispose(void)
Destructor implementation.
bool haveUlConfiguration
have UL configuration?
Definition: lte-rrc-sap.h:787
TypeId GetRlcType(EpsBearer bearer)
bool m_configured
True if ConfigureCell() has been completed.
Definition: lte-enb-rrc.h:1415
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:241
uint64_t mbrUl
maximum bitrate in uplink
void HandoverJoiningTimeout(uint16_t rnti)
Method triggered when a UE is expected to join the cell for a handover but does not do so in a reason...
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:273
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name.
Definition: enum.cc:184
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:77
Instantiate subclasses of ns3::Object.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
uint64_t gbrUl
guaranteed bitrate in uplink
uint8_t srsBandwidthConfig
SRS bandwidth config.
Definition: lte-rrc-sap.h:124
uint8_t raResponseWindowSize
RA response window size.
Definition: lte-rrc-sap.h:254
CellSelectionInfo cellSelectionInfo
cell selection info
Definition: lte-rrc-sap.h:590
bool haveCarrierBandwidth
have carrier bandwidth?
Definition: lte-rrc-sap.h:556
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
Definition: lte-pdcp-sap.h:35
bool haveAntennaInfoDedicated
have antenna info dedicated?
Definition: lte-rrc-sap.h:220
uint8_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:540
std::vector< LteEnbCmacSapUser * > m_cmacSapUser
Receive API calls from the eNodeB MAC instance.
Definition: lte-enb-rrc.h:1372
static const std::string & ToString(EpcUeNas::State s)
Definition: epc-ue-nas.cc:50
LteAnrSapUser * m_anrSapUser
Receive API calls from the ANR instance.
Definition: lte-enb-rrc.h:1387
EventId m_connectionSetupTimeout
Time limit before a connection setup timeout occurs.
Definition: lte-enb-rrc.h:540
std::vector< LteRrcSap::SystemInformationBlockType1 > m_sib1
The System Information Block Type 1 that is currently broadcasted over BCH.
Definition: lte-enb-rrc.h:1428
Template for the implementation of the LteEnbRrcSapProvider as a member of an owner class of type C t...
Definition: lte-rrc-sap.h:1605
bool m_pendingRrcConnectionReconfiguration
pending RRC connection reconfiguration
Definition: lte-enb-rrc.h:513
std::vector< ErabNotAdmittedItem > notAdmittedBearers
not admitted bearers
Definition: epc-x2-sap.h:253
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
Definition: lte-anr-sap.h:37
void DoRrcConfigurationUpdateInd(LteEnbCmacSapUser::UeConfig params)
RRC configuration update indication function.
NonCriticalExtensionConfiguration nonCriticalExtension
3GPP TS 36.331 v.11.10 R11 Sec. 6.2.2 pag. 147 (also known as ETSI TS 136 331 v.11.10 Feb-2015)
Definition: lte-rrc-sap.h:840
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:279
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:852
void DoSetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pa)
Set PDSCH config dedicated function.
uint8_t DoAddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for FFR function.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:95
struct defining the RACH configuration of the MAC
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
void DoRecvHandoverPreparationFailure(EpcX2SapUser::HandoverPreparationFailureParams params)
Receive handover preparation failure function.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:262
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance...
Both the RSRP and RSRQ quantities are to be included in the measurement report.
Definition: lte-rrc-sap.h:407
void StartDataRadioBearers()
Start the data radio bearers that have been previously recorded to be started using RecordDataRadioBe...
Definition: lte-enb-rrc.cc:481
int8_t pb
INTEGER (0..3),.
Definition: lte-rrc-sap.h:150
bool haveSpeedStatePars
have speed state parameters?
Definition: lte-rrc-sap.h:525
static const uint16_t g_srsPeriodicity[SRS_ENTRIES]
Sounding Reference Symbol (SRS) periodicity (TSRS) in milliseconds.
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
Definition: lte-rrc-sap.h:792
EpcEnbS1SapUser * GetS1SapUser()
uint8_t allowedMeasBandwidth
allowed measure bandwidth
Definition: lte-rrc-sap.h:321
std::list< DrbToAddMod > drbToAddModList
DRB to add mod list.
Definition: lte-rrc-sap.h:281
void RecvRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest interface.
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
Definition: packet.cc:859
enum ns3::LteRrcSap::SoundingRsUlConfigDedicated::action type
action type
LteRrcSap::PhysicalConfigDedicated m_physicalConfigDedicated
physical config dedicated
Definition: lte-enb-rrc.h:505
std::map< uint16_t, Ptr< UeManager > > m_ueMap
The UeMap attribute.
Definition: lte-enb-rrc.h:1433
uint8_t systemFrameNumber
system frame number
Definition: lte-rrc-sap.h:583
void ConfigureCarriers(std::map< uint8_t, Ptr< ComponentCarrierEnb >> ccPhyConf)
Configure carriers.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:270
static const uint16_t g_srsCiHigh[SRS_ENTRIES]
The upper bound (inclusive) of the SRS configuration indices (ISRS) which use the corresponding SRS p...
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1014
LteFfrRrcSapUser * GetLteFfrRrcSapUser()
Get the FFR SAP offered by this RRC.
virtual void SendSystemInformation(uint16_t cellId, SystemInformation msg)=0
Send a SystemInformation message to all attached UEs during a system information acquisition procedur...
int8_t offsetFreq
offset frequency
Definition: lte-rrc-sap.h:324
CompleteSetupUeParameters structure.
Definition: lte-rrc-sap.h:1186
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
uint16_t criticalityDiagnostics
criticality diagnostics
Definition: epc-x2-sap.h:268
bool haveAntennaInfoDedicated
have antenna info dedicated?
Definition: lte-rrc-sap.h:780
std::vector< LteEnbCphySapUser * > m_cphySapUser
Receive API calls from the eNodeB PHY instances.
Definition: lte-enb-rrc.h:1410
virtual Ptr< Packet > EncodeHandoverCommand(RrcConnectionReconfiguration msg)=0
Encode handover command.
void RecvRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionRequest interface.
Definition: lte-enb-rrc.cc:858
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:865
uint8_t transmissionMode
transmission mode
Definition: lte-rrc-sap.h:143
SystemInformationBlockType2 sib2
SIB2.
Definition: lte-rrc-sap.h:604
LteCcmRrcSapProvider * m_ccmRrcSapProvider
Interface to the LteEnbComponentCarrierManager instance.
Definition: lte-enb-rrc.h:1384
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:366
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
The DataRadioBearerMap attribute.
Definition: lte-enb-rrc.h:478
uint8_t GetComponentCarrierId() const
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
The ConnectionReconfiguration trace source.
Definition: lte-enb-rrc.h:1560
uint8_t GetLogicalChannelPriority(EpsBearer bearer)
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:80
bool valid
true if a valid RA config was allocated, false otherwise
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:348
uint8_t GetNewRrcTransactionIdentifier()
MobilityControlInfo mobilityControlInfo
mobility control info
Definition: lte-rrc-sap.h:835
void DoRecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Receive SN status transfer function.
Event A4: Neighbour becomes better than absolute threshold.
Definition: lte-rrc-sap.h:369
LteEnbCphySapUser * GetLteEnbCphySapUser()
void ConnectionRejectedTimeout(uint16_t rnti)
Method triggered a while after sending RRC Connection Rejected.
SrbToAddMod structure.
Definition: lte-rrc-sap.h:228
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Definition: object-map.h:80
Ptr< Packet > ueData
UE data.
Definition: epc-x2-sap.h:333
Ptr< LteDataRadioBearerInfo > GetDataRadioBearerInfo(uint8_t drbid)
Template for the implementation of the LteAnrSapUser as a member of an owner class of type C to which...
Definition: lte-anr-sap.h:205
uint16_t GetRnti(void) const
AntennaInfoDedicated antennaInfo
antenna info
Definition: lte-rrc-sap.h:221
Time m_handoverJoiningTimeoutDuration
The HandoverJoiningTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1538
LteRlcSapProvider * GetLteRlcSapProvider()
Definition: lte-rlc.cc:152
uint16_t m_lastAllocatedConfigurationIndex
last allocated configuration index
Definition: lte-enb-rrc.h:1480
void HandoverLeavingTimeout(uint16_t rnti)
Method triggered when a UE is expected to leave a cell for a handover but no feedback is received in ...
LTE RLC Acknowledged Mode (AM), see 3GPP TS 36.322.
Definition: lte-rlc-am.h:36
uint8_t rsrqResult
RSRQ result.
Definition: lte-rrc-sap.h:675
LteHandoverManagementSapProvider * m_handoverManagementSapProvider
Interface to the handover algorithm instance.
Definition: lte-enb-rrc.h:1379
A base class which provides memory management and object aggregation.
Definition: object.h:87
PdschConfigCommon pdschConfigCommon
PDSCH config common.
Definition: lte-rrc-sap.h:274
bool dlForwarding
DL forwarding.
Definition: epc-x2-sap.h:63
std::set< uint8_t > m_anrMeasIds
List of measurement identities which are intended for ANR purpose.
Definition: lte-enb-rrc.h:1444
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:331
Container for a set of ns3::Object pointers.
void DoRecvRrcConnectionReestablishmentRequest(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentRequest msg)
Part of the RRC protocol.
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Configure PdschConfigDedicated (i.e.
Service Access Point (SAP) offered by the eNB MAC to the eNB RRC See Femto Forum MAC Scheduler Interf...
uint8_t dlBandwidth
DL bandwidth.
Definition: lte-rrc-sap.h:539
SoundingRsUlConfigCommon soundingRsUlConfigCommon
sounding RS UL config common
Definition: lte-rrc-sap.h:750
NonCriticalExtensionConfiguration structure.
Definition: lte-rrc-sap.h:822
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
void RemoveUe(uint16_t rnti)
remove a UE from the cell
PdschConfigDedicated structure.
Definition: lte-rrc-sap.h:154
State m_state
The current UeManager state.
Definition: lte-enb-rrc.h:509
uint64_t gbrDl
guaranteed bitrate in downlink
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:47
void DoRecvMeasurementReport(uint16_t rnti, LteRrcSap::MeasurementReport msg)
Part of the RRC protocol.
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
Definition: lte-rrc-sap.h:793
void CmacUeConfigUpdateInd(LteEnbCmacSapUser::UeConfig cmacParams)
CMAC UE config update indication function.
UlConfiguration ulConfiguration
UL configuration.
Definition: lte-rrc-sap.h:802
Event A2: Serving becomes worse than absolute threshold.
Definition: lte-rrc-sap.h:367
Parameters of the UE DATA primitive.
Definition: epc-x2-sap.h:328
enum LteEpsBearerToRlcMapping_t m_epsBearerToRlcMapping
The EpsBearerToRlcMapping attribute.
Definition: lte-enb-rrc.h:1469
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: uinteger.h:45
#define MAX_NO_CC
Definition: lte-enb-rrc.h:55
std::vector< ErabsSubjectToStatusTransferItem > erabsSubjectToStatusTransferList
ERABs subject to status transfer list.
Definition: epc-x2-sap.h:282
uint32_t m_dlEarfcn
Downlink E-UTRA Absolute Radio Frequency Channel Number.
Definition: lte-enb-rrc.h:1417
void DoSendLoadInformation(EpcX2Sap::LoadInformationParams params)
Send load information function.
void RecvMeasurementReport(LteRrcSap::MeasurementReport msg)
Implement the LteEnbRrcSapProvider::RecvMeasurementReport interface.
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE...
Definition: lte-rlc.h:50
a unique identifier for an interface.
Definition: type-id.h:58
virtual bool GetNoX2(uint16_t cellId) const =0
Get the value of No X2 field of a neighbouring cell from the Neighbour Relation Table (NRT)...
uint16_t m_targetCellId
target cell ID
Definition: lte-enb-rrc.h:524
std::list< ReportConfigToAddMod > reportConfigToAddModList
report config to add mod list
Definition: lte-rrc-sap.h:516
ReportConfigToAddMod structure.
Definition: lte-rrc-sap.h:450
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:232
uint16_t DoAllocateTemporaryCellRnti(uint8_t componentCarrierId)
Allocate temporary cell RNTI function.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
uint16_t GetSrsConfigurationIndex(void) const
std::list< uint8_t > drbToReleaseList
DRB to release list.
Definition: lte-rrc-sap.h:282
uint8_t Bid2Drbid(uint8_t bid)
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-rlc-am.cc:88
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
uint8_t Lcid2Drbid(uint8_t lcid)
EventId m_connectionRequestTimeout
Time limit before a connection request timeout occurs.
Definition: lte-enb-rrc.h:534
uint16_t GetRnti(void) const
Get RNTI function.
LteAnrSapProvider * m_anrSapProvider
Interface to the ANR instance.
Definition: lte-enb-rrc.h:1389
MeasObjectToAddMod structure.
Definition: lte-rrc-sap.h:443
uint16_t AddUe(UeManager::State state, uint8_t componentCarrierId)
Allocate a new RNTI for a new UE.
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance...
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
Data radio beaerer setup request function.
uint16_t antennaPortsCount
antenna ports count
Definition: lte-rrc-sap.h:714
uint16_t pSrsOffset
3GPP TS 36.331 v.11.10 R11 page 234
Definition: lte-rrc-sap.h:772
std::vector< LteFfrRrcSapUser * > m_ffrRrcSapUser
Receive API calls from the FFR algorithm instance.
Definition: lte-enb-rrc.h:1392
void DoRecvLoadInformation(EpcX2SapUser::LoadInformationParams params)
Receive load information function.
RaSupervisionInfo raSupervisionInfo
RA supervision info.
Definition: lte-rrc-sap.h:261
void SetLteMacSapProvider(LteMacSapProvider *s)
Definition: lte-rlc.cc:159
void RecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
take the necessary actions in response to the reception of an X2 HANDOVER REQUEST ACK message ...
Definition: lte-enb-rrc.cc:639
bool SendData(Ptr< Packet > p)
Enqueue an IP data packet on the proper bearer for downlink transmission.
EventId m_handoverJoiningTimeout
Time limit before a handover joining timeout occurs.
Definition: lte-enb-rrc.h:553
bool haveScellsMeas
has SCells measure
Definition: lte-rrc-sap.h:678
bool isGbr
true if the bearer is GBR, false if the bearer is NON-GBR
AntennaInfoDedicated antennaInfo
antenna info dedicated
Definition: lte-rrc-sap.h:781
void CompleteSetupUe(LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Implement the LteEnbRrcSapProvider::CompleteSetupUe interface.
Definition: lte-enb-rrc.cc:850
RadioResourceConfigDedicated structure.
Definition: lte-rrc-sap.h:278
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:533
virtual void DoInitialize()
Initialize() implementation.
Definition: lte-enb-rrc.cc:164
MasterInformationBlock sourceMasterInformationBlock
source master information block
Definition: lte-rrc-sap.h:613
LteRrcSap::MeasConfig m_ueMeasConfig
List of measurement configuration which are active in every UE attached to this eNodeB instance...
Definition: lte-enb-rrc.h:1439
int8_t qQualMin
INTEGER (-34..-3), actual value = IE value [dB].
Definition: lte-rrc-sap.h:84
void DoRecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
Receive handover request acknowledge function.
bool haveCellForWhichToReportCGI
have cell for which to report CGI?
Definition: lte-rrc-sap.h:329
AntennaInfoDedicated antennaInfoUl
antenna info UL
Definition: lte-rrc-sap.h:789
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:375
void DoRecvHandoverRequest(EpcX2SapUser::HandoverRequestParams params)
Receive handover request function.