A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::OfdmPhy Class Reference

PHY entity for OFDM (11a) More...

#include "ofdm-phy.h"

+ Inheritance diagram for ns3::OfdmPhy:
+ Collaboration diagram for ns3::OfdmPhy:

Public Member Functions

 OfdmPhy (OfdmPhyVariant variant=OFDM_PHY_DEFAULT, bool buildModeList=true)
 Constructor for OFDM PHY.
 
 ~OfdmPhy () override
 Destructor for OFDM PHY.
 
Ptr< WifiPpduBuildPpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
 Build amendment-specific PPDU.
 
dBm_u GetCcaThreshold (const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType) const override
 Return the CCA threshold for a given channel type.
 
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 transmission parameters.
 
Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
 
const PpduFormatsGetPpduFormats () const override
 Return the PPDU formats of the PHY.
 
Ptr< const WifiPpduGetRxPpduFromTxPpdu (Ptr< const WifiPpdu > ppdu) override
 The WifiPpdu from the TX PHY is received by each RX PHY attached to the same channel.
 
WifiMode GetSigMode (WifiPpduField field, const WifiTxVector &txVector) const override
 Get the WifiMode for the SIG field specified by the PPDU field.
 
- Public Member Functions inherited from ns3::PhyEntity
virtual ~PhyEntity ()
 Destructor for PHY entity.
 
std::list< WifiMode >::const_iterator begin () const
 Return a const iterator to the first WifiMode.
 
Time CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector) const
 
virtual Time CalculateTxDuration (const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, WifiPhyBand band) const
 
virtual void CancelAllEvents ()
 Cancel and clear all running events.
 
void CancelRunningEndPreambleDetectionEvents ()
 Cancel all end preamble detection events.
 
virtual bool CanStartRx (Ptr< const WifiPpdu > ppdu) const
 Determine whether the PHY shall issue a PHY-RXSTART.indication primitive in response to a given PPDU.
 
std::list< WifiMode >::const_iterator end () const
 Return a const iterator to past-the-last WifiMode.
 
void EndReceiveField (WifiPpduField field, Ptr< Event > event)
 End receiving a given field.
 
void EndReceivePayload (Ptr< Event > event)
 The last symbol of the PPDU has arrived.
 
virtual Ptr< const WifiPsduGetAddressedPsduInPpdu (Ptr< const WifiPpdu > ppdu) const
 Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
 
Time GetDurationUpToField (WifiPpduField field, const WifiTxVector &txVector) const
 Get the duration of the PPDU up to (but excluding) the given field.
 
virtual Time GetMaxDelayPpduSameUid (const WifiTxVector &txVector)
 Obtain the maximum time between two PPDUs with the same UID to consider they are identical and their power can be added construtively.
 
virtual WifiMode GetMcs (uint8_t index) const
 Get the WifiMode corresponding to the given MCS index.
 
WifiPpduField GetNextField (WifiPpduField currentField, WifiPreamble preamble) const
 Return the field following the provided one.
 
virtual uint8_t GetNumModes () const
 
PhyHeaderSections GetPhyHeaderSections (const WifiTxVector &txVector, Time ppduStart) const
 Return a map of PHY header chunk information per PPDU field.
 
Time GetRemainingDurationAfterField (Ptr< const WifiPpdu > ppdu, WifiPpduField field) const
 Get the remaining duration of the PPDU after the end of the given field.
 
virtual uint16_t GetStaId (const Ptr< const WifiPpdu > ppdu) const
 Return the STA ID that has been assigned to the station this PHY belongs to.
 
virtual WifiConstPsduMap GetWifiConstPsduMap (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) const
 Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.
 
virtual bool HandlesMcsModes () const
 Check if the WifiModes handled by this PHY are MCSs.
 
virtual bool IsMcsSupported (uint8_t index) const
 Check if the WifiMode corresponding to the given MCS index is supported.
 
virtual bool IsModeSupported (WifiMode mode) const
 Check if the WifiMode is supported.
 
bool NoEndPreambleDetectionEvents () const
 
virtual void NotifyCcaBusy (const Ptr< const WifiPpdu > ppdu, Time duration, WifiChannelListType channelType)
 Notify PHY state helper to switch to CCA busy state,.
 
virtual uint64_t ObtainNextUid (const WifiTxVector &txVector)
 Obtain the next UID for the PPDU to transmit.
 
void ResetReceive (Ptr< Event > event)
 Reset PHY at the end of the PPDU under reception after it has failed the PHY header.
 
void SetOwner (Ptr< WifiPhy > wifiPhy)
 Set the WifiPhy owning this PHY entity.
 
void StartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field.
 
virtual void StartReceivePreamble (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration)
 Start receiving the PHY preamble of a PPDU (i.e.
 
virtual void StartTx (Ptr< const WifiPpdu > ppdu)
 This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actions.
 
virtual void SwitchMaybeToCcaBusy (const Ptr< const WifiPpdu > ppdu)
 Check if PHY state should move to CCA busy state based on current state of interference tracker.
 
void Transmit (Time txDuration, Ptr< const WifiPpdu > ppdu, dBm_u txPower, Ptr< SpectrumValue > txPowerSpectrum, const std::string &type)
 This function prepares most of the WifiSpectrumSignalParameters parameters and invokes SpectrumWifiPhy's Transmit method.
 
- Public Member Functions inherited from ns3::SimpleRefCount< PhyEntity >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Static Public Member Functions

static WifiCodeRate GetCodeRate (const std::string &name)
 Return the WifiCodeRate from the OFDM mode's unique name using ModulationLookupTable.
 
static uint16_t GetConstellationSize (const std::string &name)
 Return the constellation size from the OFDM mode's unique name using ModulationLookupTable.
 
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 uint64_t GetDataRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the data rate corresponding to the supplied TXVECTOR.
 
static WifiMode GetOfdmRate (uint64_t rate, MHz_u bw=20)
 Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20, 10, or 5 MHz).
 
static WifiMode GetOfdmRate12Mbps ()
 Return a WifiMode for OFDM at 12Mbps.
 
static WifiMode GetOfdmRate12MbpsBW10MHz ()
 Return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate12MbpsBW5MHz ()
 Return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate13_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate18Mbps ()
 Return a WifiMode for OFDM at 18 Mbps.
 
static WifiMode GetOfdmRate18MbpsBW10MHz ()
 Return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate1_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate24Mbps ()
 Return a WifiMode for OFDM at 24 Mbps.
 
static WifiMode GetOfdmRate24MbpsBW10MHz ()
 Return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate27MbpsBW10MHz ()
 Return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate2_25MbpsBW5MHz ()
 Return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate36Mbps ()
 Return a WifiMode for OFDM at 36 Mbps.
 
static WifiMode GetOfdmRate3MbpsBW10MHz ()
 Return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate3MbpsBW5MHz ()
 Return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate48Mbps ()
 Return a WifiMode for OFDM at 48 Mbps.
 
static WifiMode GetOfdmRate4_5MbpsBW10MHz ()
 Return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate4_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate54Mbps ()
 Return a WifiMode for OFDM at 54 Mbps.
 
static WifiMode GetOfdmRate6Mbps ()
 Return a WifiMode for OFDM at 6 Mbps.
 
static WifiMode GetOfdmRate6MbpsBW10MHz ()
 Return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate6MbpsBW5MHz ()
 Return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing.
 
static WifiMode GetOfdmRate9Mbps ()
 Return a WifiMode for OFDM at 9 Mbps.
 
static WifiMode GetOfdmRate9MbpsBW10MHz ()
 Return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing.
 
static WifiMode GetOfdmRate9MbpsBW5MHz ()
 Return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing.
 
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 uint64_t GetPhyRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the PHY rate corresponding to the supplied TXVECTOR.
 
static void InitializeModes ()
 Initialize all OFDM modes (for all variants).
 
static bool IsAllowed (const WifiTxVector &txVector)
 Check whether the combination in TXVECTOR is allowed.
 

Protected Member Functions

PhyFieldRxStatus DoEndReceiveField (WifiPpduField field, Ptr< Event > event) override
 End receiving a given field, perform amendment-specific actions, and provide the status of the reception.
 
PhyFieldRxStatus EndReceiveHeader (Ptr< Event > event)
 End receiving the header, perform OFDM-specific actions, and provide the status of the reception.
 
virtual Time GetHeaderDuration (const WifiTxVector &txVector) const
 
virtual WifiMode GetHeaderMode (const WifiTxVector &txVector) const
 
uint32_t GetMaxPsduSize () const override
 Get the maximum PSDU size in bytes.
 
MHz_u GetMeasurementChannelWidth (const Ptr< const WifiPpdu > ppdu) const override
 Return the channel width used to measure the RSSI.
 
uint8_t GetNumberServiceBits () const
 
virtual Time GetPreambleDuration (const WifiTxVector &txVector) const
 
Time GetSignalExtension (WifiPhyBand band) const
 
Ptr< SpectrumValueGetTxPowerSpectralDensity (Watt_u txPower, Ptr< const WifiPpdu > ppdu) const override
 
virtual bool IsAllConfigSupported (WifiPpduField field, Ptr< const WifiPpdu > ppdu) const
 Checks if the signaled configuration (including bandwidth) is supported by the PHY.
 
virtual bool IsChannelWidthSupported (Ptr< const WifiPpdu > ppdu) const
 Checks if the PPDU's bandwidth is supported by the PHY.
 
- Protected Member Functions inherited from ns3::PhyEntity
void AbortCurrentReception (WifiPhyRxfailureReason reason)
 Abort the current reception.
 
void AddPreambleEvent (Ptr< Event > event)
 Add an entry to the map of current preamble events (stored in WifiPhy).
 
Ptr< EventCreateInterferenceEvent (Ptr< const WifiPpdu > ppdu, Time duration, RxPowerWattPerChannelBand &rxPower, bool isStartHePortionRxing=false)
 Create an event using WifiPhy's InterferenceHelper class.
 
virtual void DoAbortCurrentReception (WifiPhyRxfailureReason reason)
 Perform amendment-specific actions before aborting the current reception.
 
virtual void DoEndReceivePayload (Ptr< const WifiPpdu > ppdu)
 Perform amendment-specific actions at the end of the reception of the payload.
 
virtual PhyFieldRxStatus DoEndReceivePreamble (Ptr< Event > event)
 End receiving the preamble, perform amendment-specific actions, and provide the status of the reception.
 
virtual Ptr< EventDoGetEvent (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW)
 Get the event corresponding to the incoming PPDU.
 
virtual void DoResetReceive (Ptr< Event > event)
 Perform amendment-specific actions before resetting PHY at the end of the PPDU under reception after it has failed the PHY header.
 
virtual bool DoStartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field, perform amendment-specific actions, and signify if it is supported.
 
virtual Time DoStartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e.
 
void DropPreambleEvent (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason, Time endRx)
 Drop the PPDU and the corresponding preamble detection event, but keep CCA busy state after the completion of the currently processed event.
 
void EndOfMpdu (Ptr< Event > event, Ptr< WifiMpdu > mpdu, size_t mpduIndex, Time relativeStart, Time mpduDuration)
 The last symbol of an MPDU in an A-MPDU has arrived.
 
void EndPreambleDetectionPeriod (Ptr< Event > event)
 End the preamble detection period.
 
void ErasePreambleEvent (Ptr< const WifiPpdu > ppdu, Time rxDuration)
 Erase the event corresponding to the PPDU from the list of preamble events, but consider it as noise after the completion of the current event.
 
virtual CcaIndication GetCcaIndication (const Ptr< const WifiPpdu > ppdu)
 Get CCA end time and its corresponding channel list type when a new signal has been received by the PHY.
 
virtual std::pair< MHz_u, WifiSpectrumBandInfoGetChannelWidthAndBand (const WifiTxVector &txVector, uint16_t staId) const
 Get the channel width and band to use (will be overloaded by child classes).
 
Ptr< const EventGetCurrentEvent () const
 Get the pointer to the current event (stored in WifiPhy).
 
const std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > & GetCurrentPreambleEvents () const
 Get the map of current preamble events (stored in WifiPhy).
 
Time GetDelayUntilCcaEnd (dBm_u threshold, const WifiSpectrumBandInfo &band)
 Return the delay until CCA busy is ended for a given sensitivity threshold and a given band.
 
MHz_u GetGuardBandwidth (MHz_u currentChannelWidth) const
 
SnrPer GetPhyHeaderSnrPer (WifiPpduField field, Ptr< Event > event) const
 Obtain the SNR and PER of the PPDU field from the WifiPhy's InterferenceHelper class.
 
WifiSpectrumBandInfo GetPrimaryBand (MHz_u bandWidth) const
 If the operating channel width is a multiple of 20 MHz, return the info corresponding to the primary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width).
 
double GetRandomValue () const
 Obtain a random value from the WifiPhy's generator.
 
std::pair< bool, SignalNoiseDbmGetReceptionStatus (Ptr< WifiMpdu > mpdu, Ptr< Event > event, uint16_t staId, Time relativeMpduStart, Time mpduDuration)
 Get the reception status for the provided MPDU and notify.
 
virtual MHz_u GetRxChannelWidth (const WifiTxVector &txVector) const
 Return the channel width used in the reception spectrum model.
 
Watt_u GetRxPowerForPpdu (Ptr< Event > event) const
 Obtain the received power for a given band.
 
WifiSpectrumBandInfo GetSecondaryBand (MHz_u bandWidth) const
 If the channel bonding is used, return the info corresponding to the secondary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width).
 
std::tuple< dBr_u, dBr_u, dBr_uGetTxMaskRejectionParams () const
 
virtual void HandleRxPpduWithSameContent (Ptr< Event > event, Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPower)
 Handle reception of a PPDU that carries the same content of another PPDU.
 
virtual bool IsConfigSupported (Ptr< const WifiPpdu > ppdu) const
 Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
 
void NotifyInterferenceRxEndAndClear (bool reset)
 Notify WifiPhy's InterferenceHelper of the end of the reception, clear maps and end of MPDU event, and eventually reset WifiPhy.
 
void NotifyPayloadBegin (const WifiTxVector &txVector, const Time &payloadDuration)
 Fire the trace indicating that the PHY is starting to receive the payload of a PPDU.
 
virtual void RxPayloadFailed (Ptr< const WifiPsdu > psdu, double snr, const WifiTxVector &txVector)
 Perform amendment-specific actions when the payload is unsuccessfuly received.
 
virtual void RxPayloadSucceeded (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, uint16_t staId, const std::vector< bool > &statusPerMpdu)
 Perform amendment-specific actions when the payload is successfully received.
 
void ScheduleEndOfMpdus (Ptr< Event > event)
 Schedule end of MPDUs events.
 
void StartPreambleDetectionPeriod (Ptr< Event > event)
 Start the preamble detection period.
 
void StartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e.
 

Static Protected Member Functions

static uint64_t CalculateDataRate (Time symbolDuration, uint16_t usableSubCarriers, uint16_t numberOfBitsPerSubcarrier, double codingRate)
 Calculates data rate from the supplied parameters.
 
static uint64_t CalculateDataRate (WifiCodeRate codeRate, uint16_t constellationSize, MHz_u channelWidth)
 Calculates data rate from the supplied parameters.
 
static uint64_t CalculatePhyRate (WifiCodeRate codeRate, uint64_t dataRate)
 Calculate the PHY rate in bps from code rate and data rate.
 
static double GetCodeRatio (WifiCodeRate codeRate)
 Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
 
static Time GetSymbolDuration (MHz_u channelWidth)
 
static uint16_t GetUsableSubcarriers ()
 

Static Private Member Functions

static WifiMode CreateOfdmMode (std::string uniqueName, bool isMandatory)
 Create an OFDM mode from a unique name, the unique name must already be contained inside ModulationLookupTable.
 

Static Private Attributes

static const ModulationLookupTable m_ofdmModulationLookupTable
 lookup table to retrieve code rate and constellation size corresponding to a unique name of modulation
 
static const PpduFormats m_ofdmPpduFormats
 OFDM PPDU formats.
 

Additional Inherited Members

- Public Types inherited from ns3::PhyEntity
typedef std::pair< std::pair< Time, Time >, WifiModePhyHeaderChunkInfo
 A pair containing information on the PHY header chunk, namely the start and stop times of the chunk and the WifiMode used.
 
typedef std::map< WifiPpduField, PhyHeaderChunkInfoPhyHeaderSections
 A map of PhyHeaderChunkInfo elements per PPDU field.
 
enum  PhyRxFailureAction { DROP = 0 , ABORT , IGNORE }
 Action to perform in case of RX failure. More...
 
- Protected Types inherited from ns3::PhyEntity
using CcaIndication
 CCA end time and its corresponding channel list type (can be std::nullopt if IDLE)
 
typedef std::pair< WifiCodeRate, uint16_t > CodeRateConstellationSizePair
 A pair to hold modulation information: code rate and constellation size.
 
typedef std::map< std::string, CodeRateConstellationSizePairModulationLookupTable
 A modulation lookup table using unique name of modulation as key.
 
typedef std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
 A map of PPDU field elements per preamble type.
 
typedef std::pair< uint64_t, uint16_t > UidStaIdPair
 A pair of a UID and STA_ID.
 
- Protected Attributes inherited from ns3::PhyEntity
std::vector< EventIdm_endOfMacHdrEvents
 the end of MAC header events
 
std::vector< EventIdm_endOfMpduEvents
 the end of MPDU events (only used for A-MPDUs)
 
std::vector< EventIdm_endPreambleDetectionEvents
 the end of preamble detection events
 
std::vector< EventIdm_endRxPayloadEvents
 the end of receive events (only one unless UL MU reception)
 
std::list< WifiModem_modeList
 the list of supported modes
 
std::map< UidStaIdPair, SignalNoiseDbmm_signalNoiseMap
 Map of the latest signal power and noise power in dBm (noise power includes the noise figure)
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper of the WifiPhy (to make it reachable for child classes)
 
std::map< UidStaIdPair, std::vector< bool > > m_statusPerMpduMap
 Map of the current reception status per MPDU that is filled in as long as MPDUs are being processed by the PHY in case of an A-MPDU.
 
Ptr< WifiPhym_wifiPhy
 Pointer to the owning WifiPhy.
 
- Static Protected Attributes inherited from ns3::PhyEntity
static uint64_t m_globalPpduUid = 0
 Global counter of the PPDU UID.
 

Detailed Description

PHY entity for OFDM (11a)

This class is also used for the 10 MHz and 5 MHz bandwidth variants addressing vehicular communications (default is 20 MHz bandwidth).

Refer to IEEE 802.11-2016, clause 17.

Definition at line 49 of file ofdm-phy.h.

Constructor & Destructor Documentation

◆ OfdmPhy()

ns3::OfdmPhy::OfdmPhy ( OfdmPhyVariant variant = OFDM_PHY_DEFAULT,
bool buildModeList = true )

Constructor for OFDM PHY.

Parameters
variantthe OFDM PHY variant
buildModeListflag used to add OFDM modes to list (disabled by child classes to only add child classes' modes)

Definition at line 98 of file ofdm-phy.cc.

References GetOfdmRate(), ns3::GetOfdmRatesBpsList(), ns3::PhyEntity::m_modeList, NS_ABORT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::OFDM_PHY_10_MHZ, ns3::OFDM_PHY_5_MHZ, and ns3::OFDM_PHY_DEFAULT.

+ Here is the call graph for this function:

◆ ~OfdmPhy()

ns3::OfdmPhy::~OfdmPhy ( )
override

Destructor for OFDM PHY.

Definition at line 138 of file ofdm-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ BuildPpdu()

Ptr< WifiPpdu > ns3::OfdmPhy::BuildPpdu ( const WifiConstPsduMap & psdus,
const WifiTxVector & txVector,
Time ppduDuration )
overridevirtual

Build amendment-specific PPDU.

Parameters
psdusthe PHY payloads (PSDUs)
txVectorthe TXVECTOR that was used for the PPDU
ppduDurationthe transmission duration of the PPDU
Returns
the amendment-specific WifiPpdu

Reimplemented from ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 285 of file ofdm-phy.cc.

References ns3::Create(), ns3::WifiPhy::GetLatestPhyEntity(), ns3::WifiPhy::GetOperatingChannel(), ns3::PhyEntity::m_wifiPhy, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CalculateDataRate() [1/2]

uint64_t ns3::OfdmPhy::CalculateDataRate ( Time symbolDuration,
uint16_t usableSubCarriers,
uint16_t numberOfBitsPerSubcarrier,
double codingRate )
staticprotected

Calculates data rate from the supplied parameters.

Parameters
symbolDurationthe symbol duration
usableSubCarriersthe number of usable subcarriers for data
numberOfBitsPerSubcarrierthe number of data bits per subcarrier
codingRatethe coding rate
Returns
the data bit rate of this signal in bps.

Definition at line 614 of file ofdm-phy.cc.

References ns3::Time::GetNanoSeconds().

+ Here is the call graph for this function:

◆ CalculateDataRate() [2/2]

uint64_t ns3::OfdmPhy::CalculateDataRate ( WifiCodeRate codeRate,
uint16_t constellationSize,
MHz_u channelWidth )
staticprotected

Calculates data rate from the supplied parameters.

Parameters
codeRatethe code rate of the mode
constellationSizethe size of modulation constellation
channelWidththe considered channel width
Returns
the data bit rate of this signal in bps.

Definition at line 605 of file ofdm-phy.cc.

References CalculateDataRate(), GetCodeRatio(), GetSymbolDuration(), and GetUsableSubcarriers().

Referenced by ns3::HtPhy::CalculateDataRate(), CalculateDataRate(), ns3::ErpOfdmPhy::GetDataRate(), GetDataRate(), and ns3::ErpOfdmPhy::GetPhyRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalculatePhyRate()

uint64_t ns3::OfdmPhy::CalculatePhyRate ( WifiCodeRate codeRate,
uint64_t dataRate )
staticprotected

Calculate the PHY rate in bps from code rate and data rate.

Parameters
codeRatethe WifiCodeRate
dataRatethe data rate in bps
Returns
the physical rate in bps from WifiCodeRate and data rate.

Definition at line 561 of file ofdm-phy.cc.

References GetCodeRatio().

Referenced by ns3::ErpOfdmPhy::GetPhyRate(), and GetPhyRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateOfdmMode()

WifiMode ns3::OfdmPhy::CreateOfdmMode ( std::string uniqueName,
bool isMandatory )
staticprivate

Create an OFDM mode from a unique name, the unique name must already be contained inside ModulationLookupTable.

This method binds all the callbacks used by WifiMode.

Parameters
uniqueNamethe unique name of the WifiMode
isMandatorywhether the WifiMode is mandatory
Returns
the OFDM WifiMode

Definition at line 523 of file ofdm-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), GetCodeRate(), GetConstellationSize(), GetDataRateFromTxVector(), GetPhyRateFromTxVector(), IsAllowed(), m_ofdmModulationLookupTable, ns3::MakeBoundCallback(), ns3::MakeCallback(), NS_ASSERT_MSG, and ns3::WIFI_MOD_CLASS_OFDM.

+ Here is the call graph for this function:

◆ DoEndReceiveField()

PhyEntity::PhyFieldRxStatus ns3::OfdmPhy::DoEndReceiveField ( WifiPpduField field,
Ptr< Event > event )
overrideprotectedvirtual

End receiving a given field, perform amendment-specific actions, and provide the status of the reception.

Parameters
fieldthe ending PPDU field
eventthe event holding incoming PPDU's information
Returns
status of the reception of the PPDU field

Reimplemented from ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 299 of file ofdm-phy.cc.

References ns3::PhyEntity::DoEndReceiveField(), EndReceiveHeader(), NS_LOG_FUNCTION, and ns3::WIFI_PPDU_FIELD_NON_HT_HEADER.

Referenced by ns3::HtPhy::DoEndReceiveField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EndReceiveHeader()

PhyEntity::PhyFieldRxStatus ns3::OfdmPhy::EndReceiveHeader ( Ptr< Event > event)
protected

End receiving the header, perform OFDM-specific actions, and provide the status of the reception.

Parameters
eventthe event holding incoming PPDU's information
Returns
status of the reception of the header

Definition at line 310 of file ofdm-phy.cc.

References ns3::PhyEntity::ABORT, ns3::PhyEntity::PhyFieldRxStatus::actionIfFailure, ns3::PhyEntity::DROP, ns3::PhyEntity::GetPhyHeaderSnrPer(), ns3::PhyEntity::GetRandomValue(), IsAllConfigSupported(), ns3::PhyEntity::PhyFieldRxStatus::isSuccess, ns3::L_SIG_FAILURE, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::PhyEntity::SnrPer::per, ns3::RatioToDb(), ns3::PhyEntity::PhyFieldRxStatus::reason, ns3::PhyEntity::SnrPer::snr, ns3::UNSUPPORTED_SETTINGS, and ns3::WIFI_PPDU_FIELD_NON_HT_HEADER.

Referenced by DoEndReceiveField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCcaThreshold()

dBm_u ns3::OfdmPhy::GetCcaThreshold ( const Ptr< const WifiPpdu > ppdu,
WifiChannelListType channelType ) const
overridevirtual

Return the CCA threshold for a given channel type.

If the channel type is not provided, the default CCA threshold is returned.

Parameters
ppduthe PPDU that is being received
channelTypethe channel type
Returns
the CCA threshold

Reimplemented from ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 668 of file ofdm-phy.cc.

References ns3::DbmToW(), ns3::WifiPhy::GetCcaSensitivityThreshold(), ns3::PhyEntity::GetCcaThreshold(), ns3::PhyEntity::GetRxChannelWidth(), ns3::PhyEntity::m_wifiPhy, and ns3::WToDbm().

Referenced by ns3::HtPhy::GetCcaIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCodeRate()

WifiCodeRate ns3::OfdmPhy::GetCodeRate ( const std::string & name)
static

Return the WifiCodeRate from the OFDM mode's unique name using ModulationLookupTable.

This is mainly used as a callback for WifiMode operation.

Parameters
namethe unique name of the OFDM mode
Returns
WifiCodeRate corresponding to the unique name

Definition at line 541 of file ofdm-phy.cc.

References m_ofdmModulationLookupTable.

Referenced by CreateOfdmMode(), GetDataRate(), and GetPhyRate().

+ Here is the caller graph for this function:

◆ GetCodeRatio()

double ns3::OfdmPhy::GetCodeRatio ( WifiCodeRate codeRate)
staticprotected

Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.

Parameters
codeRatethe WifiCodeRate
Returns
the ratio form of WifiCodeRate.

Definition at line 573 of file ofdm-phy.cc.

References NS_FATAL_ERROR, ns3::WIFI_CODE_RATE_1_2, ns3::WIFI_CODE_RATE_2_3, ns3::WIFI_CODE_RATE_3_4, and ns3::WIFI_CODE_RATE_UNDEFINED.

Referenced by CalculateDataRate(), CalculatePhyRate(), and ns3::HtPhy::GetCodeRatio().

+ Here is the caller graph for this function:

◆ GetConstellationSize()

uint16_t ns3::OfdmPhy::GetConstellationSize ( const std::string & name)
static

Return the constellation size from the OFDM mode's unique name using ModulationLookupTable.

This is mainly used as a callback for WifiMode operation.

Parameters
namethe unique name of the OFDM mode
Returns
constellation size corresponding to the unique name

Definition at line 547 of file ofdm-phy.cc.

References m_ofdmModulationLookupTable.

Referenced by CreateOfdmMode(), and GetDataRate().

+ Here is the caller graph for this function:

◆ GetDataRate()

uint64_t ns3::OfdmPhy::GetDataRate ( const std::string & name,
MHz_u channelWidth )
static

Return the data rate from the OFDM mode's unique name and the supplied parameters.

This function calls CalculateDataRate and is mainly used as a callback for WifiMode operation.

Parameters
namethe unique name of the OFDM mode
channelWidththe considered channel width
Returns
the data bit rate of this signal in bps.

Definition at line 597 of file ofdm-phy.cc.

References CalculateDataRate(), GetCodeRate(), and GetConstellationSize().

Referenced by GetDataRateFromTxVector(), and GetPhyRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDataRateFromTxVector()

uint64_t ns3::OfdmPhy::GetDataRateFromTxVector ( const WifiTxVector & txVector,
uint16_t staId )
static

Return the data rate corresponding to the supplied TXVECTOR.

This function is mainly used as a callback for WifiMode operation.

Parameters
txVectorthe TXVECTOR used for the transmission
staIdthe station ID (only here to have a common signature for all callbacks)
Returns
the data bit rate in bps.

Definition at line 591 of file ofdm-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), GetDataRate(), ns3::WifiTxVector::GetMode(), and ns3::WifiMode::GetUniqueName().

Referenced by CreateOfdmMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDuration()

Time ns3::OfdmPhy::GetDuration ( WifiPpduField field,
const WifiTxVector & txVector ) const
overridevirtual

Get the duration of the PPDU field (or group of fields) used by this entity for the given transmission parameters.

Parameters
fieldthe PPDU field (or group of fields)
txVectorthe transmission parameters
Returns
the duration of the PPDU field

Reimplemented from ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 183 of file ofdm-phy.cc.

References ns3::PhyEntity::GetDuration(), GetHeaderDuration(), GetPreambleDuration(), ns3::WIFI_PPDU_FIELD_NON_HT_HEADER, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by ns3::HtPhy::GetDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeaderDuration()

Time ns3::OfdmPhy::GetHeaderDuration ( const WifiTxVector & txVector) const
protectedvirtual
Parameters
txVectorthe transmission parameters
Returns
the duration of the SIGNAL field

Reimplemented in ns3::ErpOfdmPhy.

Definition at line 221 of file ofdm-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), and ns3::MicroSeconds().

Referenced by GetDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeaderMode()

WifiMode ns3::OfdmPhy::GetHeaderMode ( const WifiTxVector & txVector) const
protectedvirtual
Parameters
txVectorthe transmission parameters
Returns
the WifiMode used for the SIGNAL field

Reimplemented in ns3::ErpOfdmPhy.

Definition at line 158 of file ofdm-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), GetOfdmRate1_5MbpsBW5MHz(), GetOfdmRate3MbpsBW10MHz(), and GetOfdmRate6Mbps().

Referenced by GetSigMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMaxPsduSize()

uint32_t ns3::OfdmPhy::GetMaxPsduSize ( ) const
overrideprotectedvirtual

Get the maximum PSDU size in bytes.

Returns
the maximum PSDU size in bytes

Implements ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 652 of file ofdm-phy.cc.

◆ GetMeasurementChannelWidth()

MHz_u ns3::OfdmPhy::GetMeasurementChannelWidth ( const Ptr< const WifiPpdu > ppdu) const
overrideprotectedvirtual

Return the channel width used to measure the RSSI.

Parameters
ppduthe PPDU that is being received
Returns
the channel width used for RSSI measurement

Implements ns3::PhyEntity.

Definition at line 658 of file ofdm-phy.cc.

References ns3::WifiPhy::GetChannelWidth(), ns3::PhyEntity::GetRxChannelWidth(), and ns3::PhyEntity::m_wifiPhy.

Referenced by ns3::HePhy::GetMeasurementChannelWidth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNumberServiceBits()

uint8_t ns3::OfdmPhy::GetNumberServiceBits ( ) const
protected
Returns
the number of service bits

Definition at line 273 of file ofdm-phy.cc.

Referenced by ns3::HtPhy::GetPayloadDuration(), and GetPayloadDuration().

+ Here is the caller graph for this function:

◆ GetOfdmRate()

WifiMode ns3::OfdmPhy::GetOfdmRate ( uint64_t rate,
MHz_u bw = 20 )
static

Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20, 10, or 5 MHz).

Parameters
ratethe rate in bps
bwthe bandwidth
Returns
a WifiMode for OFDM

Definition at line 404 of file ofdm-phy.cc.

References GetOfdmRate12Mbps(), GetOfdmRate12MbpsBW10MHz(), GetOfdmRate12MbpsBW5MHz(), GetOfdmRate13_5MbpsBW5MHz(), GetOfdmRate18Mbps(), GetOfdmRate18MbpsBW10MHz(), GetOfdmRate1_5MbpsBW5MHz(), GetOfdmRate24Mbps(), GetOfdmRate24MbpsBW10MHz(), GetOfdmRate27MbpsBW10MHz(), GetOfdmRate2_25MbpsBW5MHz(), GetOfdmRate36Mbps(), GetOfdmRate3MbpsBW10MHz(), GetOfdmRate3MbpsBW5MHz(), GetOfdmRate48Mbps(), GetOfdmRate4_5MbpsBW10MHz(), GetOfdmRate4_5MbpsBW5MHz(), GetOfdmRate54Mbps(), GetOfdmRate6Mbps(), GetOfdmRate6MbpsBW10MHz(), GetOfdmRate6MbpsBW5MHz(), GetOfdmRate9Mbps(), GetOfdmRate9MbpsBW10MHz(), GetOfdmRate9MbpsBW5MHz(), and NS_ABORT_MSG.

Referenced by OfdmPhy(), ns3::WifiRemoteStationManager::AdjustTxVectorForIcf(), PhyHeaderSectionsTest::DoRun(), InitializeModes(), and ns3::OfdmPpdu::SetTxVectorFromLSigHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOfdmRate12Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate12Mbps ( )
static

Return a WifiMode for OFDM at 12Mbps.

Returns
a WifiMode for OFDM at 12 Mbps

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate12MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate12MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate12MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate12MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate13_5MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate13_5MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate18Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate18Mbps ( )
static

Return a WifiMode for OFDM at 18 Mbps.

Returns
a WifiMode for OFDM at 18 Mbps

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate18MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate18MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate1_5MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate1_5MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing

Referenced by GetHeaderMode(), and GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate24Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate24Mbps ( )
static

Return a WifiMode for OFDM at 24 Mbps.

Returns
a WifiMode for OFDM at 24 Mbps

Referenced by GetOfdmRate(), and TestNonHtDuplicatePhyReception::SendNonHtDuplicatePpdu().

+ Here is the caller graph for this function:

◆ GetOfdmRate24MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate24MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate27MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate27MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate2_25MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate2_25MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate36Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate36Mbps ( )
static

Return a WifiMode for OFDM at 36 Mbps.

Returns
a WifiMode for OFDM at 36 Mbps

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate3MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate3MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing

Referenced by GetHeaderMode(), and GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate3MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate3MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate48Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate48Mbps ( )
static

Return a WifiMode for OFDM at 48 Mbps.

Returns
a WifiMode for OFDM at 48 Mbps

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate4_5MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate4_5MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate4_5MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate4_5MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate54Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate54Mbps ( )
static

Return a WifiMode for OFDM at 54 Mbps.

Returns
a WifiMode for OFDM at 54 Mbps

Referenced by TxDurationTest::DoRun(), GetOfdmRate(), and TestMultipleCtsResponsesFromMuRts::TxNonHtDuplicateCts().

+ Here is the caller graph for this function:

◆ GetOfdmRate6Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate6Mbps ( )
static

Return a WifiMode for OFDM at 6 Mbps.

Returns
a WifiMode for OFDM at 6 Mbps

Referenced by WifiPhyCcaThresholdsTest::CreateDummyNonHtPpdu(), PhyHeaderSectionsTest::DoRun(), WifiPrimaryChannelsTest::DoSetup(), GetHeaderMode(), ns3::HtPhy::GetLSigMode(), GetOfdmRate(), SpectrumWifiPhyBasicTest::MakeSignal(), and WifiPhyThresholdsTest::MakeWifiSignal().

+ Here is the caller graph for this function:

◆ GetOfdmRate6MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate6MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate6MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate6MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate9Mbps()

static WifiMode ns3::OfdmPhy::GetOfdmRate9Mbps ( )
static

Return a WifiMode for OFDM at 9 Mbps.

Returns
a WifiMode for OFDM at 9 Mbps

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate9MbpsBW10MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate9MbpsBW10MHz ( )
static

Return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing.

Returns
a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetOfdmRate9MbpsBW5MHz()

static WifiMode ns3::OfdmPhy::GetOfdmRate9MbpsBW5MHz ( )
static

Return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing.

Returns
a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing

Referenced by GetOfdmRate().

+ Here is the caller graph for this function:

◆ GetPayloadDuration()

Time ns3::OfdmPhy::GetPayloadDuration ( uint32_t size,
const WifiTxVector & txVector,
WifiPhyBand band,
MpduType mpdutype,
bool incFlag,
uint32_t & totalAmpduSize,
double & totalAmpduNumSymbols,
uint16_t staId ) const
overridevirtual
Parameters
sizethe number of bytes in the packet to send
txVectorthe TXVECTOR used for the transmission of this packet
bandthe frequency band
mpdutypethe type of the MPDU as defined in WifiPhy::MpduType.
incFlagthis flag is used to indicate that the variables need to be update or not This function is called a couple of times for the same packet so variables should not be increased each time.
totalAmpduSizethe total size of the previously transmitted MPDUs for the concerned A-MPDU. If incFlag is set, this parameter will be updated.
totalAmpduNumSymbolsthe number of symbols previously transmitted for the MPDUs in the concerned A-MPDU, used for the computation of the number of symbols needed for the last MPDU. If incFlag is set, this parameter will be updated.
staIdthe STA-ID of the PSDU (only used for MU PPDUs)
Returns
the duration of the PSDU

Implements ns3::PhyEntity.

Definition at line 245 of file ofdm-phy.cc.

References ns3::FemtoSeconds(), ns3::WifiMode::GetDataRate(), ns3::Time::GetFemtoSeconds(), ns3::WifiTxVector::GetMode(), ns3::Time::GetNanoSeconds(), GetNumberServiceBits(), GetSignalExtension(), and ns3::MicroSeconds().

+ Here is the call graph for this function:

◆ GetPhyRate()

uint64_t ns3::OfdmPhy::GetPhyRate ( const std::string & name,
MHz_u channelWidth )
static

Return the PHY rate from the OFDM mode's unique name and the supplied parameters.

This function calls CalculatePhyRate and is mainly used as a callback for WifiMode operation.

Parameters
namethe unique name of the OFDM mode
channelWidththe considered channel width
Returns
the physical bit rate of this signal in bps.

Definition at line 553 of file ofdm-phy.cc.

References CalculatePhyRate(), GetCodeRate(), and GetDataRate().

Referenced by GetPhyRateFromTxVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPhyRateFromTxVector()

uint64_t ns3::OfdmPhy::GetPhyRateFromTxVector ( const WifiTxVector & txVector,
uint16_t staId )
static

Return the PHY rate corresponding to the supplied TXVECTOR.

This function is mainly used as a callback for WifiMode operation.

Parameters
txVectorthe TXVECTOR used for the transmission
staIdthe station ID (only here to have a common signature for all callbacks)
Returns
the physical bit rate of this signal in bps.

Definition at line 567 of file ofdm-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetMode(), GetPhyRate(), and ns3::WifiMode::GetUniqueName().

Referenced by CreateOfdmMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPpduFormats()

const PhyEntity::PpduFormats & ns3::OfdmPhy::GetPpduFormats ( ) const
overridevirtual

Return the PPDU formats of the PHY.

Returns
the PPDU formats of the PHY

Implements ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 177 of file ofdm-phy.cc.

References m_ofdmPpduFormats.

◆ GetPreambleDuration()

Time ns3::OfdmPhy::GetPreambleDuration ( const WifiTxVector & txVector) const
protectedvirtual
Parameters
txVectorthe transmission parameters
Returns
the duration of the preamble field
See also
WIFI_PPDU_FIELD_PREAMBLE

Reimplemented in ns3::ErpOfdmPhy.

Definition at line 197 of file ofdm-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), and ns3::MicroSeconds().

Referenced by GetDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRxPpduFromTxPpdu()

Ptr< const WifiPpdu > ns3::OfdmPhy::GetRxPpduFromTxPpdu ( Ptr< const WifiPpdu > ppdu)
overridevirtual

The WifiPpdu from the TX PHY is received by each RX PHY attached to the same channel.

By default and for performance reasons, all RX PHYs will work on the same WifiPpdu instance from TX instead of a copy of it. Child classes can change that behavior and do a copy and/or change the content of the parameters stored in WifiPpdu.

Parameters
ppduthe WifiPpdu transmitted by the TX PHY
Returns
the WifiPpdu to be used by the RX PHY

Reimplemented from ns3::PhyEntity.

Definition at line 681 of file ofdm-phy.cc.

References ns3::WifiPhy::GetChannelWidth(), ns3::PhyEntity::GetRxPpduFromTxPpdu(), and ns3::PhyEntity::m_wifiPhy.

Referenced by ns3::HePhy::GetRxPpduFromTxPpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSigMode()

WifiMode ns3::OfdmPhy::GetSigMode ( WifiPpduField field,
const WifiTxVector & txVector ) const
overridevirtual

Get the WifiMode for the SIG field specified by the PPDU field.

Parameters
fieldthe PPDU field
txVectorthe transmission parameters
Returns
the WifiMode used for the SIG field

Reimplemented from ns3::PhyEntity.

Reimplemented in ns3::VhtPhy.

Definition at line 144 of file ofdm-phy.cc.

References GetHeaderMode(), ns3::PhyEntity::GetSigMode(), ns3::WIFI_PPDU_FIELD_NON_HT_HEADER, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by ns3::HtPhy::GetSigMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSignalExtension()

Time ns3::OfdmPhy::GetSignalExtension ( WifiPhyBand band) const
protected
Parameters
bandthe frequency band being used
Returns
the signal extension duration

Definition at line 279 of file ofdm-phy.cc.

References ns3::MicroSeconds(), and ns3::WIFI_PHY_BAND_2_4GHZ.

Referenced by ns3::HtPhy::GetPayloadDuration(), and GetPayloadDuration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSymbolDuration()

Time ns3::OfdmPhy::GetSymbolDuration ( MHz_u channelWidth)
staticprotected
Parameters
channelWidththe channel width
Returns
the symbol duration

Definition at line 630 of file ofdm-phy.cc.

References ns3::MicroSeconds().

Referenced by CalculateDataRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::OfdmPhy::GetTxPowerSpectralDensity ( Watt_u txPower,
Ptr< const WifiPpdu > ppdu ) const
overrideprotectedvirtual
Parameters
txPowerpower to spread across the bands
ppduthe PPDU that will be transmitted
Returns
Pointer to SpectrumValue

This is a helper function to create the right TX PSD corresponding to the amendment of this PHY.

Implements ns3::PhyEntity.

Definition at line 357 of file ofdm-phy.cc.

References ns3::WifiSpectrumValueHelper::CreateDuplicated20MhzTxPowerSpectralDensity(), ns3::WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity(), ns3::PhyEntity::GetGuardBandwidth(), ns3::PhyEntity::GetTxMaskRejectionParams(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetUsableSubcarriers()

uint16_t ns3::OfdmPhy::GetUsableSubcarriers ( )
staticprotected
Returns
the number of usable subcarriers for data

Definition at line 624 of file ofdm-phy.cc.

Referenced by CalculateDataRate(), ns3::EhtPhy::GetDataRate(), ns3::HePhy::GetDataRate(), ns3::HtPhy::GetDataRate(), ns3::VhtPhy::GetDataRate(), and ns3::VhtPhy::GetUsableSubcarriers().

+ Here is the caller graph for this function:

◆ InitializeModes()

void ns3::OfdmPhy::InitializeModes ( )
static

Initialize all OFDM modes (for all variants).

Definition at line 392 of file ofdm-phy.cc.

References GetOfdmRate(), and ns3::GetOfdmRatesBpsList().

Referenced by anonymous_namespace{ofdm-phy.cc}::ConstructorOfdm::ConstructorOfdm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsAllConfigSupported()

bool ns3::OfdmPhy::IsAllConfigSupported ( WifiPpduField field,
Ptr< const WifiPpdu > ppdu ) const
protectedvirtual

Checks if the signaled configuration (including bandwidth) is supported by the PHY.

Parameters
fieldthe current PPDU field (SIG used for checking config)
ppduthe received PPDU
Returns
true if supported, false otherwise

Reimplemented in ns3::HtPhy, and ns3::VhtPhy.

Definition at line 347 of file ofdm-phy.cc.

References IsChannelWidthSupported(), and ns3::PhyEntity::IsConfigSupported().

Referenced by EndReceiveHeader(), and ns3::HtPhy::IsAllConfigSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsAllowed()

bool ns3::OfdmPhy::IsAllowed ( const WifiTxVector & txVector)
static

Check whether the combination in TXVECTOR is allowed.

This function is used as a callback for WifiMode operation.

Parameters
txVectorthe TXVECTOR
Returns
true if this combination is allowed, false otherwise.

Definition at line 646 of file ofdm-phy.cc.

Referenced by CreateOfdmMode().

+ Here is the caller graph for this function:

◆ IsChannelWidthSupported()

bool ns3::OfdmPhy::IsChannelWidthSupported ( Ptr< const WifiPpdu > ppdu) const
protectedvirtual

Checks if the PPDU's bandwidth is supported by the PHY.

Parameters
ppduthe received PPDU
Returns
true if supported, false otherwise

Definition at line 334 of file ofdm-phy.cc.

References ns3::WifiPhy::GetChannelWidth(), ns3::PhyEntity::m_wifiPhy, and NS_LOG_DEBUG.

Referenced by IsAllConfigSupported(), and ns3::VhtPhy::IsAllConfigSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ofdmModulationLookupTable

const PhyEntity::ModulationLookupTable ns3::OfdmPhy::m_ofdmModulationLookupTable
staticprivate
Initial value:
{
{ "OfdmRate6Mbps", { WIFI_CODE_RATE_1_2, 2 } },
{ "OfdmRate9Mbps", { WIFI_CODE_RATE_3_4, 2 } },
{ "OfdmRate12Mbps", { WIFI_CODE_RATE_1_2, 4 } },
{ "OfdmRate18Mbps", { WIFI_CODE_RATE_3_4, 4 } },
{ "OfdmRate24Mbps", { WIFI_CODE_RATE_1_2, 16 } },
{ "OfdmRate36Mbps", { WIFI_CODE_RATE_3_4, 16 } },
{ "OfdmRate48Mbps", { WIFI_CODE_RATE_2_3, 64 } },
{ "OfdmRate54Mbps", { WIFI_CODE_RATE_3_4, 64 } },
{ "OfdmRate3MbpsBW10MHz", { WIFI_CODE_RATE_1_2, 2 } },
{ "OfdmRate4_5MbpsBW10MHz", { WIFI_CODE_RATE_3_4, 2 } },
{ "OfdmRate6MbpsBW10MHz", { WIFI_CODE_RATE_1_2, 4 } },
{ "OfdmRate9MbpsBW10MHz", { WIFI_CODE_RATE_3_4, 4 } },
{ "OfdmRate12MbpsBW10MHz", { WIFI_CODE_RATE_1_2, 16 } },
{ "OfdmRate18MbpsBW10MHz", { WIFI_CODE_RATE_3_4, 16 } },
{ "OfdmRate24MbpsBW10MHz", { WIFI_CODE_RATE_2_3, 64 } },
{ "OfdmRate27MbpsBW10MHz", { WIFI_CODE_RATE_3_4, 64 } },
{ "OfdmRate1_5MbpsBW5MHz", { WIFI_CODE_RATE_1_2, 2 } },
{ "OfdmRate2_25MbpsBW5MHz", { WIFI_CODE_RATE_3_4, 2 } },
{ "OfdmRate3MbpsBW5MHz", { WIFI_CODE_RATE_1_2, 4 } },
{ "OfdmRate4_5MbpsBW5MHz", { WIFI_CODE_RATE_3_4, 4 } },
{ "OfdmRate6MbpsBW5MHz", { WIFI_CODE_RATE_1_2, 16 } },
{ "OfdmRate9MbpsBW5MHz", { WIFI_CODE_RATE_3_4, 16 } },
{ "OfdmRate12MbpsBW5MHz", { WIFI_CODE_RATE_2_3, 64 } },
{ "OfdmRate13_5MbpsBW5MHz", { WIFI_CODE_RATE_3_4, 64 } }
}
@ WIFI_CODE_RATE_2_3
2/3 coding rate
@ WIFI_CODE_RATE_1_2
1/2 coding rate
@ WIFI_CODE_RATE_3_4
3/4 coding rate

lookup table to retrieve code rate and constellation size corresponding to a unique name of modulation

Definition at line 444 of file ofdm-phy.h.

Referenced by CreateOfdmMode(), GetCodeRate(), and GetConstellationSize().

◆ m_ofdmPpduFormats

const PhyEntity::PpduFormats ns3::OfdmPhy::m_ofdmPpduFormats
staticprivate
Initial value:
{
}
@ WIFI_PREAMBLE_LONG
@ WIFI_PPDU_FIELD_NON_HT_HEADER
PHY header field for DSSS or ERP, short PHY header field for HR/DSSS or ERP, field not present for HT...
@ WIFI_PPDU_FIELD_PREAMBLE
SYNC + SFD fields for DSSS or ERP, shortSYNC + shortSFD fields for HR/DSSS or ERP,...
@ WIFI_PPDU_FIELD_DATA
data field

OFDM PPDU formats.

Definition at line 441 of file ofdm-phy.h.

Referenced by GetPpduFormats().


The documentation for this class was generated from the following files: