From 7a77ec98651e4b623fcf2efc90de208801afc49f Mon Sep 17 00:00:00 2001 From: Biljana Bojovic Date: Tue, 17 Jan 2017 19:41:16 +0100 Subject: [PATCH] lte: allow higher frequency values, e.g. in 5GHz band (uint16_t to uint32_t) --- src/lte/examples/lena-dual-stripe.cc | 4 ++-- src/lte/helper/lte-helper.cc | 2 +- src/lte/model/epc-ue-nas.cc | 4 ++-- src/lte/model/epc-ue-nas.h | 4 ++-- src/lte/model/lte-as-sap.h | 12 +++++----- src/lte/model/lte-enb-cphy-sap.h | 6 ++--- src/lte/model/lte-enb-net-device.cc | 12 +++++----- src/lte/model/lte-enb-net-device.h | 12 +++++----- src/lte/model/lte-enb-phy.cc | 2 +- src/lte/model/lte-enb-phy.h | 2 +- src/lte/model/lte-enb-rrc.h | 4 ++-- src/lte/model/lte-phy.h | 4 ++-- src/lte/model/lte-rrc-header.cc | 2 +- src/lte/model/lte-spectrum-value-helper.cc | 28 +++++++++++----------- src/lte/model/lte-spectrum-value-helper.h | 14 +++++------ src/lte/model/lte-ue-cphy-sap.h | 18 +++++++------- src/lte/model/lte-ue-net-device.cc | 6 ++--- src/lte/model/lte-ue-net-device.h | 6 ++--- src/lte/model/lte-ue-phy.cc | 6 ++--- src/lte/model/lte-ue-phy.h | 6 ++--- src/lte/model/lte-ue-rrc.cc | 8 +++---- src/lte/model/lte-ue-rrc.h | 12 +++++----- 22 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/lte/examples/lena-dual-stripe.cc b/src/lte/examples/lena-dual-stripe.cc index 8977088d5..142e7600e 100644 --- a/src/lte/examples/lena-dual-stripe.cc +++ b/src/lte/examples/lena-dual-stripe.cc @@ -401,9 +401,9 @@ main (int argc, char *argv[]) GlobalValue::GetValueByName ("homeEnbTxPowerDbm", doubleValue); double homeEnbTxPowerDbm = doubleValue.Get (); GlobalValue::GetValueByName ("macroEnbDlEarfcn", uintegerValue); - uint16_t macroEnbDlEarfcn = uintegerValue.Get (); + uint32_t macroEnbDlEarfcn = uintegerValue.Get (); GlobalValue::GetValueByName ("homeEnbDlEarfcn", uintegerValue); - uint16_t homeEnbDlEarfcn = uintegerValue.Get (); + uint32_t homeEnbDlEarfcn = uintegerValue.Get (); GlobalValue::GetValueByName ("macroEnbBandwidth", uintegerValue); uint16_t macroEnbBandwidth = uintegerValue.Get (); GlobalValue::GetValueByName ("homeEnbBandwidth", uintegerValue); diff --git a/src/lte/helper/lte-helper.cc b/src/lte/helper/lte-helper.cc index a0c1fb566..7bc04cc8b 100644 --- a/src/lte/helper/lte-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -741,7 +741,7 @@ LteHelper::Attach (Ptr ueDevice) // initiate cell selection Ptr ueNas = ueLteDevice->GetNas (); NS_ASSERT (ueNas != 0); - uint16_t dlEarfcn = ueLteDevice->GetDlEarfcn (); + uint32_t dlEarfcn = ueLteDevice->GetDlEarfcn (); ueNas->StartCellSelection (dlEarfcn); // instruct UE to immediately enter CONNECTED mode after camping diff --git a/src/lte/model/epc-ue-nas.cc b/src/lte/model/epc-ue-nas.cc index ce880b78c..e733831ce 100644 --- a/src/lte/model/epc-ue-nas.cc +++ b/src/lte/model/epc-ue-nas.cc @@ -146,7 +146,7 @@ EpcUeNas::SetForwardUpCallback (Callback > cb) } void -EpcUeNas::StartCellSelection (uint16_t dlEarfcn) +EpcUeNas::StartCellSelection (uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << dlEarfcn); m_asSapProvider->StartCellSelection (dlEarfcn); @@ -162,7 +162,7 @@ EpcUeNas::Connect () } void -EpcUeNas::Connect (uint16_t cellId, uint16_t dlEarfcn) +EpcUeNas::Connect (uint16_t cellId, uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << cellId << dlEarfcn); diff --git a/src/lte/model/epc-ue-nas.h b/src/lte/model/epc-ue-nas.h index 0faf5cb6f..f90f7517b 100644 --- a/src/lte/model/epc-ue-nas.h +++ b/src/lte/model/epc-ue-nas.h @@ -102,7 +102,7 @@ public: * * \param dlEarfcn the DL frequency of the eNB */ - void StartCellSelection (uint16_t dlEarfcn); + void StartCellSelection (uint32_t dlEarfcn); /** * \brief Causes NAS to tell AS to go to ACTIVE state. @@ -121,7 +121,7 @@ public: * Since RRC Idle Mode cell selection is not supported yet, we force the UE * RRC to be camped on a specific eNB. */ - void Connect (uint16_t cellId, uint16_t dlEarfcn); + void Connect (uint16_t cellId, uint32_t dlEarfcn); /** * instruct the NAS to disconnect diff --git a/src/lte/model/lte-as-sap.h b/src/lte/model/lte-as-sap.h index 706ea877b..3c9948ffd 100644 --- a/src/lte/model/lte-as-sap.h +++ b/src/lte/model/lte-as-sap.h @@ -56,7 +56,7 @@ public: * * \param dlEarfcn the downlink carrier frequency (EARFCN) */ - virtual void StartCellSelection (uint16_t dlEarfcn) = 0; + virtual void StartCellSelection (uint32_t dlEarfcn) = 0; /** * \brief Force the RRC entity to stay camped on a certain eNodeB. @@ -64,7 +64,7 @@ public: * \param cellId the cell ID identifying the eNodeB * \param dlEarfcn the downlink carrier frequency (EARFCN) */ - virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn) = 0; + virtual void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn) = 0; /** * \brief Tell the RRC entity to enter Connected mode. @@ -151,8 +151,8 @@ public: // inherited from LteAsSapProvider virtual void SetCsgWhiteList (uint32_t csgId); - virtual void StartCellSelection (uint16_t dlEarfcn); - virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn); + virtual void StartCellSelection (uint32_t dlEarfcn); + virtual void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn); virtual void Connect (void); virtual void SendData (Ptr packet, uint8_t bid); virtual void Disconnect (); @@ -182,14 +182,14 @@ MemberLteAsSapProvider::SetCsgWhiteList (uint32_t csgId) template void -MemberLteAsSapProvider::StartCellSelection (uint16_t dlEarfcn) +MemberLteAsSapProvider::StartCellSelection (uint32_t dlEarfcn) { m_owner->DoStartCellSelection (dlEarfcn); } template void -MemberLteAsSapProvider::ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn) +MemberLteAsSapProvider::ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn) { m_owner->DoForceCampedOnEnb (cellId, dlEarfcn); } diff --git a/src/lte/model/lte-enb-cphy-sap.h b/src/lte/model/lte-enb-cphy-sap.h index 1983eecc9..72e7f18cb 100644 --- a/src/lte/model/lte-enb-cphy-sap.h +++ b/src/lte/model/lte-enb-cphy-sap.h @@ -63,7 +63,7 @@ public: * \param ulEarfcn the UL EARFCN * \param dlEarfcn the DL EARFCN */ - virtual void SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn) = 0; + virtual void SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn) = 0; /** * Add a new UE to the cell @@ -151,7 +151,7 @@ public: // inherited from LteEnbCphySapProvider virtual void SetCellId (uint16_t cellId); virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth); - virtual void SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn); + virtual void SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn); virtual void AddUe (uint16_t rnti); virtual void RemoveUe (uint16_t rnti); virtual void SetPa (uint16_t rnti, double pa); @@ -194,7 +194,7 @@ MemberLteEnbCphySapProvider::SetBandwidth (uint8_t ulBandwidth, uint8_t dlBan template void -MemberLteEnbCphySapProvider::SetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn) +MemberLteEnbCphySapProvider::SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn) { m_owner->DoSetEarfcn (ulEarfcn, dlEarfcn); } diff --git a/src/lte/model/lte-enb-net-device.cc b/src/lte/model/lte-enb-net-device.cc index d0eced56f..eef3da75c 100644 --- a/src/lte/model/lte-enb-net-device.cc +++ b/src/lte/model/lte-enb-net-device.cc @@ -115,13 +115,13 @@ TypeId LteEnbNetDevice::GetTypeId (void) "as per 3GPP 36.101 Section 5.7.3. ", UintegerValue (100), MakeUintegerAccessor (&LteEnbNetDevice::m_dlEarfcn), - MakeUintegerChecker (0, 6599)) + MakeUintegerChecker (0, 262143)) .AddAttribute ("UlEarfcn", "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) " "as per 3GPP 36.101 Section 5.7.3. ", UintegerValue (18100), MakeUintegerAccessor (&LteEnbNetDevice::m_ulEarfcn), - MakeUintegerChecker (18000, 24599)) + MakeUintegerChecker (0, 262143)) .AddAttribute ("CsgId", "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to", UintegerValue (0), @@ -265,27 +265,27 @@ LteEnbNetDevice::SetDlBandwidth (uint8_t bw) } } -uint16_t +uint32_t LteEnbNetDevice::GetDlEarfcn () const { return m_dlEarfcn; } void -LteEnbNetDevice::SetDlEarfcn (uint16_t earfcn) +LteEnbNetDevice::SetDlEarfcn (uint32_t earfcn) { NS_LOG_FUNCTION (this << earfcn); m_dlEarfcn = earfcn; } -uint16_t +uint32_t LteEnbNetDevice::GetUlEarfcn () const { return m_ulEarfcn; } void -LteEnbNetDevice::SetUlEarfcn (uint16_t earfcn) +LteEnbNetDevice::SetUlEarfcn (uint32_t earfcn) { NS_LOG_FUNCTION (this << earfcn); m_ulEarfcn = earfcn; diff --git a/src/lte/model/lte-enb-net-device.h b/src/lte/model/lte-enb-net-device.h index 1458aa5c4..1d41a71b4 100644 --- a/src/lte/model/lte-enb-net-device.h +++ b/src/lte/model/lte-enb-net-device.h @@ -105,22 +105,22 @@ public: /** * \return the downlink carrier frequency (EARFCN) */ - uint16_t GetDlEarfcn () const; + uint32_t GetDlEarfcn () const; /** * \param earfcn the downlink carrier frequency (EARFCN) */ - void SetDlEarfcn (uint16_t earfcn); + void SetDlEarfcn (uint32_t earfcn); /** * \return the uplink carrier frequency (EARFCN) */ - uint16_t GetUlEarfcn () const; + uint32_t GetUlEarfcn () const; /** * \param earfcn the uplink carrier frequency (EARFCN) */ - void SetUlEarfcn (uint16_t earfcn); + void SetUlEarfcn (uint32_t earfcn); /** * \brief Returns the CSG ID of the eNodeB. @@ -207,8 +207,8 @@ private: uint8_t m_dlBandwidth; /**< downlink bandwidth in RBs */ uint8_t m_ulBandwidth; /**< uplink bandwidth in RBs */ - uint16_t m_dlEarfcn; /**< downlink carrier frequency */ - uint16_t m_ulEarfcn; /**< uplink carrier frequency */ + uint32_t m_dlEarfcn; /**< downlink carrier frequency */ + uint32_t m_ulEarfcn; /**< uplink carrier frequency */ uint16_t m_csgId; bool m_csgIndication; diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index 783fc83eb..6df91436c 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -908,7 +908,7 @@ LteEnbPhy::DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) } void -LteEnbPhy::DoSetEarfcn (uint16_t ulEarfcn, uint16_t dlEarfcn) +LteEnbPhy::DoSetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << ulEarfcn << dlEarfcn); m_ulEarfcn = ulEarfcn; diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index cd87af9c9..b608a2c3b 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -308,7 +308,7 @@ private: // LteEnbCphySapProvider forwarded methods void DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth); - void DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn); + void DoSetEarfcn (uint32_t dlEarfcn, uint32_t ulEarfcn); void DoAddUe (uint16_t rnti); void DoRemoveUe (uint16_t rnti); void DoSetPa (uint16_t rnti, double pa); diff --git a/src/lte/model/lte-enb-rrc.h b/src/lte/model/lte-enb-rrc.h index b466f2ddd..797319847 100644 --- a/src/lte/model/lte-enb-rrc.h +++ b/src/lte/model/lte-enb-rrc.h @@ -1093,9 +1093,9 @@ private: /// Cell identifier. Must be unique across the simulation. uint16_t m_cellId; /// Downlink E-UTRA Absolute Radio Frequency Channel Number. - uint16_t m_dlEarfcn; + uint32_t m_dlEarfcn; /// Uplink E-UTRA Absolute Radio Frequency Channel Number. - uint16_t m_ulEarfcn; + uint32_t m_ulEarfcn; /// Downlink transmission bandwidth configuration in number of Resource Blocks. uint16_t m_dlBandwidth; /// Uplink transmission bandwidth configuration in number of Resource Blocks. diff --git a/src/lte/model/lte-phy.h b/src/lte/model/lte-phy.h index 1bf1c28a3..f9b8d9739 100644 --- a/src/lte/model/lte-phy.h +++ b/src/lte/model/lte-phy.h @@ -262,12 +262,12 @@ protected: * The downlink carrier frequency. * Specified by the upper layer through CPHY SAP. */ - uint16_t m_dlEarfcn; + uint32_t m_dlEarfcn; /** * The uplink carrier frequency. * Specified by the upper layer through CPHY SAP. */ - uint16_t m_ulEarfcn; + uint32_t m_ulEarfcn; /// A queue of packet bursts to be sent. std::vector< Ptr > m_packetBurstQueue; diff --git a/src/lte/model/lte-rrc-header.cc b/src/lte/model/lte-rrc-header.cc index 36505a1a8..99b94b0d6 100644 --- a/src/lte/model/lte-rrc-header.cc +++ b/src/lte/model/lte-rrc-header.cc @@ -25,7 +25,7 @@ #include #define MAX_DRB 11 // According to section 6.4 3GPP TS 36.331 -#define MAX_EARFCN 65535 +#define MAX_EARFCN 262143 #define MAX_RAT_CAPABILITIES 8 #define MAX_SI_MESSAGE 32 #define MAX_SIB 32 diff --git a/src/lte/model/lte-spectrum-value-helper.cc b/src/lte/model/lte-spectrum-value-helper.cc index 8cbe7940d..d7d30d7b7 100644 --- a/src/lte/model/lte-spectrum-value-helper.cc +++ b/src/lte/model/lte-spectrum-value-helper.cc @@ -58,13 +58,13 @@ static const struct EutraChannelNumbers { uint8_t band; double fDlLow; - uint16_t nOffsDl; - uint16_t rangeNdl1; - uint16_t rangeNdl2; + uint32_t nOffsDl; + uint32_t rangeNdl1; + uint32_t rangeNdl2; double fUlLow; - uint16_t nOffsUl; - uint16_t rangeNul1; - uint16_t rangeNul2; + uint32_t nOffsUl; + uint32_t rangeNul1; + uint32_t rangeNul2; } g_eutraChannelNumbers[] = { { 1, 2110, 0, 0, 599, 1920, 18000, 18000, 18599}, { 2, 1930, 600, 600, 1199, 1850, 18600, 18600, 19199}, @@ -98,7 +98,7 @@ static const struct EutraChannelNumbers #define NUM_EUTRA_BANDS (sizeof (g_eutraChannelNumbers) / sizeof (EutraChannelNumbers)) double -LteSpectrumValueHelper::GetCarrierFrequency (uint16_t earfcn) +LteSpectrumValueHelper::GetCarrierFrequency (uint32_t earfcn) { NS_LOG_FUNCTION (earfcn); if (earfcn < 7000) @@ -114,7 +114,7 @@ LteSpectrumValueHelper::GetCarrierFrequency (uint16_t earfcn) } double -LteSpectrumValueHelper::GetDownlinkCarrierFrequency (uint16_t nDl) +LteSpectrumValueHelper::GetDownlinkCarrierFrequency (uint32_t nDl) { NS_LOG_FUNCTION (nDl); for (uint16_t i = 0; i < NUM_EUTRA_BANDS; ++i) @@ -131,7 +131,7 @@ LteSpectrumValueHelper::GetDownlinkCarrierFrequency (uint16_t nDl) } double -LteSpectrumValueHelper::GetUplinkCarrierFrequency (uint16_t nUl) +LteSpectrumValueHelper::GetUplinkCarrierFrequency (uint32_t nUl) { NS_LOG_FUNCTION (nUl); for (uint16_t i = 0; i < NUM_EUTRA_BANDS; ++i) @@ -176,7 +176,7 @@ LteSpectrumValueHelper::GetChannelBandwidth (uint8_t transmissionBandwidth) struct LteSpectrumModelId { LteSpectrumModelId (uint16_t f, uint8_t b); - uint16_t earfcn; + uint32_t earfcn; uint8_t bandwidth; }; @@ -197,7 +197,7 @@ static std::map > g_lteSpectrumModelMap; Ptr -LteSpectrumValueHelper::GetSpectrumModel (uint16_t earfcn, uint8_t txBandwidthConfiguration) +LteSpectrumValueHelper::GetSpectrumModel (uint32_t earfcn, uint8_t txBandwidthConfiguration) { NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration); Ptr ret; @@ -232,7 +232,7 @@ LteSpectrumValueHelper::GetSpectrumModel (uint16_t earfcn, uint8_t txBandwidthCo } Ptr -LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t txBandwidthConfiguration, double powerTx, std::vector activeRbs) +LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint32_t earfcn, uint8_t txBandwidthConfiguration, double powerTx, std::vector activeRbs) { NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << powerTx << activeRbs); @@ -256,7 +256,7 @@ LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t t } Ptr -LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t txBandwidthConfiguration, double powerTx, std::map powerTxMap, std::vector activeRbs) +LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint32_t earfcn, uint8_t txBandwidthConfiguration, double powerTx, std::map powerTxMap, std::vector activeRbs) { NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << activeRbs); @@ -296,7 +296,7 @@ LteSpectrumValueHelper::CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t t Ptr -LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (uint16_t earfcn, uint8_t txBandwidthConfiguration, double noiseFigure) +LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (uint32_t earfcn, uint8_t txBandwidthConfiguration, double noiseFigure) { NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << noiseFigure); Ptr model = GetSpectrumModel (earfcn, txBandwidthConfiguration); diff --git a/src/lte/model/lte-spectrum-value-helper.h b/src/lte/model/lte-spectrum-value-helper.h index e1f086856..57530cc2b 100644 --- a/src/lte/model/lte-spectrum-value-helper.h +++ b/src/lte/model/lte-spectrum-value-helper.h @@ -45,7 +45,7 @@ public: * * \return the carrier frequency in Hz */ - static double GetCarrierFrequency (uint16_t earfcn); + static double GetCarrierFrequency (uint32_t earfcn); /** * Calculates the dowlink carrier frequency from the E-UTRA Absolute @@ -56,7 +56,7 @@ public: * * \return the dowlink carrier frequency in Hz */ - static double GetDownlinkCarrierFrequency (uint16_t earfcn); + static double GetDownlinkCarrierFrequency (uint32_t earfcn); /** * Calculates the uplink carrier frequency from the E-UTRA Absolute @@ -67,7 +67,7 @@ public: * * \return the uplink carrier frequency in Hz */ - static double GetUplinkCarrierFrequency (uint16_t earfcn); + static double GetUplinkCarrierFrequency (uint32_t earfcn); /** * @@ -91,7 +91,7 @@ public: * configuration. If such SpectrumModel does not exist, it is * created. */ - static Ptr GetSpectrumModel (uint16_t earfcn, uint8_t bandwidth); + static Ptr GetSpectrumModel (uint32_t earfcn, uint8_t bandwidth); /** @@ -107,7 +107,7 @@ public: * * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block */ - static Ptr CreateTxPowerSpectralDensity (uint16_t earfcn, + static Ptr CreateTxPowerSpectralDensity (uint32_t earfcn, uint8_t bandwidth, double powerTx, std::vector activeRbs); @@ -128,7 +128,7 @@ public: * * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block */ - static Ptr CreateTxPowerSpectralDensity (uint16_t earfcn, + static Ptr CreateTxPowerSpectralDensity (uint32_t earfcn, uint8_t bandwidth, double powerTx, std::map powerTxMap, @@ -145,7 +145,7 @@ public: * * \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral Density in W/Hz for each Resource Block */ - static Ptr CreateNoisePowerSpectralDensity (uint16_t earfcn, uint8_t bandwidth, double noiseFigure); + static Ptr CreateNoisePowerSpectralDensity (uint32_t earfcn, uint8_t bandwidth, double noiseFigure); /** * create a SpectrumValue that models the power spectral density of AWGN diff --git a/src/lte/model/lte-ue-cphy-sap.h b/src/lte/model/lte-ue-cphy-sap.h index 0977af990..8f876d4c8 100644 --- a/src/lte/model/lte-ue-cphy-sap.h +++ b/src/lte/model/lte-ue-cphy-sap.h @@ -66,7 +66,7 @@ public: * and periodically returning measurement reports to RRC via * LteUeCphySapUser::ReportUeMeasurements function. */ - virtual void StartCellSearch (uint16_t dlEarfcn) = 0; + virtual void StartCellSearch (uint32_t dlEarfcn) = 0; /** * \brief Tell the PHY entity to synchronize with a given eNodeB over the @@ -101,7 +101,7 @@ public: * LteUeCphySapProvider::SetDlBandwidth can be called afterwards to increase * the bandwidth. */ - virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) = 0; + virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn) = 0; /** * \param dlBandwidth the DL bandwidth in number of PRBs @@ -114,7 +114,7 @@ public: * \param ulEarfcn the uplink carrier frequency (EARFCN) * \param ulBandwidth the UL bandwidth in number of PRBs */ - virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth) = 0; + virtual void ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth) = 0; /** * \brief Configure referenceSignalPower @@ -227,11 +227,11 @@ public: // inherited from LteUeCphySapProvider virtual void Reset (); - virtual void StartCellSearch (uint16_t dlEarfcn); + virtual void StartCellSearch (uint32_t dlEarfcn); virtual void SynchronizeWithEnb (uint16_t cellId); - virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn); + virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn); virtual void SetDlBandwidth (uint8_t dlBandwidth); - virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth); + virtual void ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth); virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower); virtual void SetRnti (uint16_t rnti); virtual void SetTransmissionMode (uint8_t txMode); @@ -263,7 +263,7 @@ MemberLteUeCphySapProvider::Reset () template void -MemberLteUeCphySapProvider::StartCellSearch (uint16_t dlEarfcn) +MemberLteUeCphySapProvider::StartCellSearch (uint32_t dlEarfcn) { m_owner->DoStartCellSearch (dlEarfcn); } @@ -277,7 +277,7 @@ MemberLteUeCphySapProvider::SynchronizeWithEnb (uint16_t cellId) template void -MemberLteUeCphySapProvider::SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) +MemberLteUeCphySapProvider::SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn) { m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn); } @@ -291,7 +291,7 @@ MemberLteUeCphySapProvider::SetDlBandwidth (uint8_t dlBandwidth) template void -MemberLteUeCphySapProvider::ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth) +MemberLteUeCphySapProvider::ConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth) { m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth); } diff --git a/src/lte/model/lte-ue-net-device.cc b/src/lte/model/lte-ue-net-device.cc index e4da3d584..c54c35621 100644 --- a/src/lte/model/lte-ue-net-device.cc +++ b/src/lte/model/lte-ue-net-device.cc @@ -89,7 +89,7 @@ TypeId LteUeNetDevice::GetTypeId (void) UintegerValue (100), MakeUintegerAccessor (&LteUeNetDevice::SetDlEarfcn, &LteUeNetDevice::GetDlEarfcn), - MakeUintegerChecker (0, 6149)) + MakeUintegerChecker (0, 262143)) .AddAttribute ("CsgId", "The Closed Subscriber Group (CSG) identity that this UE is associated with, " "i.e., giving the UE access to cells which belong to this particular CSG. " @@ -193,7 +193,7 @@ LteUeNetDevice::GetImsi () const return m_imsi; } -uint16_t +uint32_t LteUeNetDevice::GetDlEarfcn () const { NS_LOG_FUNCTION (this); @@ -201,7 +201,7 @@ LteUeNetDevice::GetDlEarfcn () const } void -LteUeNetDevice::SetDlEarfcn (uint16_t earfcn) +LteUeNetDevice::SetDlEarfcn (uint32_t earfcn) { NS_LOG_FUNCTION (this << earfcn); m_dlEarfcn = earfcn; diff --git a/src/lte/model/lte-ue-net-device.h b/src/lte/model/lte-ue-net-device.h index e6ae131ce..cb8cdc5a9 100644 --- a/src/lte/model/lte-ue-net-device.h +++ b/src/lte/model/lte-ue-net-device.h @@ -79,7 +79,7 @@ public: * Note that real-life handset typically supports more than one EARFCN, but * the sake of simplicity we assume only one EARFCN is supported. */ - uint16_t GetDlEarfcn () const; + uint32_t GetDlEarfcn () const; /** * \param earfcn the downlink carrier frequency (EARFCN) @@ -87,7 +87,7 @@ public: * Note that real-life handset typically supports more than one EARFCN, but * the sake of simplicity we assume only one EARFCN is supported. */ - void SetDlEarfcn (uint16_t earfcn); + void SetDlEarfcn (uint32_t earfcn); /** * \brief Returns the CSG ID the UE is currently a member of. @@ -149,7 +149,7 @@ private: uint64_t m_imsi; - uint16_t m_dlEarfcn; /**< downlink carrier frequency */ + uint32_t m_dlEarfcn; /**< downlink carrier frequency */ uint32_t m_csgId; diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index a674f8f10..f0dde8831 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -1222,7 +1222,7 @@ LteUePhy::DoReset () } // end of void LteUePhy::DoReset () void -LteUePhy::DoStartCellSearch (uint16_t dlEarfcn) +LteUePhy::DoStartCellSearch (uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << dlEarfcn); m_dlEarfcn = dlEarfcn; @@ -1231,7 +1231,7 @@ LteUePhy::DoStartCellSearch (uint16_t dlEarfcn) } void -LteUePhy::DoSynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) +LteUePhy::DoSynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << cellId << dlEarfcn); m_dlEarfcn = dlEarfcn; @@ -1293,7 +1293,7 @@ LteUePhy::DoSetDlBandwidth (uint8_t dlBandwidth) void -LteUePhy::DoConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth) +LteUePhy::DoConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth) { m_ulEarfcn = ulEarfcn; m_ulBandwidth = ulBandwidth; diff --git a/src/lte/model/lte-ue-phy.h b/src/lte/model/lte-ue-phy.h index b049ec9a4..27cd95571 100644 --- a/src/lte/model/lte-ue-phy.h +++ b/src/lte/model/lte-ue-phy.h @@ -310,11 +310,11 @@ private: // UE CPHY SAP methods void DoReset (); - void DoStartCellSearch (uint16_t dlEarfcn); + void DoStartCellSearch (uint32_t dlEarfcn); void DoSynchronizeWithEnb (uint16_t cellId); - void DoSynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn); + void DoSynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn); void DoSetDlBandwidth (uint8_t ulBandwidth); - void DoConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth); + void DoConfigureUplink (uint32_t ulEarfcn, uint8_t ulBandwidth); void DoConfigureReferenceSignalPower (int8_t referenceSignalPower); void DoSetRnti (uint16_t rnti); void DoSetTransmissionMode (uint8_t txMode); diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index db13b3514..4c1dd06c0 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -363,13 +363,13 @@ LteUeRrc::GetDlBandwidth () const return m_dlBandwidth; } -uint16_t +uint32_t LteUeRrc::GetDlEarfcn () const { return m_dlEarfcn; } -uint16_t +uint32_t LteUeRrc::GetUlEarfcn () const { NS_LOG_FUNCTION (this); @@ -590,7 +590,7 @@ LteUeRrc::DoSetCsgWhiteList (uint32_t csgId) } void -LteUeRrc::DoStartCellSelection (uint16_t dlEarfcn) +LteUeRrc::DoStartCellSelection (uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << m_imsi << dlEarfcn); NS_ASSERT_MSG (m_state == IDLE_START, @@ -601,7 +601,7 @@ LteUeRrc::DoStartCellSelection (uint16_t dlEarfcn) } void -LteUeRrc::DoForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn) +LteUeRrc::DoForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn) { NS_LOG_FUNCTION (this << m_imsi << cellId << dlEarfcn); diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index f6fd6cce8..fb49faf89 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -226,12 +226,12 @@ public: /** * \return the downlink carrier frequency (EARFCN) */ - uint16_t GetDlEarfcn () const; + uint32_t GetDlEarfcn () const; /** * \return the uplink carrier frequency (EARFCN) */ - uint16_t GetUlEarfcn () const; + uint32_t GetUlEarfcn () const; /** * @@ -305,8 +305,8 @@ private: // LTE AS SAP methods void DoSetCsgWhiteList (uint32_t csgId); - void DoForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn); - void DoStartCellSelection (uint16_t dlEarfcn); + void DoForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn); + void DoStartCellSelection (uint32_t dlEarfcn); void DoConnect (); void DoSendData (Ptr packet, uint8_t bid); void DoDisconnect (); @@ -581,8 +581,8 @@ private: uint8_t m_dlBandwidth; /**< Downlink bandwidth in RBs. */ uint8_t m_ulBandwidth; /**< Uplink bandwidth in RBs. */ - uint16_t m_dlEarfcn; /**< Downlink carrier frequency. */ - uint16_t m_ulEarfcn; /**< Uplink carrier frequency. */ + uint32_t m_dlEarfcn; /**< Downlink carrier frequency. */ + uint32_t m_ulEarfcn; /**< Uplink carrier frequency. */ /** * The `MibReceived` trace source. Fired upon reception of Master Information