From 3486c7862db4f2fb9fa338902f06612189eacf10 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 11 Apr 2021 16:20:39 +0300 Subject: [PATCH] Partially revert "lte: (fixes: #2840) Wrong configuration of eNBs and UEs" This reverts commit 3ee00b0a176ae73cedea53dd6cad2ab0c359ad53. --- src/lte/helper/lte-helper.cc | 31 +++++++------------------------ src/lte/model/lte-ue-rrc.cc | 4 ---- src/lte/model/lte-ue-rrc.h | 1 - 3 files changed, 7 insertions(+), 29 deletions(-) diff --git a/src/lte/helper/lte-helper.cc b/src/lte/helper/lte-helper.cc index 0dc761e58..b64a8c804 100644 --- a/src/lte/helper/lte-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -509,14 +509,12 @@ LteHelper::InstallSingleEnbDevice (Ptr n) Ptr dev = m_enbNetDeviceFactory.Create (); Ptr handoverAlgorithm = m_handoverAlgorithmFactory.Create (); - NS_ABORT_MSG_IF (m_componentCarrierPhyParams.size() != 0, "CC map is not clean"); - DoComponentCarrierConfigure (dev->GetUlEarfcn (), dev->GetDlEarfcn (), - dev->GetUlBandwidth (), dev->GetDlBandwidth ()); - NS_ABORT_MSG_IF (m_componentCarrierPhyParams.size() != m_noOfCcs, - "CC map size (" << m_componentCarrierPhyParams.size () << - ") must be equal to number of carriers (" << - m_noOfCcs << ")"); + if (m_componentCarrierPhyParams.size() == 0) + { + DoComponentCarrierConfigure (dev->GetUlEarfcn (), dev->GetDlEarfcn (), dev->GetUlBandwidth (), dev->GetDlBandwidth ()); + } + NS_ASSERT_MSG(m_componentCarrierPhyParams.size()!=0, "Cannot create enb ccm map."); // create component carrier map for this eNb device std::map > ccMap; for (std::map::iterator it = m_componentCarrierPhyParams.begin (); @@ -533,9 +531,6 @@ LteHelper::InstallSingleEnbDevice (Ptr n) cc->SetCellId (m_cellIdCounter++); ccMap [it->first] = cc; } - // CC map is not needed anymore - m_componentCarrierPhyParams.clear (); - NS_ABORT_MSG_IF (m_useCa && ccMap.size()<2, "You have to either specify carriers or disable carrier aggregation"); NS_ASSERT (ccMap.size () == m_noOfCcs); @@ -762,19 +757,9 @@ LteHelper::InstallSingleUeDevice (Ptr n) { NS_LOG_FUNCTION (this); + NS_ABORT_MSG_IF (m_componentCarrierPhyParams.size() == 0 && m_useCa, "If CA is enabled, before call this method you need to install Enbs --> InstallEnbDevice()"); + Ptr dev = m_ueNetDeviceFactory.Create (); - - // Initialize the component carriers with default values in order to initialize MACs and PHYs - // of each component carrier. These values must be updated once the UE is attached to the - // eNB and receives RRC Connection Reconfiguration message. In case of primary carrier or - // a single carrier, these values will be updated once the UE will receive SIB2 and MIB. - NS_ABORT_MSG_IF (m_componentCarrierPhyParams.size() != 0, "CC map is not clean"); - DoComponentCarrierConfigure (dev->GetDlEarfcn () + 18000, dev->GetDlEarfcn (), 25, 25); - NS_ABORT_MSG_IF (m_componentCarrierPhyParams.size() != m_noOfCcs, - "CC map size (" << m_componentCarrierPhyParams.size () << - ") must be equal to number of carriers (" << - m_noOfCcs << ")"); - std::map > ueCcMap; for (std::map< uint8_t, ComponentCarrier >::iterator it = m_componentCarrierPhyParams.begin(); @@ -792,8 +777,6 @@ LteHelper::InstallSingleUeDevice (Ptr n) // cc->GetPhy ()->Initialize (); // it is initialized within the LteUeNetDevice::DoInitialize () ueCcMap.insert (std::pair > (it->first, cc)); } - // CC map is not needed anymore - m_componentCarrierPhyParams.clear (); for (std::map >::iterator it = ueCcMap.begin (); it != ueCcMap.end (); ++it) { diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index 266bb7555..6b0b6a5e8 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -1345,8 +1345,6 @@ LteUeRrc::ApplyRadioResourceConfigDedicatedSecondaryCarrier (LteRrcSap::NonCriti { NS_LOG_FUNCTION (this); - m_sCellToAddModList = nonCec.sCellsToAddModList; - for (std::list::iterator it = nonCec.sCellsToAddModList.begin (); it != nonCec.sCellsToAddModList.end (); it++) { LteRrcSap::SCellToAddMod scell = *it; @@ -1374,8 +1372,6 @@ LteUeRrc::ApplyRadioResourceConfigDedicatedSecondaryCarrier (LteRrcSap::NonCriti m_cphySapProvider.at (ccId)->SetPa (paDouble); m_cphySapProvider.at (ccId)->SetSrsConfigurationIndex (srsIndex); } - - m_sCarrierConfiguredTrace (this, m_sCellToAddModList); } void diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index 3ec837dac..4882a06de 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -827,7 +827,6 @@ private: uint32_t m_dlEarfcn; /**< Downlink carrier frequency. */ uint32_t m_ulEarfcn; /**< Uplink carrier frequency. */ - std::list m_sCellToAddModList; /**< Secondary carriers. */ /** * The `MibReceived` trace source. Fired upon reception of Master Information