14#include "ns3/phy-entity.h"
15#include "ns3/wifi-export.h"
75 double& totalAmpduNumSymbols,
76 uint16_t staId)
const override;
79 Time ppduDuration)
override;
223 static uint64_t
GetPhyRate(
const std::string& name,
MHz_u channelWidth);
354 uint16_t constellationSize,
367 uint16_t usableSubCarriers,
368 uint16_t numberOfBitsPerSubcarrier,
static WifiMode GetOfdmRate6Mbps()
uint32_t GetMaxPsduSize() const override
Get the maximum PSDU size in bytes.
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
static WifiMode GetOfdmRate48Mbps()
dBm_u GetCcaThreshold(const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType) const override
Return the CCA threshold for a given channel type.
static const PpduFormats m_ofdmPpduFormats
OFDM PPDU formats.
static uint16_t GetConstellationSize(const std::string &name)
Return the constellation size from the OFDM mode's unique name using ModulationLookupTable.
static WifiMode GetOfdmRate54Mbps()
uint8_t GetNumberServiceBits() const
static WifiCodeRate GetCodeRate(const std::string &name)
Return the WifiCodeRate from the OFDM mode's unique name using ModulationLookupTable.
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the PHY rate corresponding to the supplied TXVECTOR.
static WifiMode GetOfdmRate36Mbps()
static WifiMode GetOfdmRate3MbpsBW10MHz()
static void InitializeModes()
Initialize all OFDM modes (for all variants).
virtual bool IsAllConfigSupported(WifiPpduField field, Ptr< const WifiPpdu > ppdu) const
Checks if the signaled configuration (including bandwidth) is supported by the PHY.
PhyFieldRxStatus EndReceiveHeader(Ptr< Event > event)
End receiving the header, perform OFDM-specific actions, and provide the status of the reception.
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
static uint64_t GetDataRate(const std::string &name, MHz_u channelWidth)
Return the data rate from the OFDM mode's unique name and the supplied parameters.
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
static WifiMode GetOfdmRate6MbpsBW5MHz()
OfdmPhy(OfdmPhyVariant variant=OFDM_PHY_DEFAULT, bool buildModeList=true)
Constructor for OFDM PHY.
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
static WifiMode GetOfdmRate18MbpsBW10MHz()
static Time GetSymbolDuration(MHz_u channelWidth)
static WifiMode GetOfdmRate12MbpsBW10MHz()
static uint16_t GetUsableSubcarriers()
static WifiMode GetOfdmRate9MbpsBW10MHz()
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
static WifiMode GetOfdmRate3MbpsBW5MHz()
virtual Time GetPreambleDuration(const WifiTxVector &txVector) const
Ptr< const WifiPpdu > GetRxPpduFromTxPpdu(Ptr< const WifiPpdu > ppdu) override
The WifiPpdu from the TX PHY is received by each RX PHY attached to the same channel.
static WifiMode GetOfdmRate27MbpsBW10MHz()
Ptr< SpectrumValue > GetTxPowerSpectralDensity(Watt_u txPower, Ptr< const WifiPpdu > ppdu) const override
static WifiMode GetOfdmRate9MbpsBW5MHz()
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
static WifiMode GetOfdmRate12Mbps()
static WifiMode CreateOfdmMode(std::string uniqueName, bool isMandatory)
Create an OFDM mode from a unique name, the unique name must already be contained inside ModulationLo...
static WifiMode GetOfdmRate24MbpsBW10MHz()
static WifiMode GetOfdmRate18Mbps()
static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate)
Calculate the PHY rate in bps from code rate and data rate.
static WifiMode GetOfdmRate6MbpsBW10MHz()
MHz_u GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
static WifiMode GetOfdmRate24Mbps()
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...
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
static WifiMode GetOfdmRate(uint64_t rate, MHz_u bw=MHz_u{20})
Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20,...
static uint64_t CalculateDataRate(WifiCodeRate codeRate, uint16_t constellationSize, MHz_u channelWidth)
Calculates data rate from the supplied parameters.
virtual Time GetHeaderDuration(const WifiTxVector &txVector) const
virtual WifiMode GetHeaderMode(const WifiTxVector &txVector) const
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
static WifiMode GetOfdmRate12MbpsBW5MHz()
static uint64_t GetPhyRate(const std::string &name, MHz_u channelWidth)
Return the PHY rate from the OFDM mode's unique name and the supplied parameters.
static const ModulationLookupTable m_ofdmModulationLookupTable
lookup table to retrieve code rate and constellation size corresponding to a unique name of modulatio...
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
static WifiMode GetOfdmRate9Mbps()
virtual bool IsChannelWidthSupported(Ptr< const WifiPpdu > ppdu) const
Checks if the PPDU's bandwidth is supported by the PHY.
static double GetCodeRatio(WifiCodeRate codeRate)
Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
Time GetSignalExtension(WifiPhyBand band) const
Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
Abstract class for PHY entities.
std::map< std::string, CodeRateConstellationSizePair > ModulationLookupTable
A modulation lookup table using unique name of modulation as key.
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
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...
WifiPhyBand
Identifies the PHY band.
OfdmPhyVariant
The OFDM (11a) PHY variants.
WifiChannelListType
Enumeration of the possible channel-list parameter elements defined in Table 8-5 of IEEE 802....
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.
double MHz_u
MHz weak type.
double dBm_u
dBm weak type
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
double Watt_u
Watt weak type.
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
Status of the reception of the PPDU field.