11#ifndef WIFI_SPECTRUM_VALUE_HELPER_H
12#define WIFI_SPECTRUM_VALUE_HELPER_H
16#include <ns3/spectrum-value.h>
59 MHz_u guardBandwidth);
77 MHz_u guardBandwidth);
98 dBr_u minInnerBand = -20,
99 dBr_u minOuterband = -28,
100 dBr_u lowestPoint = -40);
118 const std::vector<MHz_u>& centerFrequencies,
121 MHz_u guardBandwidth,
122 dBr_u minInnerBand = -20,
123 dBr_u minOuterband = -28,
124 dBr_u lowestPoint = -40,
125 const std::vector<bool>& puncturedSubchannels = {});
143 const std::vector<MHz_u>& centerFrequencies,
146 MHz_u guardBandwidth,
147 dBr_u minInnerBand = -20,
148 dBr_u minOuterband = -28,
149 dBr_u lowestPoint = -40);
168 MHz_u centerFrequency,
171 MHz_u guardBandwidth,
172 dBr_u minInnerBand = -20,
173 dBr_u minOuterband = -28,
174 dBr_u lowestPoint = -40,
175 const std::vector<bool>& puncturedSubchannels = {});
194 const std::vector<MHz_u>& centerFrequencies,
197 MHz_u guardBandwidth,
198 dBr_u minInnerBand = -20,
199 dBr_u minOuterband = -28,
200 dBr_u lowestPoint = -40,
201 const std::vector<bool>& puncturedSubchannels = {});
217 const std::vector<MHz_u>& centerFrequencies,
220 MHz_u guardBandwidth,
221 const std::vector<WifiSpectrumBandIndices>& ru);
270 Ptr<SpectrumValue> c,
271 const std::vector<std::vector<WifiSpectrumBandIndices>>& allocatedSubBandsPerSegment,
279 const std::vector<std::vector<WifiSpectrumBandIndices>>& puncturedSubBands = {},
301 const std::vector<WifiSpectrumBandIndices>& segments);
322bool operator<(
const FrequencyRange& lhs,
const FrequencyRange& rhs);
333bool operator==(
const FrequencyRange& lhs,
const FrequencyRange& rhs);
344bool operator!=(
const FrequencyRange& lhs,
const FrequencyRange& rhs);
354std::ostream&
operator<<(std::ostream& os,
const FrequencyRange& freqRange);
Smart pointer class similar to boost::intrusive_ptr.
This class defines all functions to create a spectrum model for Wi-Fi based on a a spectral model ali...
virtual ~WifiSpectrumValueHelper()=default
Destructor.
static Ptr< SpectrumValue > CreateOfdmTxPowerSpectralDensity(MHz_u centerFrequency, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40)
Create a transmit power spectral density corresponding to OFDM (802.11a/g).
static Ptr< SpectrumValue > CreateDsssTxPowerSpectralDensity(MHz_u centerFrequency, Watt_u txPower, MHz_u guardBandwidth)
Create a transmit power spectral density corresponding to DSSS.
static void CreateSpectrumMaskForOfdm(Ptr< SpectrumValue > c, const std::vector< std::vector< WifiSpectrumBandIndices > > &allocatedSubBandsPerSegment, const WifiSpectrumBandIndices &maskBand, Watt_u txPowerPerBand, uint32_t nGuardBands, uint32_t innerSlopeWidth, dBr_u minInnerBand, dBr_u minOuterband, dBr_u lowestPoint, const std::vector< std::vector< WifiSpectrumBandIndices > > &puncturedSubBands={}, uint32_t puncturedSlopeWidth=0)
Create a transmit power spectral density corresponding to OFDM transmit spectrum mask requirements fo...
static Ptr< SpectrumModel > GetSpectrumModel(const std::vector< MHz_u > ¢erFrequencies, MHz_u channelWidth, Hz_u carrierSpacing, MHz_u guardBandwidth)
Return a SpectrumModel instance corresponding to the center frequency and channel width.
static Watt_u GetBandPowerW(Ptr< SpectrumValue > psd, const std::vector< WifiSpectrumBandIndices > &segments)
Calculate the power of the specified band composed of uniformly-sized sub-bands.
static Ptr< SpectrumValue > CreateHtOfdmTxPowerSpectralDensity(const std::vector< MHz_u > ¢erFrequencies, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40)
Create a transmit power spectral density corresponding to OFDM High Throughput (HT) (802....
static Ptr< SpectrumValue > CreateHeMuOfdmTxPowerSpectralDensity(const std::vector< MHz_u > ¢erFrequencies, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, const std::vector< WifiSpectrumBandIndices > &ru)
Create a transmit power spectral density corresponding to the OFDMA part of HE TB PPDUs for a given R...
static Ptr< SpectrumValue > CreateHeOfdmTxPowerSpectralDensity(MHz_u centerFrequency, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40, const std::vector< bool > &puncturedSubchannels={})
Create a transmit power spectral density corresponding to OFDM High Efficiency (HE) (802....
static Ptr< SpectrumValue > CreateDuplicated20MhzTxPowerSpectralDensity(const std::vector< MHz_u > ¢erFrequencies, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=-20, dBr_u minOuterband=-28, dBr_u lowestPoint=-40, const std::vector< bool > &puncturedSubchannels={})
Create a transmit power spectral density corresponding to OFDM duplicated over multiple 20 MHz subcha...
static void NormalizeSpectrumMask(Ptr< SpectrumValue > c, Watt_u txPower)
Normalize the transmit spectrum mask generated by CreateSpectrumMaskForOfdm so that the total transmi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
constexpr FrequencyRange WIFI_SPECTRUM_6_GHZ
Identifier for the frequency range covering the wifi spectrum in the 6 GHz band.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
bool operator==(const EventId &a, const EventId &b)
constexpr FrequencyRange WHOLE_WIFI_SPECTRUM
Identifier for the frequency range covering the whole wifi spectrum.
std::ostream & operator<<(std::ostream &os, const Angles &a)
double MHz_u
MHz weak type.
bool operator<(const EventId &a, const EventId &b)
constexpr FrequencyRange WIFI_SPECTRUM_5_GHZ
Identifier for the frequency range covering the wifi spectrum in the 5 GHz band.
double Watt_u
Watt weak type.
constexpr FrequencyRange WIFI_SPECTRUM_2_4_GHZ
Identifier for the frequency range covering the wifi spectrum in the 2.4 GHz band.
std::pair< uint32_t, uint32_t > WifiSpectrumBandIndices
typedef for a pair of start and stop sub-band indices
Struct defining a frequency range between minFrequency and maxFrequency.
MHz_u minFrequency
the minimum frequency
MHz_u maxFrequency
the maximum frequency
Declaration of the SI units (as weak types aliases) used across wifi module.