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:
68  EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc, uint8_t componentCarrierId);
69 
70  virtual uint16_t AllocateTemporaryCellRnti ();
71  virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success);
72  virtual void RrcConfigurationUpdateInd (UeConfig params);
73 
74 private:
77 };
78 
80  : m_rrc (rrc)
81  , m_componentCarrierId {componentCarrierId}
82 {
83 }
84 
85 uint16_t
87 {
89 }
90 
91 void
92 EnbRrcMemberLteEnbCmacSapUser::NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success)
93 {
94  m_rrc->DoNotifyLcConfigResult (rnti, lcid, success);
95 }
96 
97 void
99 {
101 }
102 
103 
104 
106 // UeManager
108 
109 
111 static const std::string g_ueManagerStateName[UeManager::NUM_STATES] =
112 {
113  "INITIAL_RANDOM_ACCESS",
114  "CONNECTION_SETUP",
115  "CONNECTION_REJECTED",
116  "CONNECTED_NORMALLY",
117  "CONNECTION_RECONFIGURATION",
118  "CONNECTION_REESTABLISHMENT",
119  "HANDOVER_PREPARATION",
120  "HANDOVER_JOINING",
121  "HANDOVER_PATH_SWITCH",
122  "HANDOVER_LEAVING",
123 };
124 
129 static const std::string & ToString (UeManager::State s)
130 {
131  return g_ueManagerStateName[s];
132 }
133 
134 
135 NS_OBJECT_ENSURE_REGISTERED (UeManager);
136 
137 
139 {
140  NS_FATAL_ERROR ("this constructor is not expected to be used");
141 }
142 
143 
144 UeManager::UeManager (Ptr<LteEnbRrc> rrc, uint16_t rnti, State s, uint8_t componentCarrierId)
145  : m_lastAllocatedDrbid (0),
146  m_rnti (rnti),
147  m_imsi (0),
148  m_componentCarrierId (componentCarrierId),
149  m_lastRrcTransactionIdentifier (0),
150  m_rrc (rrc),
151  m_state (s),
152  m_pendingRrcConnectionReconfiguration (false),
153  m_sourceX2apId (0),
154  m_sourceCellId (0),
155  m_needPhyMacConfiguration (false),
156  m_caSupportConfigured (false),
157  m_pendingStartDataRadioBearers (false)
158 {
159  NS_LOG_FUNCTION (this);
160 }
161 
162 void
164 {
165  NS_LOG_FUNCTION (this);
167 
169  m_physicalConfigDedicated.antennaInfo.transmissionMode = m_rrc->m_defaultTransmissionMode;
176 
177 
178  for (uint8_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
179  {
180  m_rrc->m_cmacSapProvider.at (i)->AddUe (m_rnti);
181  m_rrc->m_cphySapProvider.at (i)->AddUe (m_rnti);
182  }
183 
184  // setup the eNB side of SRB0
185  {
186  uint8_t lcid = 0;
187 
188  Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
189  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
190  rlc->SetRnti (m_rnti);
191  rlc->SetLcId (lcid);
192 
193  m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
194  m_srb0->m_rlc = rlc;
195  m_srb0->m_srbIdentity = 0;
196  // no need to store logicalChannelConfig as SRB0 is pre-configured
197 
199  lcinfo.rnti = m_rnti;
200  lcinfo.lcId = lcid;
201  // 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.
202  // See FF LTE MAC Scheduler Iinterface Specification v1.11, 4.3.4 logicalChannelConfigListElement
203  lcinfo.lcGroup = 0;
204  lcinfo.qci = 0;
205  lcinfo.isGbr = false;
206  lcinfo.mbrUl = 0;
207  lcinfo.mbrDl = 0;
208  lcinfo.gbrUl = 0;
209  lcinfo.gbrDl = 0;
210 
211  // MacSapUserForRlc in the ComponentCarrierManager MacSapUser
212  LteMacSapUser* lteMacSapUser = m_rrc->m_ccmRrcSapProvider->ConfigureSignalBearer(lcinfo, rlc->GetLteMacSapUser ());
213  // Signal Channel are only on Primary Carrier
214  m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, lteMacSapUser);
215  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, lteMacSapUser);
216  }
217 
218  // setup the eNB side of SRB1; the UE side will be set up upon RRC connection establishment
219  {
220  uint8_t lcid = 1;
221 
222  Ptr<LteRlc> rlc = CreateObject<LteRlcAm> ()->GetObject<LteRlc> ();
223  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
224  rlc->SetRnti (m_rnti);
225  rlc->SetLcId (lcid);
226 
227  Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> ();
228  pdcp->SetRnti (m_rnti);
229  pdcp->SetLcId (lcid);
230  pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser);
231  pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ());
232  rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ());
233 
234  m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
235  m_srb1->m_rlc = rlc;
236  m_srb1->m_pdcp = pdcp;
237  m_srb1->m_srbIdentity = 1;
238  m_srb1->m_logicalChannelConfig.priority = 0;
239  m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = 100;
240  m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = 100;
241  m_srb1->m_logicalChannelConfig.logicalChannelGroup = 0;
242 
244  lcinfo.rnti = m_rnti;
245  lcinfo.lcId = lcid;
246  lcinfo.lcGroup = 0; // all SRBs always mapped to LCG 0
247  lcinfo.qci = EpsBearer::GBR_CONV_VOICE; // not sure why the FF API requires a CQI even for SRBs...
248  lcinfo.isGbr = true;
249  lcinfo.mbrUl = 1e6;
250  lcinfo.mbrDl = 1e6;
251  lcinfo.gbrUl = 1e4;
252  lcinfo.gbrDl = 1e4;
253  // MacSapUserForRlc in the ComponentCarrierManager MacSapUser
254  LteMacSapUser* MacSapUserForRlc = m_rrc->m_ccmRrcSapProvider->ConfigureSignalBearer(lcinfo, rlc->GetLteMacSapUser ());
255  // Signal Channel are only on Primary Carrier
256  m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->AddLc (lcinfo, MacSapUserForRlc);
257  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, MacSapUserForRlc);
258  }
259 
261  ueParams.srb0SapProvider = m_srb0->m_rlc->GetLteRlcSapProvider ();
262  ueParams.srb1SapProvider = m_srb1->m_pdcp->GetLtePdcpSapProvider ();
263  m_rrc->m_rrcSapUser->SetupUe (m_rnti, ueParams);
264 
265  // configure MAC (and scheduler)
267  req.m_rnti = m_rnti;
269 
270  // configure PHY
271  for (uint16_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
272  {
273  m_rrc->m_cmacSapProvider.at (i)->UeUpdateConfigurationReq (req);
274  m_rrc->m_cphySapProvider.at (i)->SetTransmissionMode (m_rnti, m_physicalConfigDedicated.antennaInfo.transmissionMode);
275  m_rrc->m_cphySapProvider.at (i)->SetSrsConfigurationIndex (m_rnti, m_physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex);
276  }
277  // schedule this UeManager instance to be deleted if the UE does not give any sign of life within a reasonable time
278  Time maxConnectionDelay;
279  switch (m_state)
280  {
282  m_connectionRequestTimeout = Simulator::Schedule (m_rrc->m_connectionRequestTimeoutDuration,
284  m_rrc, m_rnti);
285  break;
286 
287  case HANDOVER_JOINING:
288  m_handoverJoiningTimeout = Simulator::Schedule (m_rrc->m_handoverJoiningTimeoutDuration,
290  m_rrc, m_rnti);
291  break;
292 
293  default:
294  NS_FATAL_ERROR ("unexpected state " << ToString (m_state));
295  break;
296  }
297  m_caSupportConfigured = false;
298 }
299 
300 
302 {
303 }
304 
305 void
307 {
308  delete m_drbPdcpSapUser;
309  // delete eventual X2-U TEIDs
310  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
311  it != m_drbMap.end ();
312  ++it)
313  {
314  m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid);
315  }
316 
317 }
318 
320 {
321  static TypeId tid = TypeId ("ns3::UeManager")
322  .SetParent<Object> ()
323  .AddConstructor<UeManager> ()
324  .AddAttribute ("DataRadioBearerMap", "List of UE DataRadioBearerInfo by DRBID.",
325  ObjectMapValue (),
327  MakeObjectMapChecker<LteDataRadioBearerInfo> ())
328  .AddAttribute ("Srb0", "SignalingRadioBearerInfo for SRB0",
329  PointerValue (),
331  MakePointerChecker<LteSignalingRadioBearerInfo> ())
332  .AddAttribute ("Srb1", "SignalingRadioBearerInfo for SRB1",
333  PointerValue (),
335  MakePointerChecker<LteSignalingRadioBearerInfo> ())
336  .AddAttribute ("C-RNTI",
337  "Cell Radio Network Temporary Identifier",
338  TypeId::ATTR_GET, // read-only attribute
339  UintegerValue (0), // unused, read-only attribute
341  MakeUintegerChecker<uint16_t> ())
342  .AddTraceSource ("StateTransition",
343  "fired upon every UE state transition seen by the "
344  "UeManager at the eNB RRC",
346  "ns3::UeManager::StateTracedCallback")
347  ;
348  return tid;
349 }
350 
351 void
352 UeManager::SetSource (uint16_t sourceCellId, uint16_t sourceX2apId)
353 {
354  m_sourceX2apId = sourceX2apId;
355  m_sourceCellId = sourceCellId;
356 }
357 
358 void
359 UeManager::SetImsi (uint64_t imsi)
360 {
361  m_imsi = imsi;
362 }
363 
364 void
365 UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
366 {
367  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
368 
369  Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> ();
370  uint8_t drbid = AddDataRadioBearerInfo (drbInfo);
371  uint8_t lcid = Drbid2Lcid (drbid);
372  uint8_t bid = Drbid2Bid (drbid);
373  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");
374  drbInfo->m_epsBearer = bearer;
375  drbInfo->m_epsBearerIdentity = bid;
376  drbInfo->m_drbIdentity = drbid;
377  drbInfo->m_logicalChannelIdentity = lcid;
378  drbInfo->m_gtpTeid = gtpTeid;
379  drbInfo->m_transportLayerAddress = transportLayerAddress;
380 
381  if (m_state == HANDOVER_JOINING)
382  {
383  // setup TEIDs for receiving data eventually forwarded over X2-U
384  LteEnbRrc::X2uTeidInfo x2uTeidInfo;
385  x2uTeidInfo.rnti = m_rnti;
386  x2uTeidInfo.drbid = drbid;
387  std::pair<std::map<uint32_t, LteEnbRrc::X2uTeidInfo>::iterator, bool>
388  ret = m_rrc->m_x2uTeidInfoMap.insert (std::pair<uint32_t, LteEnbRrc::X2uTeidInfo> (gtpTeid, x2uTeidInfo));
389  NS_ASSERT_MSG (ret.second == true, "overwriting a pre-existing entry in m_x2uTeidInfoMap");
390  }
391 
392  TypeId rlcTypeId = m_rrc->GetRlcType (bearer);
393 
394  ObjectFactory rlcObjectFactory;
395  rlcObjectFactory.SetTypeId (rlcTypeId);
396  Ptr<LteRlc> rlc = rlcObjectFactory.Create ()->GetObject<LteRlc> ();
397  rlc->SetLteMacSapProvider (m_rrc->m_macSapProvider);
398  rlc->SetRnti (m_rnti);
399 
400  drbInfo->m_rlc = rlc;
401 
402  rlc->SetLcId (lcid);
403 
404  // we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM
405  // if we are using RLC/SM we don't care of anything above RLC
406  if (rlcTypeId != LteRlcSm::GetTypeId ())
407  {
408  Ptr<LtePdcp> pdcp = CreateObject<LtePdcp> ();
409  pdcp->SetRnti (m_rnti);
410  pdcp->SetLcId (lcid);
411  pdcp->SetLtePdcpSapUser (m_drbPdcpSapUser);
412  pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ());
413  rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ());
414  drbInfo->m_pdcp = pdcp;
415  }
416 
417  std::vector<LteCcmRrcSapProvider::LcsConfig> lcOnCcMapping = m_rrc->m_ccmRrcSapProvider->SetupDataRadioBearer (bearer, bearerId, m_rnti, lcid, m_rrc->GetLogicalChannelGroup (bearer), rlc->GetLteMacSapUser ());
418  // LteEnbCmacSapProvider::LcInfo lcinfo;
419  // lcinfo.rnti = m_rnti;
420  // lcinfo.lcId = lcid;
421  // lcinfo.lcGroup = m_rrc->GetLogicalChannelGroup (bearer);
422  // lcinfo.qci = bearer.qci;
423  // lcinfo.isGbr = bearer.IsGbr ();
424  // lcinfo.mbrUl = bearer.gbrQosInfo.mbrUl;
425  // lcinfo.mbrDl = bearer.gbrQosInfo.mbrDl;
426  // lcinfo.gbrUl = bearer.gbrQosInfo.gbrUl;
427  // lcinfo.gbrDl = bearer.gbrQosInfo.gbrDl;
428  // use a for cycle to send the AddLc to the appropriate Mac Sap
429  // if the sap is not initialized the appropriated method has to be called
430  std::vector<LteCcmRrcSapProvider::LcsConfig>::iterator itLcOnCcMapping = lcOnCcMapping.begin ();
431  NS_ASSERT_MSG (itLcOnCcMapping != lcOnCcMapping.end (), "Problem");
432  for (itLcOnCcMapping = lcOnCcMapping.begin (); itLcOnCcMapping != lcOnCcMapping.end (); ++itLcOnCcMapping)
433  {
434  NS_LOG_DEBUG (this << " RNTI " << itLcOnCcMapping->lc.rnti << "Lcid " << (uint16_t) itLcOnCcMapping->lc.lcId << " lcGroup " << (uint16_t) itLcOnCcMapping->lc.lcGroup << " ComponentCarrierId " << itLcOnCcMapping->componentCarrierId);
435  uint8_t index = itLcOnCcMapping->componentCarrierId;
436  LteEnbCmacSapProvider::LcInfo lcinfo = itLcOnCcMapping->lc;
437  LteMacSapUser *msu = itLcOnCcMapping->msu;
438  m_rrc->m_cmacSapProvider.at (index)->AddLc (lcinfo, msu);
439  m_rrc->m_ccmRrcSapProvider->AddLc (lcinfo, msu);
440  }
441 
442  if (rlcTypeId == LteRlcAm::GetTypeId ())
443  {
444  drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::AM;
445  }
446  else
447  {
448  drbInfo->m_rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL;
449  }
450 
451  drbInfo->m_logicalChannelIdentity = lcid;
452  drbInfo->m_logicalChannelConfig.priority = m_rrc->GetLogicalChannelPriority (bearer);
453  drbInfo->m_logicalChannelConfig.logicalChannelGroup = m_rrc->GetLogicalChannelGroup (bearer);
454  if (bearer.IsGbr ())
455  {
456  drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = bearer.gbrQosInfo.gbrUl;
457  }
458  else
459  {
460  drbInfo->m_logicalChannelConfig.prioritizedBitRateKbps = 0;
461  }
462  drbInfo->m_logicalChannelConfig.bucketSizeDurationMs = 1000;
463 
465 }
466 
467 void
469 {
470  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
471  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
472  it != m_drbMap.end ();
473  ++it)
474  {
475  m_drbsToBeStarted.push_back (it->first);
476  }
477 }
478 
479 void
481 {
482  NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
483  for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin ();
484  drbIdIt != m_drbsToBeStarted.end ();
485  ++drbIdIt)
486  {
487  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (*drbIdIt);
488  NS_ASSERT (drbIt != m_drbMap.end ());
489  drbIt->second->m_rlc->Initialize ();
490  if (drbIt->second->m_pdcp)
491  {
492  drbIt->second->m_pdcp->Initialize ();
493  }
494  }
495  m_drbsToBeStarted.clear ();
496 }
497 
498 
499 void
501 {
502  NS_LOG_FUNCTION (this << (uint32_t) m_rnti << (uint32_t) drbid);
503  uint8_t lcid = Drbid2Lcid (drbid);
504  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
505  NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid);
506 
507  // first delete eventual X2-U TEIDs
508  m_rrc->m_x2uTeidInfoMap.erase (it->second->m_gtpTeid);
509 
510  m_drbMap.erase (it);
511  std::vector<uint8_t> ccToRelease = m_rrc->m_ccmRrcSapProvider->ReleaseDataRadioBearer (m_rnti, lcid);
512  std::vector<uint8_t>::iterator itCcToRelease = ccToRelease.begin ();
513  NS_ASSERT_MSG (itCcToRelease != ccToRelease.end (), "request to remove radio bearer with unknown drbid (ComponentCarrierManager)");
514  for (itCcToRelease = ccToRelease.begin (); itCcToRelease != ccToRelease.end (); ++itCcToRelease)
515  {
516  m_rrc->m_cmacSapProvider.at (*itCcToRelease)->ReleaseLc (m_rnti, lcid);
517  }
519  rrcd.havePhysicalConfigDedicated = false;
520  rrcd.drbToReleaseList.push_back (drbid);
521  //populating RadioResourceConfigDedicated information element as per 3GPP TS 36.331 version 9.2.0
522  rrcd.havePhysicalConfigDedicated = true;
524 
525  //populating RRCConnectionReconfiguration message as per 3GPP TS 36.331 version 9.2.0 Release 9
527  msg.haveMeasConfig = false;
528  msg.haveMobilityControlInfo = false;
529  msg.radioResourceConfigDedicated = rrcd;
531  // ToDo: Resend in eny case this configuration
532  // needs to be initialized
533  msg.haveNonCriticalExtension = false;
534  //RRC Connection Reconfiguration towards UE
535  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg);
536 }
537 
538 void
539 LteEnbRrc::DoSendReleaseDataRadioBearer (uint64_t imsi, uint16_t rnti, uint8_t bearerId)
540 {
541  Ptr<UeManager> ueManager = GetUeManager (rnti);
542  // Bearer de-activation towards UE
543  ueManager->ReleaseDataRadioBearer (bearerId);
544  // Bearer de-activation indication towards epc-enb application
545  m_s1SapProvider->DoSendReleaseIndication (imsi,rnti,bearerId);
546 }
547 
548 void
550 {
551  NS_LOG_FUNCTION (this);
552  switch (m_state)
553  {
555  case CONNECTION_SETUP:
559  case HANDOVER_JOINING:
560  case HANDOVER_LEAVING:
561  // a previous reconfiguration still ongoing, we need to wait for it to be finished
563  break;
564 
565  case CONNECTED_NORMALLY:
566  {
569  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg);
572  }
573  break;
574 
575  default:
576  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
577  break;
578  }
579 }
580 
581 void
582 UeManager::PrepareHandover (uint16_t cellId)
583 {
584  NS_LOG_FUNCTION (this << cellId);
585  switch (m_state)
586  {
587  case CONNECTED_NORMALLY:
588  {
589  m_targetCellId = cellId;
591  params.oldEnbUeX2apId = m_rnti;
593  params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
594  params.targetCellId = cellId;
595  params.mmeUeS1apId = m_imsi;
596  params.ueAggregateMaxBitRateDownlink = 200 * 1000;
597  params.ueAggregateMaxBitRateUplink = 100 * 1000;
598  params.bearers = GetErabList ();
599 
602  hpi.asConfig.sourceDlCarrierFreq = m_rrc->m_dlEarfcn;
603  hpi.asConfig.sourceMeasConfig = m_rrc->m_ueMeasConfig;
607  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity;
609  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIndication;
610  hpi.asConfig.sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity = m_rrc->m_sib1.at (m_componentCarrierId).cellAccessRelatedInfo.csgIdentity;
611  LteEnbCmacSapProvider::RachConfig rc = m_rrc->m_cmacSapProvider.at (m_componentCarrierId)->GetRachConfig ();
617  params.rrcContext = m_rrc->m_rrcSapUser->EncodeHandoverPreparationInformation (hpi);
618 
619  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
620  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
621  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
622  NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId);
623  NS_LOG_LOGIC ("rrcContext = " << params.rrcContext);
624 
625  m_rrc->m_x2SapProvider->SendHandoverRequest (params);
627  }
628  break;
629 
630  default:
631  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
632  break;
633  }
634 
635 }
636 
637 void
639 {
640  NS_LOG_FUNCTION (this);
641 
642  NS_ASSERT_MSG (params.notAdmittedBearers.empty (), "not admission of some bearers upon handover is not supported");
643  NS_ASSERT_MSG (params.admittedBearers.size () == m_drbMap.size (), "not enough bearers in admittedBearers");
644 
645  // note: the Handover command from the target eNB to the source eNB
646  // is expected to be sent transparently to the UE; however, here we
647  // decode the message and eventually reencode it. This way we can
648  // support both a real RRC protocol implementation and an ideal one
649  // without actual RRC protocol encoding.
650 
651  Ptr<Packet> encodedHandoverCommand = params.rrcContext;
652  LteRrcSap::RrcConnectionReconfiguration handoverCommand = m_rrc->m_rrcSapUser->DecodeHandoverCommand (encodedHandoverCommand);
653  m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, handoverCommand);
655  m_handoverLeavingTimeout = Simulator::Schedule (m_rrc->m_handoverLeavingTimeoutDuration,
657  m_rrc, m_rnti);
658  NS_ASSERT (handoverCommand.haveMobilityControlInfo);
659  m_rrc->m_handoverStartTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, handoverCommand.mobilityControlInfo.targetPhysCellId);
660 
662  sst.oldEnbUeX2apId = params.oldEnbUeX2apId;
663  sst.newEnbUeX2apId = params.newEnbUeX2apId;
664  sst.sourceCellId = params.sourceCellId;
665  sst.targetCellId = params.targetCellId;
666  for ( std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.begin ();
667  drbIt != m_drbMap.end ();
668  ++drbIt)
669  {
670  // SN status transfer is only for AM RLC
671  if (0 != drbIt->second->m_rlc->GetObject<LteRlcAm> ())
672  {
673  LtePdcp::Status status = drbIt->second->m_pdcp->GetStatus ();
675  i.dlPdcpSn = status.txSn;
676  i.ulPdcpSn = status.rxSn;
677  sst.erabsSubjectToStatusTransferList.push_back (i);
678  }
679  }
680  m_rrc->m_x2SapProvider->SendSnStatusTransfer (sst);
681 }
682 
683 
686 {
687  NS_LOG_FUNCTION (this);
689 }
690 
693 {
694  NS_LOG_FUNCTION (this);
696 }
697 
698 void
700 {
701  NS_LOG_FUNCTION (this << p << (uint16_t) bid);
702  switch (m_state)
703  {
705  case CONNECTION_SETUP:
706  NS_LOG_WARN ("not connected, discarding packet");
707  return;
708  break;
709 
710  case CONNECTED_NORMALLY:
714  case HANDOVER_JOINING:
716  {
717  NS_LOG_LOGIC ("queueing data on PDCP for transmission over the air");
719  params.pdcpSdu = p;
720  params.rnti = m_rnti;
721  params.lcid = Bid2Lcid (bid);
722  uint8_t drbid = Bid2Drbid (bid);
723  //Transmit PDCP sdu only if DRB ID found in drbMap
724  std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
725  if (it != m_drbMap.end ())
726  {
728  if (bearerInfo != NULL)
729  {
730  LtePdcpSapProvider* pdcpSapProvider = bearerInfo->m_pdcp->GetLtePdcpSapProvider ();
731  pdcpSapProvider->TransmitPdcpSdu (params);
732  }
733  }
734  }
735  break;
736 
737  case HANDOVER_LEAVING:
738  {
739  NS_LOG_LOGIC ("forwarding data to target eNB over X2-U");
740  uint8_t drbid = Bid2Drbid (bid);
741  EpcX2Sap::UeDataParams params;
742  params.sourceCellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
743  params.targetCellId = m_targetCellId;
744  params.gtpTeid = GetDataRadioBearerInfo (drbid)->m_gtpTeid;
745  params.ueData = p;
746  m_rrc->m_x2SapProvider->SendUeData (params);
747  }
748  break;
749 
750  default:
751  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
752  break;
753  }
754 }
755 
756 std::vector<EpcX2Sap::ErabToBeSetupItem>
758 {
759  NS_LOG_FUNCTION (this);
760  std::vector<EpcX2Sap::ErabToBeSetupItem> ret;
761  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
762  it != m_drbMap.end ();
763  ++it)
764  {
766  etbsi.erabId = it->second->m_epsBearerIdentity;
767  etbsi.erabLevelQosParameters = it->second->m_epsBearer;
768  etbsi.dlForwarding = false;
769  etbsi.transportLayerAddress = it->second->m_transportLayerAddress;
770  etbsi.gtpTeid = it->second->m_gtpTeid;
771  ret.push_back (etbsi);
772  }
773  return ret;
774 }
775 
776 void
778 {
779  NS_LOG_FUNCTION (this);
780  switch (m_state)
781  {
783  NS_LOG_INFO ("Send UE CONTEXT RELEASE from target eNB to source eNB");
784  EpcX2SapProvider::UeContextReleaseParams ueCtxReleaseParams;
785  ueCtxReleaseParams.oldEnbUeX2apId = m_sourceX2apId;
786  ueCtxReleaseParams.newEnbUeX2apId = m_rnti;
787  ueCtxReleaseParams.sourceCellId = m_sourceCellId;
788  ueCtxReleaseParams.targetCellId = m_targetCellId;
789  m_rrc->m_x2SapProvider->SendUeContextRelease (ueCtxReleaseParams);
791  m_rrc->m_handoverEndOkTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
792  break;
793 
794  default:
795  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
796  break;
797  }
798 }
799 
800 void
802 {
803  NS_LOG_FUNCTION (this << cellId);
804  switch (m_state)
805  {
807  NS_ASSERT (cellId == m_targetCellId);
808  NS_LOG_INFO ("target eNB sent HO preparation failure, aborting HO");
810  break;
811 
812  default:
813  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
814  break;
815  }
816 }
817 
818 void
820 {
821  NS_LOG_FUNCTION (this);
822  for (std::vector<EpcX2Sap::ErabsSubjectToStatusTransferItem>::iterator erabIt
823  = params.erabsSubjectToStatusTransferList.begin ();
824  erabIt != params.erabsSubjectToStatusTransferList.end ();
825  ++erabIt)
826  {
827  // LtePdcp::Status status;
828  // status.txSn = erabIt->dlPdcpSn;
829  // status.rxSn = erabIt->ulPdcpSn;
830  // uint8_t drbId = Bid2Drbid (erabIt->erabId);
831  // std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (drbId);
832  // NS_ASSERT_MSG (drbIt != m_drbMap.end (), "could not find DRBID " << (uint32_t) drbId);
833  // drbIt->second->m_pdcp->SetStatus (status);
834  }
835 }
836 
837 void
839 {
840  NS_LOG_FUNCTION (this);
841  NS_ASSERT_MSG (m_state == HANDOVER_LEAVING, "method unexpected in state " << ToString (m_state));
843 }
844 
845 
846 // methods forwarded from RRC SAP
847 
848 void
850 {
851  NS_LOG_FUNCTION (this);
852  m_srb0->m_rlc->SetLteRlcSapUser (params.srb0SapUser);
853  m_srb1->m_pdcp->SetLtePdcpSapUser (params.srb1SapUser);
854 }
855 
856 void
858 {
859  NS_LOG_FUNCTION (this);
860  switch (m_state)
861  {
863  {
865 
866  if (m_rrc->m_admitRrcConnectionRequest == true)
867  {
868  m_imsi = msg.ueIdentity;
869  if (m_rrc->m_s1SapProvider != 0)
870  {
871  m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti);
872  }
873 
874  // send RRC CONNECTION SETUP to UE
878  m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2);
879 
882  m_rrc->m_connectionSetupTimeoutDuration,
885  }
886  else
887  {
888  NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti);
889 
890  // send RRC CONNECTION REJECT to UE
892  rejectMsg.waitTime = 3;
893  m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg);
894 
896  m_rrc->m_connectionRejectedTimeoutDuration,
899  }
900  }
901  break;
902 
903  default:
904  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
905  break;
906  }
907 }
908 
909 void
911 {
912  NS_LOG_FUNCTION (this);
913  switch (m_state)
914  {
915  case CONNECTION_SETUP:
917  if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers > 1)
918  {
919  m_pendingRrcConnectionReconfiguration = true; // Force Reconfiguration
921  }
922  else
923  {
926  }
928  m_rrc->m_connectionEstablishedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
929  break;
930 
931  default:
932  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
933  break;
934  }
935 }
936 
937 void
939 {
940  NS_LOG_FUNCTION (this);
941  switch (m_state)
942  {
946  {
947  // configure MAC (and scheduler)
949  req.m_rnti = m_rnti;
951  for (uint8_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
952  {
953  m_rrc->m_cmacSapProvider.at (i)->UeUpdateConfigurationReq (req);
954 
955  // configure PHY
956  m_rrc->m_cphySapProvider.at (i)->SetTransmissionMode (req.m_rnti, req.m_transmissionMode);
958  m_rrc->m_cphySapProvider.at (i)->SetPa (m_rnti, paDouble);
959  }
960 
962  }
964  m_rrc->m_connectionReconfigurationTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti);
965  break;
966 
967  // This case is added to NS-3 in order to handle bearer de-activation scenario for CONNECTED state UE
968  case CONNECTED_NORMALLY:
969  NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state " << ToString (m_state));
970  break;
971 
972  case HANDOVER_LEAVING:
973  NS_LOG_INFO ("ignoring RecvRrcConnectionReconfigurationCompleted in state " << ToString (m_state));
974  break;
975 
976  case HANDOVER_JOINING:
977  {
979  NS_LOG_INFO ("Send PATH SWITCH REQUEST to the MME");
981  params.rnti = m_rnti;
982  params.cellId = m_rrc->ComponentCarrierToCellId (m_componentCarrierId);
983  params.mmeUeS1Id = m_imsi;
985  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
986  it != m_drbMap.end ();
987  ++it)
988  {
990  b.epsBearerId = it->second->m_epsBearerIdentity;
991  b.teid = it->second->m_gtpTeid;
992  params.bearersToBeSwitched.push_back (b);
993  }
994  m_rrc->m_s1SapProvider->PathSwitchRequest (params);
995  }
996  break;
997 
998  default:
999  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
1000  break;
1001  }
1002 }
1003 
1004 void
1006 {
1007  NS_LOG_FUNCTION (this);
1008  switch (m_state)
1009  {
1010  case CONNECTED_NORMALLY:
1011  break;
1012 
1013  case HANDOVER_LEAVING:
1015  break;
1016 
1017  default:
1018  NS_FATAL_ERROR ("method unexpected in state " << ToString (m_state));
1019  break;
1020  }
1021 
1025  m_rrc->m_rrcSapUser->SendRrcConnectionReestablishment (m_rnti, msg2);
1027 }
1028 
1029 void
1031 {
1032  NS_LOG_FUNCTION (this);
1034 }
1035 
1036 void
1038 {
1039  uint8_t measId = msg.measResults.measId;
1040  NS_LOG_FUNCTION (this << (uint16_t) measId);
1041  NS_LOG_LOGIC ("measId " << (uint16_t) measId
1042  << " haveMeasResultNeighCells " << msg.measResults.haveMeasResultNeighCells
1043  << " measResultListEutra " << msg.measResults.measResultListEutra.size ()
1044  << " haveScellsMeas " << msg.measResults.haveScellsMeas
1045  << " measScellResultList " << msg.measResults.measScellResultList.measResultScell.size ());
1046  NS_LOG_LOGIC ("serving cellId " << m_rrc->ComponentCarrierToCellId (m_componentCarrierId)
1047  << " RSRP " << (uint16_t) msg.measResults.rsrpResult
1048  << " RSRQ " << (uint16_t) msg.measResults.rsrqResult);
1049 
1050  for (std::list <LteRrcSap::MeasResultEutra>::iterator it = msg.measResults.measResultListEutra.begin ();
1051  it != msg.measResults.measResultListEutra.end ();
1052  ++it)
1053  {
1054  NS_LOG_LOGIC ("neighbour cellId " << it->physCellId
1055  << " RSRP " << (it->haveRsrpResult ? (uint16_t) it->rsrpResult : 255)
1056  << " RSRQ " << (it->haveRsrqResult ? (uint16_t) it->rsrqResult : 255));
1057  }
1058 
1059  if ((m_rrc->m_handoverManagementSapProvider != 0)
1060  && (m_rrc->m_handoverMeasIds.find (measId) != m_rrc->m_handoverMeasIds.end ()))
1061  {
1062  // this measurement was requested by the handover algorithm
1063  m_rrc->m_handoverManagementSapProvider->ReportUeMeas (m_rnti,
1064  msg.measResults);
1065  }
1066 
1067  if ((m_rrc->m_ccmRrcSapProvider != 0)
1068  && (m_rrc->m_componentCarrierMeasIds.find (measId) != m_rrc->m_componentCarrierMeasIds.end ()))
1069  {
1070  // this measurement was requested by the handover algorithm
1071  m_rrc->m_ccmRrcSapProvider->ReportUeMeas (m_rnti,
1072  msg.measResults);
1073  }
1074 
1075  if ((m_rrc->m_anrSapProvider != 0)
1076  && (m_rrc->m_anrMeasIds.find (measId) != m_rrc->m_anrMeasIds.end ()))
1077  {
1078  // this measurement was requested by the ANR function
1079  m_rrc->m_anrSapProvider->ReportUeMeas (msg.measResults);
1080  }
1081 
1082  if ((m_rrc->m_ffrRrcSapProvider.at (0) != 0)
1083  && (m_rrc->m_ffrMeasIds.find (measId) != m_rrc->m_ffrMeasIds.end ()))
1084  {
1085  // this measurement was requested by the FFR function
1086  m_rrc->m_ffrRrcSapProvider.at (0)->ReportUeMeas (m_rnti, msg.measResults);
1087  }
1088  if (msg.measResults.haveScellsMeas == true)
1089  {
1090  for (std::list <LteRrcSap::MeasResultScell>::iterator it = msg.measResults.measScellResultList.measResultScell.begin ();
1092  ++it)
1093  {
1094  m_rrc->m_ffrRrcSapProvider.at (it->servFreqId)->ReportUeMeas (m_rnti, msg.measResults);
1097  }
1098  }
1099 
1101  m_rrc->m_ccmRrcSapProvider->ReportUeMeas (m_rnti, msg.measResults);
1102  // fire a trace source
1103  m_rrc->m_recvMeasurementReportTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, msg);
1104 
1105 } // end of UeManager::RecvMeasurementReport
1106 
1107 
1108 // methods forwarded from CMAC SAP
1109 
1110 void
1112 {
1113  NS_LOG_FUNCTION (this << m_rnti);
1114  // at this stage used only by the scheduler for updating txMode
1115 
1117 
1119 
1120  // reconfigure the UE RRC
1122 }
1123 
1124 
1125 // methods forwarded from PDCP SAP
1126 
1127 void
1129 {
1130  NS_LOG_FUNCTION (this);
1131  if (params.lcid > 2)
1132  {
1133  // data radio bearer
1134  EpsBearerTag tag;
1135  tag.SetRnti (params.rnti);
1136  tag.SetBid (Lcid2Bid (params.lcid));
1137  params.pdcpSdu->AddPacketTag (tag);
1138  m_rrc->m_forwardUpCallback (params.pdcpSdu);
1139  }
1140 }
1141 
1142 
1143 uint16_t
1145 {
1146  return m_rnti;
1147 }
1148 
1149 uint64_t
1151 {
1152  return m_imsi;
1153 }
1154 
1155 uint8_t
1157 {
1158  return m_componentCarrierId;
1159 }
1160 
1161 uint16_t
1163 {
1165 }
1166 
1167 void
1169 {
1170  NS_LOG_FUNCTION (this);
1172  for (uint16_t i = 0; i < m_rrc->m_numberOfComponentCarriers; i++)
1173  {
1174  m_rrc->m_cphySapProvider.at (i)->SetSrsConfigurationIndex (m_rnti, srsConfIndex);
1175  }
1176  switch (m_state)
1177  {
1178  case INITIAL_RANDOM_ACCESS:
1179  // do nothing, srs conf index will be correctly enforced upon
1180  // RRC connection establishment
1181  break;
1182 
1183  default:
1185  break;
1186  }
1187 }
1188 
1191 {
1192  return m_state;
1193 }
1194 
1195 void
1197 {
1198  NS_LOG_FUNCTION (this);
1199  m_physicalConfigDedicated.pdschConfigDedicated = pdschConfigDedicated;
1200 
1202 
1203  // reconfigure the UE RRC
1205 }
1206 
1207 uint8_t
1209 {
1210  NS_LOG_FUNCTION (this);
1211  const uint8_t MAX_DRB_ID = 32;
1212  for (int drbid = (m_lastAllocatedDrbid + 1) % MAX_DRB_ID;
1213  drbid != m_lastAllocatedDrbid;
1214  drbid = (drbid + 1) % MAX_DRB_ID)
1215  {
1216  if (drbid != 0) // 0 is not allowed
1217  {
1218  if (m_drbMap.find (drbid) == m_drbMap.end ())
1219  {
1220  m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (drbid, drbInfo));
1221  drbInfo->m_drbIdentity = drbid;
1222  m_lastAllocatedDrbid = drbid;
1223  return drbid;
1224  }
1225  }
1226  }
1227  NS_FATAL_ERROR ("no more data radio bearer ids available");
1228  return 0;
1229 }
1230 
1233 {
1234  NS_LOG_FUNCTION (this << (uint32_t) drbid);
1235  NS_ASSERT (0 != drbid);
1236  std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
1237  NS_ABORT_IF (it == m_drbMap.end ());
1238  return it->second;
1239 }
1240 
1241 
1242 void
1244 {
1245  NS_LOG_FUNCTION (this << (uint32_t) drbid);
1246  std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.find (drbid);
1247  NS_ASSERT_MSG (it != m_drbMap.end (), "request to remove radio bearer with unknown drbid " << drbid);
1248  m_drbMap.erase (it);
1249 }
1250 
1251 
1254 {
1255  NS_LOG_FUNCTION (this);
1260  msg.haveMobilityControlInfo = false;
1261  msg.haveMeasConfig = true;
1262  msg.measConfig = m_rrc->m_ueMeasConfig;
1263  if ( m_caSupportConfigured == false && m_rrc->m_numberOfComponentCarriers > 1)
1264  {
1265  m_caSupportConfigured = true;
1266  NS_LOG_FUNCTION ( this << "CA not configured. Configure now!" );
1267  msg.haveNonCriticalExtension = true;
1269  NS_LOG_FUNCTION ( this << " haveNonCriticalExtension " << msg.haveNonCriticalExtension );
1270  }
1271  else
1272  {
1273  msg.haveNonCriticalExtension = false;
1274  }
1275 
1276  return msg;
1277 }
1278 
1281 {
1283 
1284  if (m_srb1 != 0)
1285  {
1287  stam.srbIdentity = m_srb1->m_srbIdentity;
1288  stam.logicalChannelConfig = m_srb1->m_logicalChannelConfig;
1289  rrcd.srbToAddModList.push_back (stam);
1290  }
1291 
1292  for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
1293  it != m_drbMap.end ();
1294  ++it)
1295  {
1297  dtam.epsBearerIdentity = it->second->m_epsBearerIdentity;
1298  dtam.drbIdentity = it->second->m_drbIdentity;
1299  dtam.rlcConfig = it->second->m_rlcConfig;
1300  dtam.logicalChannelIdentity = it->second->m_logicalChannelIdentity;
1301  dtam.logicalChannelConfig = it->second->m_logicalChannelConfig;
1302  rrcd.drbToAddModList.push_back (dtam);
1303  }
1304 
1305  rrcd.havePhysicalConfigDedicated = true;
1307  return rrcd;
1308 }
1309 
1310 uint8_t
1312 {
1314 }
1315 
1316 uint8_t
1318 {
1319  NS_ASSERT (lcid > 2);
1320  return lcid - 2;
1321 }
1322 
1323 uint8_t
1324 UeManager::Drbid2Lcid (uint8_t drbid)
1325 {
1326  return drbid + 2;
1327 }
1328 uint8_t
1329 UeManager::Lcid2Bid (uint8_t lcid)
1330 {
1331  NS_ASSERT (lcid > 2);
1332  return lcid - 2;
1333 }
1334 
1335 uint8_t
1336 UeManager::Bid2Lcid (uint8_t bid)
1337 {
1338  return bid + 2;
1339 }
1340 
1341 uint8_t
1342 UeManager::Drbid2Bid (uint8_t drbid)
1343 {
1344  return drbid;
1345 }
1346 
1347 uint8_t
1349 {
1350  return bid;
1351 }
1352 
1353 
1354 void
1356 {
1357  NS_LOG_FUNCTION (this << ToString (newState));
1358  State oldState = m_state;
1359  m_state = newState;
1360  NS_LOG_INFO (this << " IMSI " << m_imsi << " RNTI " << m_rnti << " UeManager "
1361  << ToString (oldState) << " --> " << ToString (newState));
1362  m_stateTransitionTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, oldState, newState);
1363 
1364  switch (newState)
1365  {
1366  case INITIAL_RANDOM_ACCESS:
1367  case HANDOVER_JOINING:
1368  NS_FATAL_ERROR ("cannot switch to an initial state");
1369  break;
1370 
1371  case CONNECTION_SETUP:
1372  break;
1373 
1374  case CONNECTED_NORMALLY:
1375  {
1377  {
1379  }
1381  {
1383  }
1384  }
1385  break;
1386 
1388  break;
1389 
1391  break;
1392 
1393  case HANDOVER_LEAVING:
1394  break;
1395 
1396  default:
1397  break;
1398  }
1399 }
1400 
1403 {
1404  NS_LOG_FUNCTION ( this );
1406 
1407  // LteRrcSap::SCellToAddMod scell;
1408  std::list<LteRrcSap::SCellToAddMod> SccCon;
1409 
1410  // sCellToReleaseList is always empty since no Scc is released
1411 
1412  for (auto &it: m_rrc->m_componentCarrierPhyConf)
1413  {
1414  uint8_t ccId = it.first;
1415 
1416  if (ccId == m_componentCarrierId)
1417  {
1418  // Skip primary CC.
1419  continue;
1420  }
1421  else if (ccId < m_componentCarrierId)
1422  {
1423  // Shift all IDs below PCC forward so PCC can use CC ID 1.
1424  ccId++;
1425  }
1426 
1427  Ptr<ComponentCarrierEnb> eNbCcm = it.second;
1428  LteRrcSap::SCellToAddMod component;
1429  component.sCellIndex = ccId;
1430  component.cellIdentification.physCellId = eNbCcm->GetCellId ();
1431  component.cellIdentification.dlCarrierFreq = eNbCcm->GetDlEarfcn ();
1433  component.radioResourceConfigCommonSCell.nonUlConfiguration.dlBandwidth = eNbCcm->GetDlBandwidth ();
1435  component.radioResourceConfigCommonSCell.nonUlConfiguration.pdschConfigCommon.referenceSignalPower = m_rrc->m_cphySapProvider.at (0)->GetReferenceSignalPower ();
1438  component.radioResourceConfigCommonSCell.ulConfiguration.ulFreqInfo.ulCarrierFreq = eNbCcm->GetUlEarfcn ();
1439  component.radioResourceConfigCommonSCell.ulConfiguration.ulFreqInfo.ulBandwidth = eNbCcm->GetUlBandwidth ();
1441  //component.radioResourceConfigCommonSCell.ulConfiguration.soundingRsUlConfigCommon.type = LteRrcSap::SoundingRsUlConfigDedicated::SETUP;
1445 
1446  if (true)
1447  {
1448  component.haveRadioResourceConfigDedicatedSCell = true;
1464  }
1465  else
1466  {
1467  component.haveRadioResourceConfigDedicatedSCell = false;
1468  }
1469  SccCon.push_back (component);
1470  }
1471  ncec.sCellsToAddModList = SccCon;
1472 
1473  return ncec;
1474 }
1475 
1476 
1478 // eNB RRC methods
1480 
1482 
1484  : m_x2SapProvider (0),
1485  m_cmacSapProvider (0),
1486  m_handoverManagementSapProvider (0),
1487  m_ccmRrcSapProvider (0),
1488  m_anrSapProvider (0),
1489  m_ffrRrcSapProvider (0),
1490  m_rrcSapUser (0),
1491  m_macSapProvider (0),
1492  m_s1SapProvider (0),
1493  m_cphySapProvider (0),
1494  m_configured (false),
1495  m_lastAllocatedRnti (0),
1496  m_srsCurrentPeriodicityId (0),
1497  m_lastAllocatedConfigurationIndex (0),
1498  m_reconfigureUes (false),
1499  m_numberOfComponentCarriers (0),
1500  m_carriersConfigured (false)
1501 {
1502  NS_LOG_FUNCTION (this);
1503  m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, 0));
1506  m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this));
1510  m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this));
1512  m_cphySapProvider.push_back (0);
1513  m_cmacSapProvider.push_back (0);
1514  m_ffrRrcSapProvider.push_back (0);
1515 }
1516 
1517 void
1519 {
1520  NS_ASSERT_MSG (!m_carriersConfigured, "Secondary carriers can be configured only once.");
1521  m_componentCarrierPhyConf = ccPhyConf;
1522  m_numberOfComponentCarriers = ccPhyConf.size ();
1523 
1525 
1526  for (uint8_t i = 1; i < m_numberOfComponentCarriers; i++)
1527  {
1528  m_cphySapUser.push_back (new MemberLteEnbCphySapUser<LteEnbRrc> (this));
1529  m_cmacSapUser.push_back (new EnbRrcMemberLteEnbCmacSapUser (this, i));
1530  m_ffrRrcSapUser.push_back (new MemberLteFfrRrcSapUser<LteEnbRrc> (this));
1531  m_cphySapProvider.push_back (0);
1532  m_cmacSapProvider.push_back (0);
1533  m_ffrRrcSapProvider.push_back (0);
1534  }
1535  m_carriersConfigured = true;
1537 }
1538 
1540 {
1541  NS_LOG_FUNCTION (this);
1542 }
1543 
1544 
1545 void
1547 {
1548  NS_LOG_FUNCTION (this);
1549  for ( uint8_t i = 0; i < m_numberOfComponentCarriers ; i++)
1550  {
1551  delete m_cphySapUser[i];
1552  delete m_cmacSapUser[i];
1553  delete m_ffrRrcSapUser[i];
1554  }
1555  //delete m_cphySapUser;
1556  m_cphySapUser.erase (m_cphySapUser.begin (),m_cphySapUser.end ());
1557  m_cphySapUser.clear ();
1558  //delete m_cmacSapUser;
1559  m_cmacSapUser.erase (m_cmacSapUser.begin (),m_cmacSapUser.end ());
1560  m_cmacSapUser.clear ();
1561  //delete m_ffrRrcSapUser;
1562  m_ffrRrcSapUser.erase (m_ffrRrcSapUser.begin (),m_ffrRrcSapUser.end ());
1563  m_ffrRrcSapUser.clear ();
1564  m_ueMap.clear ();
1566  delete m_ccmRrcSapUser;
1567  delete m_anrSapUser;
1568  delete m_rrcSapProvider;
1569  delete m_x2SapUser;
1570  delete m_s1SapUser;
1571 
1572 }
1573 
1574 TypeId
1576 {
1577  NS_LOG_FUNCTION ("LteEnbRrc::GetTypeId");
1578  static TypeId tid = TypeId ("ns3::LteEnbRrc")
1579  .SetParent<Object> ()
1580  .SetGroupName("Lte")
1581  .AddConstructor<LteEnbRrc> ()
1582  .AddAttribute ("UeMap", "List of UeManager by C-RNTI.",
1583  ObjectMapValue (),
1585  MakeObjectMapChecker<UeManager> ())
1586  .AddAttribute ("DefaultTransmissionMode",
1587  "The default UEs' transmission mode (0: SISO)",
1588  UintegerValue (0), // default tx-mode
1590  MakeUintegerChecker<uint8_t> ())
1591  .AddAttribute ("EpsBearerToRlcMapping",
1592  "Specify which type of RLC will be used for each type of EPS bearer. ",
1595  MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways",
1596  RLC_UM_ALWAYS, "RlcUmAlways",
1597  RLC_AM_ALWAYS, "RlcAmAlways",
1598  PER_BASED, "PacketErrorRateBased"))
1599  .AddAttribute ("SystemInformationPeriodicity",
1600  "The interval for sending system information (Time value)",
1601  TimeValue (MilliSeconds (80)),
1603  MakeTimeChecker ())
1604 
1605  // SRS related attributes
1606  .AddAttribute ("SrsPeriodicity",
1607  "The SRS periodicity in milliseconds",
1608  UintegerValue (40),
1611  MakeUintegerChecker<uint32_t> ())
1612 
1613  // Timeout related attributes
1614  .AddAttribute ("ConnectionRequestTimeoutDuration",
1615  "After a RA attempt, if no RRC CONNECTION REQUEST is "
1616  "received before this time, the UE context is destroyed. "
1617  "Must account for reception of RAR and transmission of "
1618  "RRC CONNECTION REQUEST over UL GRANT.",
1619  TimeValue (MilliSeconds (15)),
1621  MakeTimeChecker ())
1622  .AddAttribute ("ConnectionSetupTimeoutDuration",
1623  "After accepting connection request, if no RRC CONNECTION "
1624  "SETUP COMPLETE is received before this time, the UE "
1625  "context is destroyed. Must account for the UE's reception "
1626  "of RRC CONNECTION SETUP and transmission of RRC CONNECTION "
1627  "SETUP COMPLETE.",
1628  TimeValue (MilliSeconds (150)),
1630  MakeTimeChecker ())
1631  .AddAttribute ("ConnectionRejectedTimeoutDuration",
1632  "Time to wait between sending a RRC CONNECTION REJECT and "
1633  "destroying the UE context",
1634  TimeValue (MilliSeconds (30)),
1636  MakeTimeChecker ())
1637  .AddAttribute ("HandoverJoiningTimeoutDuration",
1638  "After accepting a handover request, if no RRC CONNECTION "
1639  "RECONFIGURATION COMPLETE is received before this time, the "
1640  "UE context is destroyed. Must account for reception of "
1641  "X2 HO REQ ACK by source eNB, transmission of the Handover "
1642  "Command, non-contention-based random access and reception "
1643  "of the RRC CONNECTION RECONFIGURATION COMPLETE message.",
1644  TimeValue (MilliSeconds (200)),
1646  MakeTimeChecker ())
1647  .AddAttribute ("HandoverLeavingTimeoutDuration",
1648  "After issuing a Handover Command, if neither RRC "
1649  "CONNECTION RE-ESTABLISHMENT nor X2 UE Context Release has "
1650  "been previously received, the UE context is destroyed.",
1651  TimeValue (MilliSeconds (500)),
1653  MakeTimeChecker ())
1654 
1655  // Cell selection related attribute
1656  .AddAttribute ("QRxLevMin",
1657  "One of information transmitted within the SIB1 message, "
1658  "indicating the required minimum RSRP level that any UE must "
1659  "receive from this cell before it is allowed to camp to this "
1660  "cell. The default value -70 corresponds to -140 dBm and is "
1661  "the lowest possible value as defined by Section 6.3.4 of "
1662  "3GPP TS 36.133. This restriction, however, only applies to "
1663  "initial cell selection and EPC-enabled simulation.",
1665  IntegerValue (-70),
1667  MakeIntegerChecker<int8_t> (-70, -22))
1668  .AddAttribute ("NumberOfComponentCarriers",
1669  "Number of Component Carriers ",
1670  UintegerValue (1),
1672  MakeIntegerChecker<int16_t> (MIN_NO_CC, MAX_NO_CC))
1673 
1674  // Handover related attributes
1675  .AddAttribute ("AdmitHandoverRequest",
1676  "Whether to admit an X2 handover request from another eNB",
1677  BooleanValue (true),
1679  MakeBooleanChecker ())
1680  .AddAttribute ("AdmitRrcConnectionRequest",
1681  "Whether to admit a connection request from a UE",
1682  BooleanValue (true),
1684  MakeBooleanChecker ())
1685 
1686  // UE measurements related attributes
1687  .AddAttribute ("RsrpFilterCoefficient",
1688  "Determines the strength of smoothing effect induced by "
1689  "layer 3 filtering of RSRP in all attached UE; "
1690  "if set to 0, no layer 3 filtering is applicable",
1691  // i.e. the variable k in 3GPP TS 36.331 section 5.5.3.2
1692  UintegerValue (4),
1694  MakeUintegerChecker<uint8_t> (0))
1695  .AddAttribute ("RsrqFilterCoefficient",
1696  "Determines the strength of smoothing effect induced by "
1697  "layer 3 filtering of RSRQ in all attached UE; "
1698  "if set to 0, no layer 3 filtering is applicable",
1699  // i.e. the variable k in 3GPP TS 36.331 section 5.5.3.2
1700  UintegerValue (4),
1702  MakeUintegerChecker<uint8_t> (0))
1703 
1704  // Trace sources
1705  .AddTraceSource ("NewUeContext",
1706  "Fired upon creation of a new UE context.",
1708  "ns3::LteEnbRrc::NewUeContextTracedCallback")
1709  .AddTraceSource ("ConnectionEstablished",
1710  "Fired upon successful RRC connection establishment.",
1712  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1713  .AddTraceSource ("ConnectionReconfiguration",
1714  "trace fired upon RRC connection reconfiguration",
1716  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1717  .AddTraceSource ("HandoverStart",
1718  "trace fired upon start of a handover procedure",
1720  "ns3::LteEnbRrc::HandoverStartTracedCallback")
1721  .AddTraceSource ("HandoverEndOk",
1722  "trace fired upon successful termination of a handover procedure",
1724  "ns3::LteEnbRrc::ConnectionHandoverTracedCallback")
1725  .AddTraceSource ("RecvMeasurementReport",
1726  "trace fired when measurement report is received",
1728  "ns3::LteEnbRrc::ReceiveReportTracedCallback")
1729  ;
1730  return tid;
1731 }
1732 
1733 void
1735 {
1736  NS_LOG_FUNCTION (this << s);
1737  m_x2SapProvider = s;
1738 }
1739 
1740 EpcX2SapUser*
1742 {
1743  NS_LOG_FUNCTION (this);
1744  return m_x2SapUser;
1745 }
1746 
1747 void
1749 {
1750  NS_LOG_FUNCTION (this << s);
1751  m_cmacSapProvider.at (0) = s;
1752 }
1753 
1754 void
1756 {
1757  NS_LOG_FUNCTION (this << s);
1758  m_cmacSapProvider.at (pos) = s;
1759 }
1760 
1763 {
1764  NS_LOG_FUNCTION (this);
1765  return m_cmacSapUser.at (0);
1766 }
1767 
1770 {
1771  NS_LOG_FUNCTION (this);
1772  return m_cmacSapUser.at (pos);
1773 }
1774 
1775 void
1777 {
1778  NS_LOG_FUNCTION (this << s);
1780 }
1781 
1784 {
1785  NS_LOG_FUNCTION (this);
1787 }
1788 
1789 void
1791 {
1792  NS_LOG_FUNCTION (this << s);
1793  m_ccmRrcSapProvider = s;
1794 }
1795 
1798 {
1799  NS_LOG_FUNCTION (this);
1800  return m_ccmRrcSapUser;
1801 }
1802 
1803 void
1805 {
1806  NS_LOG_FUNCTION (this << s);
1807  m_anrSapProvider = s;
1808 }
1809 
1812 {
1813  NS_LOG_FUNCTION (this);
1814  return m_anrSapUser;
1815 }
1816 
1817 void
1819 {
1820  NS_LOG_FUNCTION (this << s);
1821  m_ffrRrcSapProvider.at (0) = s;
1822 }
1823 
1824 void
1826 {
1827  NS_LOG_FUNCTION (this << s);
1828  m_ffrRrcSapProvider.at (index) = s;
1829 }
1830 
1833 {
1834  NS_LOG_FUNCTION (this);
1835  return m_ffrRrcSapUser.at (0);
1836 }
1837 
1840 {
1841  NS_LOG_FUNCTION (this);
1842  NS_ASSERT_MSG (index < m_numberOfComponentCarriers, "Invalid component carrier index:"<<index<<" provided in order to obtain FfrRrcSapUser.");
1843  return m_ffrRrcSapUser.at (index);
1844 }
1845 
1846 void
1848 {
1849  NS_LOG_FUNCTION (this << s);
1850  m_rrcSapUser = s;
1851 }
1852 
1855 {
1856  NS_LOG_FUNCTION (this);
1857  return m_rrcSapProvider;
1858 }
1859 
1860 void
1862 {
1863  NS_LOG_FUNCTION (this);
1864  m_macSapProvider = s;
1865 }
1866 
1867 void
1869 {
1870  m_s1SapProvider = s;
1871 }
1872 
1873 
1876 {
1877  return m_s1SapUser;
1878 }
1879 
1880 void
1882 {
1883  NS_LOG_FUNCTION (this << s);
1884  m_cphySapProvider.at(0) = s;
1885 }
1886 
1889 {
1890  NS_LOG_FUNCTION (this);
1891  return m_cphySapUser.at(0);
1892 }
1893 
1894 void
1896 {
1897  NS_LOG_FUNCTION (this << s);
1898  m_cphySapProvider.at(pos) = s;
1899 }
1900 
1903 {
1904  NS_LOG_FUNCTION (this);
1905  return m_cphySapUser.at(pos);
1906 }
1907 
1908 bool
1909 LteEnbRrc::HasUeManager (uint16_t rnti) const
1910 {
1911  NS_LOG_FUNCTION (this << (uint32_t) rnti);
1912  std::map<uint16_t, Ptr<UeManager> >::const_iterator it = m_ueMap.find (rnti);
1913  return (it != m_ueMap.end ());
1914 }
1915 
1918 {
1919  NS_LOG_FUNCTION (this << (uint32_t) rnti);
1920  NS_ASSERT (0 != rnti);
1921  std::map<uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti);
1922  NS_ASSERT_MSG (it != m_ueMap.end (), "UE manager for RNTI " << rnti << " not found");
1923  return it->second;
1924 }
1925 
1926 uint8_t
1928 {
1929  NS_LOG_FUNCTION (this);
1930 
1931  // SANITY CHECK
1932 
1934  "Measurement identities and reporting configuration should not have different quantity");
1935 
1936  if (Simulator::Now () != Seconds (0))
1937  {
1938  NS_FATAL_ERROR ("AddUeMeasReportConfig may not be called after the simulation has run");
1939  }
1940 
1941  // INPUT VALIDATION
1942 
1943  switch (config.triggerQuantity)
1944  {
1948  {
1949  NS_FATAL_ERROR ("The given triggerQuantity (RSRP) does not match with the given threshold2.choice");
1950  }
1951 
1957  {
1958  NS_FATAL_ERROR ("The given triggerQuantity (RSRP) does not match with the given threshold1.choice");
1959  }
1960  break;
1961 
1965  {
1966  NS_FATAL_ERROR ("The given triggerQuantity (RSRQ) does not match with the given threshold2.choice");
1967  }
1968 
1974  {
1975  NS_FATAL_ERROR ("The given triggerQuantity (RSRQ) does not match with the given threshold1.choice");
1976  }
1977  break;
1978 
1979  default:
1980  NS_FATAL_ERROR ("unsupported triggerQuantity");
1981  break;
1982  }
1983 
1985  {
1986  NS_FATAL_ERROR ("Only REPORT_STRONGEST_CELLS purpose is supported");
1987  }
1988 
1990  {
1991  NS_LOG_WARN ("reportQuantity = BOTH will be used instead of the given reportQuantity");
1992  }
1993 
1994  uint8_t nextId = m_ueMeasConfig.reportConfigToAddModList.size () + 1;
1995 
1996  // create the reporting configuration
1997  LteRrcSap::ReportConfigToAddMod reportConfig;
1998  reportConfig.reportConfigId = nextId;
1999  reportConfig.reportConfigEutra = config;
2000 
2001  // create the measurement identity
2003  measId.measId = nextId;
2004  measId.measObjectId = 1;
2005  measId.reportConfigId = nextId;
2006 
2007  // add both to the list of UE measurement configuration
2008  m_ueMeasConfig.reportConfigToAddModList.push_back (reportConfig);
2009  m_ueMeasConfig.measIdToAddModList.push_back (measId);
2010 
2011  return nextId;
2012 }
2013 
2014 void
2016 {
2017  auto it = ccPhyConf.begin ();
2018  NS_ASSERT (it != ccPhyConf.end ());
2019  uint8_t ulBandwidth = it->second->GetUlBandwidth ();
2020  uint8_t dlBandwidth = it->second->GetDlBandwidth ();
2021  uint32_t ulEarfcn = it->second->GetUlEarfcn ();
2022  uint32_t dlEarfcn = it->second->GetDlEarfcn ();
2023  NS_LOG_FUNCTION (this << (uint16_t) ulBandwidth << (uint16_t) dlBandwidth
2024  << ulEarfcn << dlEarfcn);
2026 
2027  for (const auto &it: ccPhyConf)
2028  {
2029  m_cphySapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2030  m_cphySapProvider.at (it.first)->SetEarfcn (it.second->GetUlEarfcn (), it.second->GetDlEarfcn ());
2031  m_cphySapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
2032  m_cmacSapProvider.at (it.first)->ConfigureMac (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2033  m_ffrRrcSapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
2034  m_ffrRrcSapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
2035  }
2036 
2037  m_dlEarfcn = dlEarfcn;
2038  m_ulEarfcn = ulEarfcn;
2039  m_dlBandwidth = dlBandwidth;
2040  m_ulBandwidth = ulBandwidth;
2041 
2042  /*
2043  * Initializing the list of UE measurement configuration (m_ueMeasConfig).
2044  * Only intra-frequency measurements are supported, so only one measurement
2045  * object is created.
2046  */
2047 
2048  LteRrcSap::MeasObjectToAddMod measObject;
2049  measObject.measObjectId = 1;
2050  measObject.measObjectEutra.carrierFreq = m_dlEarfcn;
2052  measObject.measObjectEutra.presenceAntennaPort1 = false;
2053  measObject.measObjectEutra.neighCellConfig = 0;
2054  measObject.measObjectEutra.offsetFreq = 0;
2055  measObject.measObjectEutra.haveCellForWhichToReportCGI = false;
2056 
2057  m_ueMeasConfig.measObjectToAddModList.push_back (measObject);
2062  m_ueMeasConfig.haveSmeasure = false;
2064 
2065  m_sib1.clear ();
2066  m_sib1.reserve (ccPhyConf.size ());
2067  for (const auto &it: ccPhyConf)
2068  {
2069  // Enabling MIB transmission
2071  mib.dlBandwidth = it.second->GetDlBandwidth ();
2072  mib.systemFrameNumber = 0;
2073  m_cphySapProvider.at (it.first)->SetMasterInformationBlock (mib);
2074 
2075  // Enabling SIB1 transmission with default values
2077  sib1.cellAccessRelatedInfo.cellIdentity = it.second->GetCellId ();
2078  sib1.cellAccessRelatedInfo.csgIndication = false;
2081  sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value
2082  sib1.cellSelectionInfo.qRxLevMin = m_qRxLevMin; // set as minimum value
2083  m_sib1.push_back (sib1);
2084  m_cphySapProvider.at (it.first)->SetSystemInformationBlockType1 (sib1);
2085  }
2086  /*
2087  * Enabling transmission of other SIB. The first time System Information is
2088  * transmitted is arbitrarily assumed to be at +0.016s, and then it will be
2089  * regularly transmitted every 80 ms by default (set the
2090  * SystemInformationPeriodicity attribute to configure this).
2091  */
2093 
2094  m_configured = true;
2095 
2096 }
2097 
2098 
2099 void
2100 LteEnbRrc::SetCellId (uint16_t cellId)
2101 {
2102  // update SIB1
2103  m_sib1.at (0).cellAccessRelatedInfo.cellIdentity = cellId;
2104  m_cphySapProvider.at (0)->SetSystemInformationBlockType1 (m_sib1.at (0));
2105 }
2106 
2107 void
2108 LteEnbRrc::SetCellId (uint16_t cellId, uint8_t ccIndex)
2109 {
2110  // update SIB1
2111  m_sib1.at (ccIndex).cellAccessRelatedInfo.cellIdentity = cellId;
2112  m_cphySapProvider.at (ccIndex)->SetSystemInformationBlockType1 (m_sib1.at (ccIndex));
2113 }
2114 
2115 uint8_t
2117 {
2118  NS_LOG_FUNCTION (this << cellId);
2119  for (auto &it: m_componentCarrierPhyConf)
2120  {
2121  if (it.second->GetCellId () == cellId)
2122  {
2123  return it.first;
2124  }
2125  }
2126  NS_FATAL_ERROR ("Cell " << cellId << " not found in CC map");
2127 }
2128 
2129 uint16_t
2130 LteEnbRrc::ComponentCarrierToCellId (uint8_t componentCarrierId)
2131 {
2132  NS_LOG_FUNCTION (this << +componentCarrierId);
2133  return m_componentCarrierPhyConf.at (componentCarrierId)->GetCellId ();
2134 }
2135 
2136 bool
2138 {
2139  NS_LOG_FUNCTION (this << packet);
2140 
2141  EpsBearerTag tag;
2142  bool found = packet->RemovePacketTag (tag);
2143  NS_ASSERT_MSG (found, "no EpsBearerTag found in packet to be sent");
2144  Ptr<UeManager> ueManager = GetUeManager (tag.GetRnti ());
2145  ueManager->SendData (tag.GetBid (), packet);
2146 
2147  return true;
2148 }
2149 
2150 void
2152 {
2153  m_forwardUpCallback = cb;
2154 }
2155 
2156 void
2158 {
2159  NS_LOG_FUNCTION (this << rnti);
2161  "ConnectionRequestTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2162  RemoveUe (rnti);
2163 }
2164 
2165 void
2167 {
2168  NS_LOG_FUNCTION (this << rnti);
2169  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::CONNECTION_SETUP,
2170  "ConnectionSetupTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2171  RemoveUe (rnti);
2172 }
2173 
2174 void
2176 {
2177  NS_LOG_FUNCTION (this << rnti);
2179  "ConnectionRejectedTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2180  RemoveUe (rnti);
2181 }
2182 
2183 void
2185 {
2186  NS_LOG_FUNCTION (this << rnti);
2187  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_JOINING,
2188  "HandoverJoiningTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2189  RemoveUe (rnti);
2190 }
2191 
2192 void
2194 {
2195  NS_LOG_FUNCTION (this << rnti);
2196  NS_ASSERT_MSG (GetUeManager (rnti)->GetState () == UeManager::HANDOVER_LEAVING,
2197  "HandoverLeavingTimeout in unexpected state " << ToString (GetUeManager (rnti)->GetState ()));
2198  RemoveUe (rnti);
2199 }
2200 
2201 void
2202 LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId)
2203 {
2204  NS_LOG_FUNCTION (this << rnti << cellId);
2205  NS_LOG_LOGIC ("Request to send HANDOVER REQUEST");
2207 
2208  Ptr<UeManager> ueManager = GetUeManager (rnti);
2209  ueManager->PrepareHandover (cellId);
2210 
2211 }
2212 
2213 void
2215 {
2216  NS_LOG_FUNCTION (this << rnti);
2217  GetUeManager (rnti)->CompleteSetupUe (params);
2218 }
2219 
2220 void
2222 {
2223  NS_LOG_FUNCTION (this << rnti);
2224  GetUeManager (rnti)->RecvRrcConnectionRequest (msg);
2225 }
2226 
2227 void
2229 {
2230  NS_LOG_FUNCTION (this << rnti);
2231  GetUeManager (rnti)->RecvRrcConnectionSetupCompleted (msg);
2232 }
2233 
2234 void
2236 {
2237  NS_LOG_FUNCTION (this << rnti);
2238  GetUeManager (rnti)->RecvRrcConnectionReconfigurationCompleted (msg);
2239 }
2240 
2241 void
2243 {
2244  NS_LOG_FUNCTION (this << rnti);
2245  GetUeManager (rnti)->RecvRrcConnectionReestablishmentRequest (msg);
2246 }
2247 
2248 void
2250 {
2251  NS_LOG_FUNCTION (this << rnti);
2252  GetUeManager (rnti)->RecvRrcConnectionReestablishmentComplete (msg);
2253 }
2254 
2255 void
2257 {
2258  NS_LOG_FUNCTION (this << rnti);
2259  GetUeManager (rnti)->RecvMeasurementReport (msg);
2260 }
2261 
2262 void
2264 {
2265  Ptr<UeManager> ueManager = GetUeManager (request.rnti);
2266  ueManager->SetupDataRadioBearer (request.bearer, request.bearerId, request.gtpTeid, request.transportLayerAddress);
2267 }
2268 
2269 void
2271 {
2272  Ptr<UeManager> ueManager = GetUeManager (params.rnti);
2273  ueManager->SendUeContextRelease ();
2274 }
2275 
2276 void
2278 {
2279  NS_LOG_FUNCTION (this);
2280 
2281  NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST");
2282 
2283  NS_LOG_LOGIC ("oldEnbUeX2apId = " << req.oldEnbUeX2apId);
2284  NS_LOG_LOGIC ("sourceCellId = " << req.sourceCellId);
2285  NS_LOG_LOGIC ("targetCellId = " << req.targetCellId);
2286  NS_LOG_LOGIC ("mmeUeS1apId = " << req.mmeUeS1apId);
2287 
2288  if (m_admitHandoverRequest == false)
2289  {
2290  NS_LOG_INFO ("rejecting handover request from cellId " << req.sourceCellId);
2292  res.oldEnbUeX2apId = req.oldEnbUeX2apId;
2293  res.sourceCellId = req.sourceCellId;
2294  res.targetCellId = req.targetCellId;
2295  res.cause = 0;
2296  res.criticalityDiagnostics = 0;
2298  return;
2299  }
2300 
2302  LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue anrcrv = m_cmacSapProvider.at (0)->AllocateNcRaPreamble (rnti);
2303  if (anrcrv.valid == false)
2304  {
2305  NS_LOG_INFO (this << " failed to allocate a preamble for non-contention based RA => cannot accept HO");
2306  RemoveUe (rnti);
2307  NS_FATAL_ERROR ("should trigger HO Preparation Failure, but it is not implemented");
2308  return;
2309  }
2310 
2311  Ptr<UeManager> ueManager = GetUeManager (rnti);
2312  ueManager->SetSource (req.sourceCellId, req.oldEnbUeX2apId);
2313  ueManager->SetImsi (req.mmeUeS1apId);
2314 
2316  ackParams.oldEnbUeX2apId = req.oldEnbUeX2apId;
2317  ackParams.newEnbUeX2apId = rnti;
2318  ackParams.sourceCellId = req.sourceCellId;
2319  ackParams.targetCellId = req.targetCellId;
2320 
2321  for (std::vector <EpcX2Sap::ErabToBeSetupItem>::iterator it = req.bearers.begin ();
2322  it != req.bearers.end ();
2323  ++it)
2324  {
2325  ueManager->SetupDataRadioBearer (it->erabLevelQosParameters, it->erabId, it->gtpTeid, it->transportLayerAddress);
2327  i.erabId = it->erabId;
2328  ackParams.admittedBearers.push_back (i);
2329  }
2330 
2331  LteRrcSap::RrcConnectionReconfiguration handoverCommand = ueManager->GetRrcConnectionReconfigurationForHandover ();
2332  handoverCommand.haveMobilityControlInfo = true;
2333  handoverCommand.mobilityControlInfo.targetPhysCellId = req.targetCellId;
2334  handoverCommand.mobilityControlInfo.haveCarrierFreq = true;
2337  handoverCommand.mobilityControlInfo.haveCarrierBandwidth = true;
2340  handoverCommand.mobilityControlInfo.newUeIdentity = rnti;
2341  handoverCommand.mobilityControlInfo.haveRachConfigDedicated = true;
2344 
2345  LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (0)->GetRachConfig ();
2349  handoverCommand.haveNonCriticalExtension = false;
2350 
2351  Ptr<Packet> encodedHandoverCommand = m_rrcSapUser->EncodeHandoverCommand (handoverCommand);
2352 
2353  ackParams.rrcContext = encodedHandoverCommand;
2354 
2355  NS_LOG_LOGIC ("Send X2 message: HANDOVER REQUEST ACK");
2356 
2357  NS_LOG_LOGIC ("oldEnbUeX2apId = " << ackParams.oldEnbUeX2apId);
2358  NS_LOG_LOGIC ("newEnbUeX2apId = " << ackParams.newEnbUeX2apId);
2359  NS_LOG_LOGIC ("sourceCellId = " << ackParams.sourceCellId);
2360  NS_LOG_LOGIC ("targetCellId = " << ackParams.targetCellId);
2361 
2363 }
2364 
2365 void
2367 {
2368  NS_LOG_FUNCTION (this);
2369 
2370  NS_LOG_LOGIC ("Recv X2 message: HANDOVER REQUEST ACK");
2371 
2372  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2373  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2374  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2375  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2376 
2377  uint16_t rnti = params.oldEnbUeX2apId;
2378  Ptr<UeManager> ueManager = GetUeManager (rnti);
2379  ueManager->RecvHandoverRequestAck (params);
2380 }
2381 
2382 void
2384 {
2385  NS_LOG_FUNCTION (this);
2386 
2387  NS_LOG_LOGIC ("Recv X2 message: HANDOVER PREPARATION FAILURE");
2388 
2389  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2390  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2391  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2392  NS_LOG_LOGIC ("cause = " << params.cause);
2393  NS_LOG_LOGIC ("criticalityDiagnostics = " << params.criticalityDiagnostics);
2394 
2395  uint16_t rnti = params.oldEnbUeX2apId;
2396  Ptr<UeManager> ueManager = GetUeManager (rnti);
2397  ueManager->RecvHandoverPreparationFailure (params.targetCellId);
2398 }
2399 
2400 void
2402 {
2403  NS_LOG_FUNCTION (this);
2404 
2405  NS_LOG_LOGIC ("Recv X2 message: SN STATUS TRANSFER");
2406 
2407  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2408  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2409  NS_LOG_LOGIC ("erabsSubjectToStatusTransferList size = " << params.erabsSubjectToStatusTransferList.size ());
2410 
2411  uint16_t rnti = params.newEnbUeX2apId;
2412  Ptr<UeManager> ueManager = GetUeManager (rnti);
2413  ueManager->RecvSnStatusTransfer (params);
2414 }
2415 
2416 void
2418 {
2419  NS_LOG_FUNCTION (this);
2420 
2421  NS_LOG_LOGIC ("Recv X2 message: UE CONTEXT RELEASE");
2422 
2423  NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
2424  NS_LOG_LOGIC ("newEnbUeX2apId = " << params.newEnbUeX2apId);
2425 
2426  uint16_t rnti = params.oldEnbUeX2apId;
2427  GetUeManager (rnti)->RecvUeContextRelease (params);
2428  RemoveUe (rnti);
2429 }
2430 
2431 void
2433 {
2434  NS_LOG_FUNCTION (this);
2435 
2436  NS_LOG_LOGIC ("Recv X2 message: LOAD INFORMATION");
2437 
2438  NS_LOG_LOGIC ("Number of cellInformationItems = " << params.cellInformationList.size ());
2439 
2440  m_ffrRrcSapProvider.at (0)->RecvLoadInformation (params);
2441 }
2442 
2443 void
2445 {
2446  NS_LOG_FUNCTION (this);
2447 
2448  NS_LOG_LOGIC ("Recv X2 message: RESOURCE STATUS UPDATE");
2449 
2450  NS_LOG_LOGIC ("Number of cellMeasurementResultItems = " << params.cellMeasurementResultList.size ());
2451 
2452  NS_ASSERT ("Processing of RESOURCE STATUS UPDATE X2 message IS NOT IMPLEMENTED");
2453 }
2454 
2455 void
2457 {
2458  NS_LOG_FUNCTION (this);
2459 
2460  NS_LOG_LOGIC ("Recv UE DATA FORWARDING through X2 interface");
2461  NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
2462  NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
2463  NS_LOG_LOGIC ("gtpTeid = " << params.gtpTeid);
2464  NS_LOG_LOGIC ("ueData = " << params.ueData);
2465  NS_LOG_LOGIC ("ueData size = " << params.ueData->GetSize ());
2466 
2467  std::map<uint32_t, X2uTeidInfo>::iterator
2468  teidInfoIt = m_x2uTeidInfoMap.find (params.gtpTeid);
2469  if (teidInfoIt != m_x2uTeidInfoMap.end ())
2470  {
2471  GetUeManager (teidInfoIt->second.rnti)->SendData (teidInfoIt->second.drbid, params.ueData);
2472  }
2473  else
2474  {
2475  NS_FATAL_ERROR ("X2-U data received but no X2uTeidInfo found");
2476  }
2477 }
2478 
2479 
2480 uint16_t
2481 LteEnbRrc::DoAllocateTemporaryCellRnti (uint8_t componentCarrierId)
2482 {
2483  NS_LOG_FUNCTION (this << +componentCarrierId);
2484  return AddUe (UeManager::INITIAL_RANDOM_ACCESS, componentCarrierId);
2485 }
2486 
2487 void
2489 {
2490  Ptr<UeManager> ueManager = GetUeManager (cmacParams.m_rnti);
2491  ueManager->CmacUeConfigUpdateInd (cmacParams);
2492 }
2493 
2494 void
2495 LteEnbRrc::DoNotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success)
2496 {
2497  NS_LOG_FUNCTION (this << (uint32_t) rnti);
2498  NS_FATAL_ERROR ("not implemented");
2499 }
2500 
2501 
2502 uint8_t
2504 {
2505  NS_LOG_FUNCTION (this);
2506  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2507  m_handoverMeasIds.insert (measId);
2508  return measId;
2509 }
2510 
2511 uint8_t
2513 {
2514  NS_LOG_FUNCTION (this);
2515  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2516  m_componentCarrierMeasIds.insert (measId);
2517  return measId;
2518 }
2519 
2520 void
2521 LteEnbRrc::DoTriggerHandover (uint16_t rnti, uint16_t targetCellId)
2522 {
2523  NS_LOG_FUNCTION (this << rnti << targetCellId);
2524 
2525  bool isHandoverAllowed = true;
2526 
2527  Ptr<UeManager> ueManager = GetUeManager (rnti);
2528  NS_ASSERT_MSG (ueManager != 0, "Cannot find UE context with RNTI " << rnti);
2529 
2530  if (m_anrSapProvider != 0)
2531  {
2532  // ensure that proper neighbour relationship exists between source and target cells
2533  bool noHo = m_anrSapProvider->GetNoHo (targetCellId);
2534  bool noX2 = m_anrSapProvider->GetNoX2 (targetCellId);
2535  NS_LOG_DEBUG (this << " cellId=" << ComponentCarrierToCellId (ueManager->GetComponentCarrierId ())
2536  << " targetCellId=" << targetCellId
2537  << " NRT.NoHo=" << noHo << " NRT.NoX2=" << noX2);
2538 
2539  if (noHo || noX2)
2540  {
2541  isHandoverAllowed = false;
2542  NS_LOG_LOGIC (this << " handover to cell " << targetCellId
2543  << " is not allowed by ANR");
2544  }
2545  }
2546 
2547  if (ueManager->GetState () != UeManager::CONNECTED_NORMALLY)
2548  {
2549  isHandoverAllowed = false;
2550  NS_LOG_LOGIC (this << " handover is not allowed because the UE"
2551  << " rnti=" << rnti << " is in "
2552  << ToString (ueManager->GetState ()) << " state");
2553  }
2554 
2555  if (isHandoverAllowed)
2556  {
2557  // initiate handover execution
2558  ueManager->PrepareHandover (targetCellId);
2559  }
2560 }
2561 
2562 uint8_t
2564 {
2565  NS_LOG_FUNCTION (this);
2566  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2567  m_anrMeasIds.insert (measId);
2568  return measId;
2569 }
2570 
2571 uint8_t
2573 {
2574  NS_LOG_FUNCTION (this);
2575  uint8_t measId = AddUeMeasReportConfig (reportConfig);
2576  m_ffrMeasIds.insert (measId);
2577  return measId;
2578 }
2579 
2580 void
2582 {
2583  NS_LOG_FUNCTION (this);
2584  Ptr<UeManager> ueManager = GetUeManager (rnti);
2585  ueManager->SetPdschConfigDedicated (pdschConfigDedicated);
2586 }
2587 
2588 void
2590 {
2591  NS_LOG_FUNCTION (this);
2592 
2594 }
2595 
2596 uint16_t
2597 LteEnbRrc::AddUe (UeManager::State state, uint8_t componentCarrierId)
2598 {
2599  NS_LOG_FUNCTION (this);
2600  bool found = false;
2601  uint16_t rnti;
2602  for (rnti = m_lastAllocatedRnti + 1;
2603  (rnti != m_lastAllocatedRnti - 1) && (!found);
2604  ++rnti)
2605  {
2606  if ((rnti != 0) && (m_ueMap.find (rnti) == m_ueMap.end ()))
2607  {
2608  found = true;
2609  break;
2610  }
2611  }
2612 
2613  NS_ASSERT_MSG (found, "no more RNTIs available (do you have more than 65535 UEs in a cell?)");
2614  m_lastAllocatedRnti = rnti;
2615  Ptr<UeManager> ueManager = CreateObject<UeManager> (this, rnti, state, componentCarrierId);
2616  m_ccmRrcSapProvider-> AddUe (rnti, (uint8_t)state);
2617  m_ueMap.insert (std::pair<uint16_t, Ptr<UeManager> > (rnti, ueManager));
2618  ueManager->Initialize ();
2619  const uint16_t cellId = ComponentCarrierToCellId (componentCarrierId);
2620  NS_LOG_DEBUG (this << " New UE RNTI " << rnti << " cellId " << cellId << " srs CI " << ueManager->GetSrsConfigurationIndex ());
2621  m_newUeContextTrace (cellId, rnti);
2622  return rnti;
2623 }
2624 
2625 void
2626 LteEnbRrc::RemoveUe (uint16_t rnti)
2627 {
2628  NS_LOG_FUNCTION (this << (uint32_t) rnti);
2629  std::map <uint16_t, Ptr<UeManager> >::iterator it = m_ueMap.find (rnti);
2630  NS_ASSERT_MSG (it != m_ueMap.end (), "request to remove UE info with unknown rnti " << rnti);
2631  uint16_t srsCi = (*it).second->GetSrsConfigurationIndex ();
2632  m_ueMap.erase (it);
2633  for (uint8_t i = 0; i < m_numberOfComponentCarriers; i++)
2634  {
2635  m_cmacSapProvider.at (i)->RemoveUe (rnti);
2636  m_cphySapProvider.at (i)->RemoveUe (rnti);
2637  }
2638  if (m_s1SapProvider != 0)
2639  {
2641  }
2642  m_ccmRrcSapProvider-> RemoveUe (rnti);
2643  // need to do this after UeManager has been deleted
2644  RemoveSrsConfigurationIndex (srsCi);
2645 }
2646 
2647 TypeId
2649 {
2650  switch (m_epsBearerToRlcMapping)
2651  {
2652  case RLC_SM_ALWAYS:
2653  return LteRlcSm::GetTypeId ();
2654  break;
2655 
2656  case RLC_UM_ALWAYS:
2657  return LteRlcUm::GetTypeId ();
2658  break;
2659 
2660  case RLC_AM_ALWAYS:
2661  return LteRlcAm::GetTypeId ();
2662  break;
2663 
2664  case PER_BASED:
2665  if (bearer.GetPacketErrorLossRate () > 1.0e-5)
2666  {
2667  return LteRlcUm::GetTypeId ();
2668  }
2669  else
2670  {
2671  return LteRlcAm::GetTypeId ();
2672  }
2673  break;
2674 
2675  default:
2676  return LteRlcSm::GetTypeId ();
2677  break;
2678  }
2679 }
2680 
2681 
2682 void
2683 LteEnbRrc::AddX2Neighbour (uint16_t cellId)
2684 {
2685  NS_LOG_FUNCTION (this << cellId);
2686 
2687  if (m_anrSapProvider != 0)
2688  {
2690  }
2691 }
2692 
2693 void
2694 LteEnbRrc::SetCsgId (uint32_t csgId, bool csgIndication)
2695 {
2696  NS_LOG_FUNCTION (this << csgId << csgIndication);
2697  for (uint8_t componentCarrierId = 0; componentCarrierId < m_sib1.size (); componentCarrierId++)
2698  {
2699  m_sib1.at (componentCarrierId).cellAccessRelatedInfo.csgIdentity = csgId;
2700  m_sib1.at (componentCarrierId).cellAccessRelatedInfo.csgIndication = csgIndication;
2701  m_cphySapProvider.at (componentCarrierId)->SetSystemInformationBlockType1 (m_sib1.at (componentCarrierId));
2702  }
2703 }
2704 
2705 void
2706 LteEnbRrc::SetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers)
2707 {
2708  m_numberOfComponentCarriers = numberOfComponentCarriers;
2709 }
2710 
2712 static const uint8_t SRS_ENTRIES = 9;
2717 static const uint16_t g_srsPeriodicity[SRS_ENTRIES] = {0, 2, 5, 10, 20, 40, 80, 160, 320};
2723 static const uint16_t g_srsCiLow[SRS_ENTRIES] = {0, 0, 2, 7, 17, 37, 77, 157, 317};
2729 static const uint16_t g_srsCiHigh[SRS_ENTRIES] = {0, 1, 6, 16, 36, 76, 156, 316, 636};
2730 
2731 void
2733 {
2734  NS_LOG_FUNCTION (this << p);
2735  for (uint32_t id = 1; id < SRS_ENTRIES; ++id)
2736  {
2737  if (g_srsPeriodicity[id] == p)
2738  {
2740  return;
2741  }
2742  }
2743  // no match found
2744  std::ostringstream allowedValues;
2745  for (uint32_t id = 1; id < SRS_ENTRIES; ++id)
2746  {
2747  allowedValues << g_srsPeriodicity[id] << " ";
2748  }
2749  NS_FATAL_ERROR ("illecit SRS periodicity value " << p << ". Allowed values: " << allowedValues.str ());
2750 }
2751 
2752 uint32_t
2754 {
2755  NS_LOG_FUNCTION (this);
2757  NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES);
2758  return g_srsPeriodicity[m_srsCurrentPeriodicityId];
2759 }
2760 
2761 
2762 uint16_t
2764 {
2766  // SRS
2768  NS_ASSERT (m_srsCurrentPeriodicityId < SRS_ENTRIES);
2769  NS_LOG_DEBUG (this << " SRS p " << g_srsPeriodicity[m_srsCurrentPeriodicityId] << " set " << m_ueSrsConfigurationIndexSet.size ());
2770  if (m_ueSrsConfigurationIndexSet.size () >= g_srsPeriodicity[m_srsCurrentPeriodicityId])
2771  {
2772  NS_FATAL_ERROR ("too many UEs (" << m_ueSrsConfigurationIndexSet.size () + 1
2773  << ") for current SRS periodicity "
2774  << g_srsPeriodicity[m_srsCurrentPeriodicityId]
2775  << ", consider increasing the value of ns3::LteEnbRrc::SrsPeriodicity");
2776  }
2777 
2778  if (m_ueSrsConfigurationIndexSet.empty ())
2779  {
2780  // first entry
2783  }
2784  else
2785  {
2786  // find a CI from the available ones
2787  std::set<uint16_t>::reverse_iterator rit = m_ueSrsConfigurationIndexSet.rbegin ();
2788  NS_ASSERT (rit != m_ueSrsConfigurationIndexSet.rend ());
2789  NS_LOG_DEBUG (this << " lower bound " << (*rit) << " of " << g_srsCiHigh[m_srsCurrentPeriodicityId]);
2790  if ((*rit) < g_srsCiHigh[m_srsCurrentPeriodicityId])
2791  {
2792  // got it from the upper bound
2793  m_lastAllocatedConfigurationIndex = (*rit) + 1;
2795  }
2796  else
2797  {
2798  // look for released ones
2799  for (uint16_t srcCi = g_srsCiLow[m_srsCurrentPeriodicityId]; srcCi < g_srsCiHigh[m_srsCurrentPeriodicityId]; srcCi++)
2800  {
2801  std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi);
2802  if (it == m_ueSrsConfigurationIndexSet.end ())
2803  {
2805  m_ueSrsConfigurationIndexSet.insert (srcCi);
2806  break;
2807  }
2808  }
2809  }
2810  }
2812 
2813 }
2814 
2815 
2816 void
2818 {
2819  NS_LOG_FUNCTION (this << srcCi);
2820  std::set<uint16_t>::iterator it = m_ueSrsConfigurationIndexSet.find (srcCi);
2821  NS_ASSERT_MSG (it != m_ueSrsConfigurationIndexSet.end (), "request to remove unkwown SRS CI " << srcCi);
2822  m_ueSrsConfigurationIndexSet.erase (it);
2823 }
2824 
2825 uint8_t
2827 {
2828  if (bearer.IsGbr ())
2829  {
2830  return 1;
2831  }
2832  else
2833  {
2834  return 2;
2835  }
2836 }
2837 
2838 uint8_t
2840 {
2841  return bearer.qci;
2842 }
2843 
2844 void
2846 {
2847  // NS_LOG_FUNCTION (this);
2848 
2849  for (auto &it: m_componentCarrierPhyConf)
2850  {
2851  uint8_t ccId = it.first;
2852 
2854  si.haveSib2 = true;
2855  si.sib2.freqInfo.ulCarrierFreq = it.second->GetUlEarfcn ();
2856  si.sib2.freqInfo.ulBandwidth = it.second->GetUlBandwidth ();
2857  si.sib2.radioResourceConfigCommon.pdschConfigCommon.referenceSignalPower = m_cphySapProvider.at (ccId)->GetReferenceSignalPower ();
2859 
2860  LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider.at (ccId)->GetRachConfig ();
2861  LteRrcSap::RachConfigCommon rachConfigCommon;
2863  rachConfigCommon.raSupervisionInfo.preambleTransMax = rc.preambleTransMax;
2865  si.sib2.radioResourceConfigCommon.rachConfigCommon = rachConfigCommon;
2866 
2867  m_rrcSapUser->SendSystemInformation (it.second->GetCellId (), si);
2868  }
2869 
2870  /*
2871  * For simplicity, we use the same periodicity for all SIBs. Note that in real
2872  * systems the periodicy of each SIBs could be different.
2873  */
2875 }
2876 
2877 
2878 } // namespace ns3
2879 
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:1365
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
uint8_t GetComponentCarrierId() const
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source.
Definition: lte-enb-rrc.h:1571
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
bool HasUeManager(uint16_t rnti) const
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:685
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
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:366
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:468
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:306
uint16_t m_dlBandwidth
Downlink transmission bandwidth configuration in number of Resource Blocks.
Definition: lte-enb-rrc.h:1422
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:838
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:352
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:801
#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
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
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
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)
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:1494
std::vector< CellMeasurementResultItem > cellMeasurementResultList
cell measurement result list
Definition: epc-x2-sap.h:319
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
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:814
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.
uint16_t GetSrsConfigurationIndex(void) const
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:1452
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:201
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:1426
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:1001
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
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:796
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:1413
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:1424
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:1479
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:277
#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:86
std::vector< LteEnbCmacSapProvider * > m_cmacSapProvider
Interface to the eNodeB MAC instance.
Definition: lte-enb-rrc.h:1375
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
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
Definition: lte-rrc-sap.h:370
Time m_handoverLeavingTimeoutDuration
The HandoverLeavingTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1545
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
uint8_t GetBid(void) const
Get Bearer Id function.
Time m_connectionRejectedTimeoutDuration
The ConnectionRejectedTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1530
LteMacSapProvider * m_macSapProvider
Interface to the eNodeB MAC instance, to be used by RLC instances.
Definition: lte-enb-rrc.h:1403
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:1400
RachConfigDedicated rachConfigDedicated
RACH config dedicated.
Definition: lte-rrc-sap.h:561
RSRP is used for the threshold.
Definition: lte-rrc-sap.h:347
uint16_t GetRnti(void) const
Get RNTI function.
bool IsGbr() const
Definition: eps-bearer.cc:61
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:1582
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:98
State GetState() const
MemberLteCcmRrcSapUser class.
void SetImsi(uint64_t imsi)
Set the IMSI.
Definition: lte-enb-rrc.cc:359
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.
void SendUeContextRelease()
send the UE CONTEXT RELEASE X2 message to the source eNB, thus successfully terminating an X2 handove...
Definition: lte-enb-rrc.cc:777
LteRrcSap::RrcConnectionReconfiguration GetRrcConnectionReconfigurationForHandover()
Definition: lte-enb-rrc.cc:692
The attribute can be written at construction-time.
Definition: type-id.h:65
void SwitchToState(State s)
Switch the UeManager to the given state.
EnbRrcMemberLteEnbCmacSapUser(LteEnbRrc *rrc, uint8_t componentCarrierId)
Constructor.
Definition: lte-enb-rrc.cc:79
Time m_connectionSetupTimeoutDuration
The ConnectionSetupTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1525
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:111
void RecvRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted interface.
Definition: lte-enb-rrc.cc:938
void ReleaseDataRadioBearer(uint8_t drbid)
Release a given radio bearer.
Definition: lte-enb-rrc.cc:500
void SetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers)
Set number of component carriers.
uint16_t ComponentCarrierToCellId(uint8_t componentCarrierId)
convert the component carrier id to cell id
double GetPacketErrorLossRate() const
Definition: eps-bearer.cc:144
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:1368
uint8_t m_rsrqFilterCoefficient
The RsrqFilterCoefficient attribute.
Definition: lte-enb-rrc.h:1511
LteEnbRrcSapUser * m_rrcSapUser
Interface to send messages to UE over the RRC protocol.
Definition: lte-enb-rrc.h:1398
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:1406
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:1518
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
LteHandoverManagementSapUser * m_handoverManagementSapUser
Receive API calls from the handover algorithm instance.
Definition: lte-enb-rrc.h:1378
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:1551
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:1499
int8_t m_qRxLevMin
The QRxLevMin attribute.
Definition: lte-enb-rrc.h:1489
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:1578
std::vector< LteFfrRrcSapProvider * > m_ffrRrcSapProvider
Interface to the FFR algorithm instance.
Definition: lte-enb-rrc.h:1395
LteRrcSap::NonCriticalExtensionConfiguration BuildNonCriticalExtentionConfigurationCa()
bool m_carriersConfigured
are carriers configured
Definition: lte-enb-rrc.h:1580
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:1375
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:1055
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
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
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:1556
std::set< uint8_t > m_componentCarrierMeasIds
List of measurement identities which are intended for component carrier management purposes...
Definition: lte-enb-rrc.h:1449
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:1420
uint8_t CellToComponentCarrierId(uint16_t cellId)
convert the cell id to component carrier id
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
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:92
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:1447
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
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:348
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:699
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:1443
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:1459
TracedCallback< uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport > m_recvMeasurementReportTrace
The RecvMeasurementReport trace source.
Definition: lte-enb-rrc.h:1576
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:301
uint8_t m_rsrpFilterCoefficient
The RsrpFilterCoefficient attribute.
Definition: lte-enb-rrc.h:1505
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:1383
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:365
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:319
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:819
EpcX2SapProvider * m_x2SapProvider
Interface to send messages to neighbour eNodeB over the X2 interface.
Definition: lte-enb-rrc.h:1370
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.
Definition: pointer.h:36
Event A2: Serving becomes worse than absolute threshold.
Definition: lte-rrc-sap.h:367
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
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:84
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
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:910
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:1566
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:757
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:549
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:1056
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:1475
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:1465
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
uint64_t GetImsi(void) const
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:582
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:539
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:76
Event A4: Neighbour becomes better than absolute threshold.
Definition: lte-rrc-sap.h:369
uint16_t GetRnti(void) const
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.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:90
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:400
EpcEnbS1SapUser * m_s1SapUser
Interface to receive messages from core network over the S1 protocol.
Definition: lte-enb-rrc.h:1408
std::set< uint16_t > m_ueSrsConfigurationIndexSet
UE SRS configuration index set.
Definition: lte-enb-rrc.h:1480
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:1416
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
The attribute can be read.
Definition: type-id.h:63
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:1373
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:1388
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:1429
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 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:261
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance...
void StartDataRadioBearers()
Start the data radio bearers that have been previously recorded to be started using RecordDataRadioBe...
Definition: lte-enb-rrc.cc:480
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:821
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:1434
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:269
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:993
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
Reference Signal Received Power.
Definition: lte-rrc-sap.h:399
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:1411
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:857
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:1385
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
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
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
The ConnectionReconfiguration trace source.
Definition: lte-enb-rrc.h:1561
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
uint8_t GetNewRrcTransactionIdentifier()
MobilityControlInfo mobilityControlInfo
mobility control info
Definition: lte-rrc-sap.h:835
void DoRecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Receive SN status transfer function.
LteEnbCphySapUser * GetLteEnbCphySapUser()
void ConnectionRejectedTimeout(uint16_t rnti)
Method triggered a while after sending RRC Connection Rejected.
Both the RSRP and RSRQ quantities are to be included in the measurement report.
Definition: lte-rrc-sap.h:407
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
uint32_t GetSrsPeriodicity() const
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
AntennaInfoDedicated antennaInfo
antenna info
Definition: lte-rrc-sap.h:221
Time m_handoverJoiningTimeoutDuration
The HandoverJoiningTimeoutDuration attribute.
Definition: lte-enb-rrc.h:1539
LteRlcSapProvider * GetLteRlcSapProvider()
Definition: lte-rlc.cc:152
uint16_t m_lastAllocatedConfigurationIndex
last allocated configuration index
Definition: lte-enb-rrc.h:1481
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:1380
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:1445
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
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:1470
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:1418
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:914
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
LteAnrSapProvider * m_anrSapProvider
Interface to the ANR instance.
Definition: lte-enb-rrc.h:1390
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:1393
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:638
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:849
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:163
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:1440
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.