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