From c8a007b5eab55d7117cd88469f4dae0ac24acc9c Mon Sep 17 00:00:00 2001 From: Zoraze Ali Date: Wed, 5 Sep 2018 15:54:52 +0200 Subject: [PATCH] lte: (fixes #2979) remove unused variables and functions from UE RRC and UE CCM --- src/lte/model/lte-ue-ccm-rrc-sap.h | 6 ++++-- .../model/lte-ue-component-carrier-manager.cc | 2 ++ .../model/lte-ue-component-carrier-manager.h | 6 ++++-- src/lte/model/lte-ue-rrc.cc | 5 ----- src/lte/model/lte-ue-rrc.h | 6 ------ .../simple-ue-component-carrier-manager.cc | 20 +------------------ .../simple-ue-component-carrier-manager.h | 2 -- 7 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/lte/model/lte-ue-ccm-rrc-sap.h b/src/lte/model/lte-ue-ccm-rrc-sap.h index d956100ce..2a9aa4fb4 100644 --- a/src/lte/model/lte-ue-ccm-rrc-sap.h +++ b/src/lte/model/lte-ue-ccm-rrc-sap.h @@ -139,7 +139,8 @@ std::vector MemberLteUeCcmRrcSapProvider:: template void MemberLteUeCcmRrcSapProvider::NotifyConnectionReconfigurationMsg () { - m_owner->DoNotifyConnectionReconfigurationMsg (); + NS_FATAL_ERROR ("Function should not be called because it is not implemented."); + //m_owner->DoNotifyConnectionReconfigurationMsg (); } @@ -199,7 +200,8 @@ MemberLteUeCcmRrcSapUser::MemberLteUeCcmRrcSapUser (C* owner) template void MemberLteUeCcmRrcSapUser::ComponentCarrierEnabling (std::vector componentCarrierList) { - m_owner->DoComponentCarrierEnabling (componentCarrierList); + NS_FATAL_ERROR ("Function should not be called because it is not implemented."); + //m_owner->DoComponentCarrierEnabling (componentCarrierList); } } // end of namespace ns3 diff --git a/src/lte/model/lte-ue-component-carrier-manager.cc b/src/lte/model/lte-ue-component-carrier-manager.cc index 82c842ea1..27fdcd588 100644 --- a/src/lte/model/lte-ue-component-carrier-manager.cc +++ b/src/lte/model/lte-ue-component-carrier-manager.cc @@ -28,6 +28,7 @@ NS_LOG_COMPONENT_DEFINE ("LteUeComponentCarrierManager"); NS_OBJECT_ENSURE_REGISTERED (LteUeComponentCarrierManager); LteUeComponentCarrierManager::LteUeComponentCarrierManager () +:m_noOfComponentCarriers(0) { } @@ -77,6 +78,7 @@ void LteUeComponentCarrierManager::SetNumberOfComponentCarriers (uint8_t noOfComponentCarriers) { NS_LOG_FUNCTION (this); + NS_ABORT_MSG_IF (noOfComponentCarriers < MIN_NO_CC || noOfComponentCarriers > MAX_NO_CC, "Number of component carriers should be greater than 0 and less than 6"); m_noOfComponentCarriers = noOfComponentCarriers; } diff --git a/src/lte/model/lte-ue-component-carrier-manager.h b/src/lte/model/lte-ue-component-carrier-manager.h index 71a195b52..06354662c 100644 --- a/src/lte/model/lte-ue-component-carrier-manager.h +++ b/src/lte/model/lte-ue-component-carrier-manager.h @@ -29,6 +29,9 @@ #include #include +#define MIN_NO_CC 1 +#define MAX_NO_CC 5 // this is the maximum number of carrier components allowed by 3GPP up to R13 + namespace ns3 { @@ -89,7 +92,7 @@ public: /** * \brief Sets number of component carriers that are supported by this UE. - * \param noOfComponentCarriers numbr of component carriers + * \param noOfComponentCarriers number of component carriers */ void SetNumberOfComponentCarriers (uint8_t noOfComponentCarriers); @@ -101,7 +104,6 @@ protected: std::map m_lcAttached; //!< Map of pointers to SAP interfaces of the RLC instance of the flows of this UE. std::map > m_componentCarrierLcMap; //!< Flow configuration per flow Id of this UE. uint16_t m_noOfComponentCarriers; //! m_macSapProvidersMap; //!< Map of pointers to SAP to interfaces of the MAC instance if the flows of this UE. }; // end of class LteUeComponentCarrierManager diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index cc45a0e3f..3c0e849b1 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -3034,11 +3034,6 @@ LteUeRrc::SwitchToState (State newState) } } -void -LteUeRrc::DoComponentCarrierEnabling (std::vector res) - { - NS_LOG_INFO (this); - } void LteUeRrc::SaveScellUeMeasurements (uint16_t sCellId, double rsrp, double rsrq, diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index bc7eb4e94..71945a026 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -484,12 +484,6 @@ private: */ void DoRecvRrcConnectionReject (LteRrcSap::RrcConnectionReject msg); - /** - * RRC CCM SAP USER Method - * \param res - */ - void DoComponentCarrierEnabling (std::vector res); - // INTERNAL METHODS diff --git a/src/lte/model/simple-ue-component-carrier-manager.cc b/src/lte/model/simple-ue-component-carrier-manager.cc index 1e2d74242..afcddd26e 100644 --- a/src/lte/model/simple-ue-component-carrier-manager.cc +++ b/src/lte/model/simple-ue-component-carrier-manager.cc @@ -133,7 +133,6 @@ SimpleUeComponentCarrierManager::SimpleUeComponentCarrierManager () { NS_LOG_FUNCTION (this); m_ccmRrcSapProvider = new MemberLteUeCcmRrcSapProvider (this); - m_noOfComponentCarriersEnabled = 1; m_ccmMacSapUser = new SimpleUeCcmMacSapUser (this); m_ccmMacSapProvider = new SimpleUeCcmMacSapProvider (this); } @@ -289,7 +288,7 @@ SimpleUeComponentCarrierManager::DoAddLc (uint8_t lcId, LteUeCmacSapProvider::L m_lcAttached.insert (std::pair (lcId, msu)); LteUeCcmRrcSapProvider::LcsConfig elem; std::map >::iterator ccLcMapIt; - for (uint8_t ncc = 0; ncc < m_noOfComponentCarriersEnabled; ncc++) + for (uint8_t ncc = 0; ncc < m_noOfComponentCarriers; ncc++) { elem.componentCarrierId = ncc; elem.lcConfig = &lcConfig; @@ -316,23 +315,6 @@ SimpleUeComponentCarrierManager::DoAddLc (uint8_t lcId, LteUeCmacSapProvider::L return res; } -void -SimpleUeComponentCarrierManager::DoNotifyConnectionReconfigurationMsg () -{ - NS_LOG_FUNCTION (this); - // this method need to be extended, now support only up to 2 ComponentCarrier Simulations - - if (m_noOfComponentCarriersEnabled < m_noOfComponentCarriers) - { - // new ComponentCarrierConfiguration Requested - m_noOfComponentCarriersEnabled++; - std::vector res; - res.insert (res.end (), m_noOfComponentCarriersEnabled); - //here the code to update all the Lc, since now those should be mapped on all ComponentCarriers - m_ccmRrcSapUser->ComponentCarrierEnabling (res); - } - -} LteMacSapUser* SimpleUeComponentCarrierManager::DoConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) { diff --git a/src/lte/model/simple-ue-component-carrier-manager.h b/src/lte/model/simple-ue-component-carrier-manager.h index e157ead37..4921da02e 100644 --- a/src/lte/model/simple-ue-component-carrier-manager.h +++ b/src/lte/model/simple-ue-component-carrier-manager.h @@ -125,8 +125,6 @@ protected: * \returns updated LC list */ std::vector DoRemoveLc (uint8_t lcid); - /// Notify connection reconfiguration message - void DoNotifyConnectionReconfigurationMsg (); /** * \brief Configure signal bearer function * \param lcId the LCID