From e00523cf594ee5ab648b811c7fe2018d5898370d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sat, 25 Feb 2023 12:06:23 +0100 Subject: [PATCH] spectrum: Cleanup unused functions --- .../model/wifi-spectrum-value-helper.cc | 41 ------------------- .../model/wifi-spectrum-value-helper.h | 28 ------------- 2 files changed, 69 deletions(-) diff --git a/src/spectrum/model/wifi-spectrum-value-helper.cc b/src/spectrum/model/wifi-spectrum-value-helper.cc index 125feca8f..cef38923b 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.cc +++ b/src/spectrum/model/wifi-spectrum-value-helper.cc @@ -579,31 +579,6 @@ WifiSpectrumValueHelper::CreateNoisePowerSpectralDensity(double noiseFigureDb, return noisePsd; } -Ptr -WifiSpectrumValueHelper::CreateRfFilter(uint32_t centerFrequency, - uint16_t totalChannelWidth, - uint32_t bandBandwidth, - uint16_t guardBandwidth, - WifiSpectrumBand band) -{ - uint32_t startIndex = band.first; - uint32_t stopIndex = band.second; - NS_LOG_FUNCTION(centerFrequency << totalChannelWidth << bandBandwidth << guardBandwidth - << startIndex << stopIndex); - Ptr c = Create( - GetSpectrumModel(centerFrequency, totalChannelWidth, bandBandwidth, guardBandwidth)); - Bands::const_iterator bit = c->ConstBandsBegin(); - Values::iterator vit = c->ValuesBegin(); - vit += startIndex; - bit += startIndex; - for (size_t i = startIndex; i <= stopIndex; i++, vit++, bit++) - { - *vit = 1; - } - NS_LOG_LOGIC("Added subbands " << startIndex << " to " << stopIndex << " to filter"); - return c; -} - void WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm( Ptr c, @@ -916,22 +891,6 @@ WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity(double txPower, uint8 return txPsd; } -Ptr -WifiSpectrumValue5MhzFactory::CreateRfFilter(uint8_t channel) -{ - Ptr rf = Create(g_WifiSpectrumModel5Mhz); - - NS_ASSERT(channel >= 1); - NS_ASSERT(channel <= 13); - - (*rf)[channel + 3] = 1; - (*rf)[channel + 4] = 1; - (*rf)[channel + 5] = 1; - (*rf)[channel + 6] = 1; - - return rf; -} - bool operator<(const FrequencyRange& left, const FrequencyRange& right) { diff --git a/src/spectrum/model/wifi-spectrum-value-helper.h b/src/spectrum/model/wifi-spectrum-value-helper.h index b15f86b0a..ad56981ca 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.h +++ b/src/spectrum/model/wifi-spectrum-value-helper.h @@ -232,24 +232,6 @@ class WifiSpectrumValueHelper static Ptr CreateNoisePowerSpectralDensity(double noiseFigure, Ptr spectrumModel); - /** - * Create a spectral density corresponding to the RF filter - * - * \param centerFrequency the center frequency (MHz) - * \param totalChannelWidth the total channel width (MHz) - * \param bandBandwidth the width of each band (MHz) - * \param guardBandwidth the width of the guard band (MHz) - * \param band the pair of start and stop indexes that defines the band to be filtered - * - * \return a pointer to a SpectrumValue representing the RF filter applied - * to an received power spectral density - */ - static Ptr CreateRfFilter(uint32_t centerFrequency, - uint16_t totalChannelWidth, - uint32_t bandBandwidth, - uint16_t guardBandwidth, - WifiSpectrumBand band); - /** * Create a transmit power spectral density corresponding to OFDM * transmit spectrum mask requirements for 11a/11g/11n/11ac/11ax @@ -383,16 +365,6 @@ class WifiSpectrumValue5MhzFactory * @return a Ptr to a newly created SpectrumValue */ virtual Ptr CreateTxPowerSpectralDensity(double txPower, uint8_t channel); - /** - * Creates a SpectrumValue instance which - * represents the frequency response of the RF filter which is used - * by a wifi device to receive signals when tuned to a particular channel - * - * @param channel the number of the channel (1 <= channel <= 13) - * - * @return a Ptr to a newly created SpectrumValue - */ - virtual Ptr CreateRfFilter(uint8_t channel); }; /**