24 #include "ns3/ofdm-phy.h"
63 HtPhy(uint8_t maxNss = 1,
bool buildModeList =
true);
80 uint32_t& totalAmpduSize,
81 double& totalAmpduNumSymbols,
82 uint16_t staId)
const override;
85 Time ppduDuration)
override;
142 uint8_t nExtensionLtf = 0)
const;
406 uint16_t channelWidth,
407 uint16_t guardInterval,
444 uint16_t channelWidth,
445 uint16_t guardInterval,
535 uint16_t usableSubCarriers,
536 uint16_t numberOfBitsPerSubcarrier,
static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate)
Return the PHY rate corresponding to the supplied code rate and data rate.
CcaIndication GetCcaIndication(const Ptr< const WifiPpdu > ppdu) override
Get CCA end time and its corresponding channel list type when a new signal has been received by the P...
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HT MCS index between 0 and 7,...
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
uint8_t m_bssMembershipSelector
the BSS membership selector
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
~HtPhy() override
Destructor for HT PHY.
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
static WifiMode GetLSigMode()
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
static uint16_t GetHtConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HT MCS index.
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
uint8_t m_maxMcsIndexPerSs
the maximum MCS index per spatial stream as defined by the standard
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
bool IsAllConfigSupported(WifiPpduField field, Ptr< const WifiPpdu > ppdu) const override
Checks if the signaled configuration (including bandwidth) is supported by the PHY.
HtPhy(uint8_t maxNss=1, bool buildModeList=true)
Constructor for HT PHY.
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
static uint64_t GetDataRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the data rate corresponding to the supplied HT MCS index, channel width, guard interval,...
static void InitializeModes()
Initialize all HT modes.
static WifiCodeRate GetHtCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HT MCS index.
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize)
Return the rate (in bps) of the non-HT Reference Rate which corresponds to the supplied code rate and...
virtual Time GetTrainingDuration(const WifiTxVector &txVector, uint8_t nDataLtf, uint8_t nExtensionLtf=0) const
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
bool IsMcsSupported(uint8_t index) const override
Check if the WifiMode corresponding to the given MCS index is supported.
Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const override
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
uint8_t GetBssMembershipSelector() const
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the PHY rate corresponding to the supplied TXVECTOR.
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
WifiMode GetMcs(uint8_t index) const override
Get the WifiMode corresponding to the given MCS index.
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
virtual uint8_t GetNumberBccEncoders(const WifiTxVector &txVector) const
static uint64_t GetNonHtReferenceRate(uint8_t mcsValue)
Calculate the rate in bps of the non-HT Reference Rate corresponding to the supplied HT MCS index.
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
virtual Time GetLSigDuration(WifiPreamble preamble) const
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
static uint64_t GetPhyRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the PHY rate corresponding to the supplied HT MCS index, channel width, guard interval,...
void SetMaxSupportedMcsIndexPerSs(uint8_t maxIndex)
Set the maximum supported MCS index per spatial stream.
static WifiMode GetHtMcs(uint8_t index)
Return the HT MCS corresponding to the provided index.
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
static WifiMode CreateHtMcs(uint8_t index)
Return the HT MCS corresponding to the provided index.
uint32_t GetMaxPsduSize() const override
Get the maximum PSDU size in bytes.
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HT MCS index between 0 and 7,...
virtual WifiMode GetHtSigMode() const
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
static uint64_t CalculateDataRate(Time symbolDuration, uint16_t usableSubCarriers, uint16_t numberOfBitsPerSubcarrier, double codingRate, uint8_t nss)
Calculates data rate from the supplied parameters.
uint8_t GetMaxSupportedMcsIndexPerSs() const
Set the maximum supported MCS index per spatial stream.
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu) const override
bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const override
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
uint8_t m_maxSupportedNss
Maximum supported number of spatial streams (used to build HT MCS indices)
virtual void BuildModeList()
Build mode list.
static Time GetSymbolDuration(uint16_t channelWidth)
static double GetCodeRatio(WifiCodeRate codeRate)
Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
bool HandlesMcsModes() const override
Check if the WifiModes handled by this PHY are MCSs.
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
static const PpduFormats m_htPpduFormats
HT PPDU formats.
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
void SetMaxSupportedNss(uint8_t maxNss)
Configure the maximum number of spatial streams supported by this HT PHY.
PhyFieldRxStatus EndReceiveHtSig(Ptr< Event > event)
End receiving the HT-SIG, perform HT-specific actions, and provide the status of the reception.
virtual Time GetHtSigDuration() const
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
uint8_t m_maxSupportedMcsIndexPerSs
the maximum supported MCS index per spatial stream
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
virtual Time GetSymbolDuration(const WifiTxVector &txVector) const
PHY entity for OFDM (11a)
static uint16_t GetUsableSubcarriers()
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
std::optional< std::pair< Time, WifiChannelListType > > CcaIndication
CCA end time and its corresponding channel list type (can be std::nullopt if IDLE)
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
represent a single transmission mode
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
WifiPhyBand
Identifies the PHY band.
WifiPpduField
The type of PPDU field (grouped for convenience)
MpduType
The type of an MPDU.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
constexpr uint8_t HT_MAX_NSS
Maximum number of supported NSS by HT PHY.
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
Status of the reception of the PPDU field.