From bf8bd4bf57accf96aa571629cb3d36ded0892154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Thu, 23 Feb 2023 20:24:39 +0100 Subject: [PATCH] spectrum: Wifi band bandwidth should be a uint32_t --- .../model/wifi-spectrum-value-helper.cc | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/spectrum/model/wifi-spectrum-value-helper.cc b/src/spectrum/model/wifi-spectrum-value-helper.cc index 2174a651c..23c35cdc4 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.cc +++ b/src/spectrum/model/wifi-spectrum-value-helper.cc @@ -39,29 +39,12 @@ NS_LOG_COMPONENT_DEFINE("WifiSpectrumValueHelper"); ///< Wifi Spectrum Model structure struct WifiSpectrumModelId { - /** - * Constructor - * \param f the frequency (in MHz) - * \param w the channel width (in MHz) - * \param b the width of each band (in Hz) - * \param g the guard band width (in MHz) - */ - WifiSpectrumModelId(uint32_t f, uint16_t w, double b, uint16_t g); uint32_t m_centerFrequency; ///< center frequency (in MHz) uint16_t m_channelWidth; ///< channel width (in MHz) - double m_bandBandwidth; ///< width of each band (in Hz) + uint32_t m_bandBandwidth; ///< width of each band (in Hz) uint16_t m_guardBandwidth; ///< guard band width (in MHz) }; -WifiSpectrumModelId::WifiSpectrumModelId(uint32_t f, uint16_t w, double b, uint16_t g) - : m_centerFrequency(f), - m_channelWidth(w), - m_bandBandwidth(b), - m_guardBandwidth(g) -{ - NS_LOG_FUNCTION(this << f << w << b << g); -} - /** * Less than operator * \param a the first wifi spectrum to compare @@ -93,7 +76,7 @@ WifiSpectrumValueHelper::GetSpectrumModel(uint32_t centerFrequency, { NS_LOG_FUNCTION(centerFrequency << channelWidth << bandBandwidth << guardBandwidth); Ptr ret; - WifiSpectrumModelId key(centerFrequency, channelWidth, bandBandwidth, guardBandwidth); + WifiSpectrumModelId key{centerFrequency, channelWidth, bandBandwidth, guardBandwidth}; std::map>::iterator it = g_wifiSpectrumModelMap.find(key); if (it != g_wifiSpectrumModelMap.end())