diff --git a/src/wifi/model/wifi-spectrum-phy-interface.cc b/src/wifi/model/wifi-spectrum-phy-interface.cc index b6f80c3d9..b89258017 100644 --- a/src/wifi/model/wifi-spectrum-phy-interface.cc +++ b/src/wifi/model/wifi-spectrum-phy-interface.cc @@ -107,7 +107,7 @@ WifiSpectrumPhyInterface::SetChannel(const Ptr c) } void -WifiSpectrumPhyInterface::SetRxSpectrumModel(uint32_t centerFrequency, +WifiSpectrumPhyInterface::SetRxSpectrumModel(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t bandBandwidth, ChannelWidthMhz guardBandwidth) diff --git a/src/wifi/model/wifi-spectrum-phy-interface.h b/src/wifi/model/wifi-spectrum-phy-interface.h index b768af95c..f9a47e99d 100644 --- a/src/wifi/model/wifi-spectrum-phy-interface.h +++ b/src/wifi/model/wifi-spectrum-phy-interface.h @@ -121,7 +121,7 @@ class WifiSpectrumPhyInterface : public SpectrumPhy * \param bandBandwidth the width of each band in Hz * \param guardBandwidth the width of the guard band in MHz */ - void SetRxSpectrumModel(uint32_t centerFrequency, + void SetRxSpectrumModel(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t bandBandwidth, ChannelWidthMhz guardBandwidth); diff --git a/src/wifi/model/wifi-spectrum-value-helper.cc b/src/wifi/model/wifi-spectrum-value-helper.cc index 19ff20278..06b4c6756 100644 --- a/src/wifi/model/wifi-spectrum-value-helper.cc +++ b/src/wifi/model/wifi-spectrum-value-helper.cc @@ -39,7 +39,7 @@ NS_LOG_COMPONENT_DEFINE("WifiSpectrumValueHelper"); ///< Wifi Spectrum Model structure struct WifiSpectrumModelId { - uint32_t m_centerFrequency; ///< center frequency (in MHz) + uint16_t m_centerFrequency; ///< center frequency (in MHz) ChannelWidthMhz m_channelWidth; ///< channel width (in MHz) uint32_t m_carrierSpacing; ///< carrier spacing (in Hz) ChannelWidthMhz m_guardBandwidth; ///< guard band width (in MHz) @@ -69,7 +69,7 @@ static std::map> g_wifiSpectrumModelMap; ///< static initializer for the class Ptr -WifiSpectrumValueHelper::GetSpectrumModel(uint32_t centerFrequency, +WifiSpectrumValueHelper::GetSpectrumModel(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t carrierSpacing, ChannelWidthMhz guardBandwidth) @@ -124,7 +124,7 @@ WifiSpectrumValueHelper::GetSpectrumModel(uint32_t centerFrequency, // Power allocated to 71 center subbands out of 135 total subbands in the band Ptr -WifiSpectrumValueHelper::CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, +WifiSpectrumValueHelper::CreateDsssTxPowerSpectralDensity(uint16_t centerFrequency, double txPowerW, ChannelWidthMhz guardBandwidth) { @@ -151,7 +151,7 @@ WifiSpectrumValueHelper::CreateDsssTxPowerSpectralDensity(uint32_t centerFrequen } Ptr -WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity(uint32_t centerFrequency, +WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -223,7 +223,7 @@ WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity(uint32_t centerFrequen Ptr WifiSpectrumValueHelper::CreateDuplicated20MhzTxPowerSpectralDensity( - uint32_t centerFrequency, + uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -298,7 +298,7 @@ WifiSpectrumValueHelper::CreateDuplicated20MhzTxPowerSpectralDensity( } Ptr -WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity(uint32_t centerFrequency, +WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -364,7 +364,7 @@ WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity(uint32_t centerFrequ Ptr WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity( - uint32_t centerFrequency, + uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -497,7 +497,7 @@ WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity( } Ptr -WifiSpectrumValueHelper::CreateHeMuOfdmTxPowerSpectralDensity(uint32_t centerFrequency, +WifiSpectrumValueHelper::CreateHeMuOfdmTxPowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -530,7 +530,7 @@ WifiSpectrumValueHelper::CreateHeMuOfdmTxPowerSpectralDensity(uint32_t centerFre } Ptr -WifiSpectrumValueHelper::CreateNoisePowerSpectralDensity(uint32_t centerFrequency, +WifiSpectrumValueHelper::CreateNoisePowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t carrierSpacing, double noiseFigure, diff --git a/src/wifi/model/wifi-spectrum-value-helper.h b/src/wifi/model/wifi-spectrum-value-helper.h index 126fb2b11..b4ecbb8cb 100644 --- a/src/wifi/model/wifi-spectrum-value-helper.h +++ b/src/wifi/model/wifi-spectrum-value-helper.h @@ -63,7 +63,7 @@ class WifiSpectrumValueHelper * \return the static SpectrumModel instance corresponding to the * given carrier frequency and channel width configuration. */ - static Ptr GetSpectrumModel(uint32_t centerFrequency, + static Ptr GetSpectrumModel(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t carrierSpacing, ChannelWidthMhz guardBandwidth); @@ -82,7 +82,7 @@ class WifiSpectrumValueHelper * \returns a pointer to a newly allocated SpectrumValue representing the DSSS Transmit Power * Spectral Density in W/Hz */ - static Ptr CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, + static Ptr CreateDsssTxPowerSpectralDensity(uint16_t centerFrequency, double txPowerW, ChannelWidthMhz guardBandwidth); @@ -102,7 +102,7 @@ class WifiSpectrumValueHelper * \return a pointer to a newly allocated SpectrumValue representing the OFDM Transmit Power * Spectral Density in W/Hz for each Band */ - static Ptr CreateOfdmTxPowerSpectralDensity(uint32_t centerFrequency, + static Ptr CreateOfdmTxPowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -127,7 +127,7 @@ class WifiSpectrumValueHelper * Transmit Power Spectral Density in W/Hz for each Band */ static Ptr CreateDuplicated20MhzTxPowerSpectralDensity( - uint32_t centerFrequency, + uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -152,7 +152,7 @@ class WifiSpectrumValueHelper * \return a pointer to a newly allocated SpectrumValue representing the HT OFDM Transmit Power * Spectral Density in W/Hz for each Band */ - static Ptr CreateHtOfdmTxPowerSpectralDensity(uint32_t centerFrequency, + static Ptr CreateHtOfdmTxPowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -178,7 +178,7 @@ class WifiSpectrumValueHelper * Spectral Density in W/Hz for each Band */ static Ptr CreateHeOfdmTxPowerSpectralDensity( - uint32_t centerFrequency, + uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -201,7 +201,7 @@ class WifiSpectrumValueHelper * Spectral Density on the RU used by the STA in W/Hz for each Band */ static Ptr CreateHeMuOfdmTxPowerSpectralDensity( - uint32_t centerFrequency, + uint16_t centerFrequency, ChannelWidthMhz channelWidth, double txPowerW, ChannelWidthMhz guardBandwidth, @@ -218,7 +218,7 @@ class WifiSpectrumValueHelper * \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral * Density in W/Hz for each Band */ - static Ptr CreateNoisePowerSpectralDensity(uint32_t centerFrequency, + static Ptr CreateNoisePowerSpectralDensity(uint16_t centerFrequency, ChannelWidthMhz channelWidth, uint32_t carrierSpacing, double noiseFigure,