A Discrete-Event Network Simulator
API
ns3::ErpOfdmPhy Class Reference

PHY entity for ERP-OFDM (11g)ERP-OFDM PHY is based on OFDM PHY. More...

#include "erp-ofdm-phy.h"

+ Inheritance diagram for ns3::ErpOfdmPhy:
+ Collaboration diagram for ns3::ErpOfdmPhy:

Public Member Functions

 ErpOfdmPhy ()
 Constructor for ERP-OFDM PHY. More...
 
virtual ~ErpOfdmPhy ()
 Destructor for ERP-OFDM PHY. More...
 
Ptr< WifiPpduBuildPpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
 Build amendment-specific PPDU. More...
 
uint32_t GetMaxPsduSize (void) const override
 Get the maximum PSDU size in bytes. More...
 
- Public Member Functions inherited from ns3::OfdmPhy
 OfdmPhy (OfdmPhyVariant variant=OFDM_PHY_DEFAULT, bool buildModeList=true)
 Constructor for OFDM PHY. More...
 
virtual ~OfdmPhy ()
 Destructor for OFDM PHY. More...
 
Ptr< WifiPpduBuildPpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
 Build amendment-specific PPDU. More...
 
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. More...
 
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 (void) const override
 Return the PPDU formats of the PHY. More...
 
WifiMode GetSigMode (WifiPpduField field, const WifiTxVector &txVector) const override
 Get the WifiMode for the SIG field specified by the PPDU field. More...
 
- Public Member Functions inherited from ns3::PhyEntity
virtual ~PhyEntity ()
 Destructor for PHY entity. More...
 
std::list< WifiMode >::const_iterator begin (void) const
 Return a const iterator to the first WifiMode. More...
 
Time CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector) const
 
virtual Time CalculateTxDuration (WifiConstPsduMap psduMap, const WifiTxVector &txVector, WifiPhyBand band) const
 
virtual void CancelAllEvents (void)
 Cancel and clear all running events. More...
 
void CancelRunningEndPreambleDetectionEvents (bool clear=false)
 Cancel and eventually clear all end preamble detection events. More...
 
std::list< WifiMode >::const_iterator end (void) const
 Return a const iterator to past-the-last WifiMode. More...
 
void EndReceiveField (WifiPpduField field, Ptr< Event > event)
 End receiving a given field. More...
 
void EndReceivePayload (Ptr< Event > event)
 The last symbol of the PPDU has arrived. More...
 
virtual Ptr< const WifiPsduGetAddressedPsduInPpdu (Ptr< const WifiPpdu > ppdu) const
 Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU). More...
 
Time GetDurationUpToField (WifiPpduField field, const WifiTxVector &txVector) const
 Get the duration of the PPDU up to (but excluding) the given field. More...
 
virtual WifiMode GetMcs (uint8_t index) const
 Get the WifiMode corresponding to the given MCS index. More...
 
virtual uint16_t GetMeasurementChannelWidth (const Ptr< const WifiPpdu > ppdu) const
 Return the channel width used to measure the RSSI. More...
 
WifiPpduField GetNextField (WifiPpduField currentField, WifiPreamble preamble) const
 Return the field following the provided one. More...
 
virtual uint8_t GetNumModes (void) const
 
PhyHeaderSections GetPhyHeaderSections (const WifiTxVector &txVector, Time ppduStart) const
 Return a map of PHY header chunk information per PPDU field. More...
 
Time GetRemainingDurationAfterField (Ptr< const WifiPpdu > ppdu, WifiPpduField field) const
 Get the remaining duration of the PPDU after the end of the given field. More...
 
virtual uint16_t GetRxChannelWidth (const WifiTxVector &txVector) const
 Return the channel width used in the reception spectrum model. More...
 
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. More...
 
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. More...
 
virtual bool HandlesMcsModes (void) const
 Check if the WifiModes handled by this PHY are MCSs. More...
 
virtual bool IsMcsSupported (uint8_t index) const
 Check if the WifiMode corresponding to the given MCS index is supported. More...
 
virtual bool IsModeSupported (WifiMode mode) const
 Check if the WifiMode is supported. More...
 
bool NoEndPreambleDetectionEvents (void) const
 
void ResetReceive (Ptr< Event > event)
 Reset PHY at the end of the PPDU under reception after it has failed the PHY header. More...
 
void SetOwner (Ptr< WifiPhy > wifiPhy)
 Set the WifiPhy owning this PHY entity. More...
 
void StartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field. More...
 
virtual void StartReceivePreamble (Ptr< WifiPpdu > ppdu, RxPowerWattPerChannelBand rxPowersW, Time rxDuration)
 Start receiving the PHY preamble of a PPDU (i.e. More...
 
virtual void StartTx (Ptr< WifiPpdu > ppdu)
 This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actions. More...
 
void Transmit (Time txDuration, Ptr< WifiPpdu > ppdu, std::string type)
 This function prepares most of the WifiSpectrumSignalParameters parameters and invokes SpectrumWifiPhy's Transmit method. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< PhyEntity >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Static Public Member Functions

static WifiCodeRate GetCodeRate (const std::string &name)
 Return the WifiCodeRate from the ERP-OFDM mode's unique name using ModulationLookupTable. More...
 
static uint16_t GetConstellationSize (const std::string &name)
 Return the constellation size from the ERP-OFDM mode's unique name using ModulationLookupTable. More...
 
static uint64_t GetDataRate (const std::string &name, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
 Return the data rate from the ERP-OFDM mode's unique name and the supplied parameters. More...
 
static uint64_t GetDataRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the data rate corresponding to the supplied TXVECTOR. More...
 
static WifiMode GetErpOfdmRate (uint64_t rate)
 Return a WifiMode for ERP-OFDM corresponding to the provided rate. More...
 
static WifiMode GetErpOfdmRate12Mbps (void)
 Return a WifiMode for ERP-OFDM at 12 Mbps. More...
 
static WifiMode GetErpOfdmRate18Mbps (void)
 Return a WifiMode for ERP-OFDM at 18 Mbps. More...
 
static WifiMode GetErpOfdmRate24Mbps (void)
 Return a WifiMode for ERP-OFDM at 24 Mbps. More...
 
static WifiMode GetErpOfdmRate36Mbps (void)
 Return a WifiMode for ERP-OFDM at 36 Mbps. More...
 
static WifiMode GetErpOfdmRate48Mbps (void)
 Return a WifiMode for ERP-OFDM at 48 Mbps. More...
 
static WifiMode GetErpOfdmRate54Mbps (void)
 Return a WifiMode for ERP-OFDM at 54 Mbps. More...
 
static WifiMode GetErpOfdmRate6Mbps (void)
 Return a WifiMode for ERP-OFDM at 6 Mbps. More...
 
static WifiMode GetErpOfdmRate9Mbps (void)
 Return a WifiMode for ERP-OFDM at 9 Mbps. More...
 
static uint64_t GetPhyRate (const std::string &name, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
 Return the PHY rate from the ERP-OFDM mode's unique name and the supplied parameters. More...
 
static uint64_t GetPhyRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the PHY rate corresponding to the supplied TXVECTOR. More...
 
static void InitializeModes (void)
 Initialize all ERP-OFDM modes. More...
 
static bool IsModeAllowed (uint16_t channelWidth, uint8_t nss)
 Check whether the combination of <WifiMode, channel width, NSS> is allowed. More...
 
- Static Public Member Functions inherited from ns3::OfdmPhy
static WifiCodeRate GetCodeRate (const std::string &name)
 Return the WifiCodeRate from the OFDM mode's unique name using ModulationLookupTable. More...
 
static uint16_t GetConstellationSize (const std::string &name)
 Return the constellation size from the OFDM mode's unique name using ModulationLookupTable. More...
 
static uint64_t GetDataRate (const std::string &name, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
 Return the data rate from the OFDM mode's unique name and the supplied parameters. More...
 
static uint64_t GetDataRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the data rate corresponding to the supplied TXVECTOR. More...
 
static WifiMode GetOfdmRate (uint64_t rate, uint16_t bw=20)
 Return a WifiMode for OFDM corresponding to the provided rate and the channel bandwidth (20, 10, or 5 MHz). More...
 
static WifiMode GetOfdmRate12Mbps (void)
 Return a WifiMode for OFDM at 12Mbps. More...
 
static WifiMode GetOfdmRate12MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 12 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate12MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 12 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate13_5MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 13.5 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate18Mbps (void)
 Return a WifiMode for OFDM at 18 Mbps. More...
 
static WifiMode GetOfdmRate18MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 18 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate1_5MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 1.5 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate24Mbps (void)
 Return a WifiMode for OFDM at 24 Mbps. More...
 
static WifiMode GetOfdmRate24MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 24 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate27MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 27 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate2_25MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 2.25 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate36Mbps (void)
 Return a WifiMode for OFDM at 36 Mbps. More...
 
static WifiMode GetOfdmRate3MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 3 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate3MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 3 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate48Mbps (void)
 Return a WifiMode for OFDM at 48 Mbps. More...
 
static WifiMode GetOfdmRate4_5MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 4.5 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate4_5MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 4.5 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate54Mbps (void)
 Return a WifiMode for OFDM at 54 Mbps. More...
 
static WifiMode GetOfdmRate6Mbps (void)
 Return a WifiMode for OFDM at 6 Mbps. More...
 
static WifiMode GetOfdmRate6MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 6 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate6MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 6 Mbps with 5 MHz channel spacing. More...
 
static WifiMode GetOfdmRate9Mbps (void)
 Return a WifiMode for OFDM at 9 Mbps. More...
 
static WifiMode GetOfdmRate9MbpsBW10MHz (void)
 Return a WifiMode for OFDM at 9 Mbps with 10 MHz channel spacing. More...
 
static WifiMode GetOfdmRate9MbpsBW5MHz (void)
 Return a WifiMode for OFDM at 9 Mbps with 5 MHz channel spacing. More...
 
static uint64_t GetPhyRate (const std::string &name, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
 Return the PHY rate from the OFDM mode's unique name and the supplied parameters. More...
 
static uint64_t GetPhyRateFromTxVector (const WifiTxVector &txVector, uint16_t staId)
 Return the PHY rate corresponding to the supplied TXVECTOR. More...
 
static void InitializeModes (void)
 Initialize all OFDM modes (for all variants). More...
 
static bool IsModeAllowed (uint16_t channelWidth, uint8_t nss)
 Check whether the combination of <WifiMode, channel width, NSS> is allowed. More...
 

Private Member Functions

Time GetHeaderDuration (const WifiTxVector &txVector) const override
 
WifiMode GetHeaderMode (const WifiTxVector &txVector) const override
 
Time GetPreambleDuration (const WifiTxVector &txVector) const override
 

Static Private Member Functions

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

Static Private Attributes

static const ModulationLookupTable m_erpOfdmModulationLookupTable
 lookup table to retrieve code rate and constellation size corresponding to a unique name of modulation More...
 

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. More...
 
typedef std::map< WifiPpduField, PhyHeaderChunkInfoPhyHeaderSections
 A map of PhyHeaderChunkInfo elements per PPDU field. More...
 
enum  PhyRxFailureAction { DROP = 0, ABORT, IGNORE }
 Action to perform in case of RX failure. More...
 
- Protected Types inherited from ns3::PhyEntity
typedef std::pair< WifiCodeRate, uint16_t > CodeRateConstellationSizePair
 A pair to hold modulation information: code rate and constellation size. More...
 
typedef std::map< std::string, CodeRateConstellationSizePairModulationLookupTable
 A modulation lookup table using unique name of modulation as key. More...
 
typedef std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
 A map of PPDU field elements per preamble type. More...
 
typedef std::pair< uint64_t, uint16_t > UidStaIdPair
 A pair of a UID and STA_ID. More...
 
- Protected Member Functions inherited from ns3::OfdmPhy
PhyFieldRxStatus DoEndReceiveField (WifiPpduField field, Ptr< Event > event) override
 End receiving a given field, perform amendment-specific actions, and provide the status of the reception. More...
 
PhyFieldRxStatus EndReceiveHeader (Ptr< Event > event)
 End receiving the header, perform OFDM-specific actions, and provide the status of the reception. More...
 
uint32_t GetMaxPsduSize (void) const override
 Get the maximum PSDU size in bytes. More...
 
uint8_t GetNumberServiceBits (void) const
 
Time GetSignalExtension (WifiPhyBand band) const
 
Ptr< SpectrumValueGetTxPowerSpectralDensity (double txPowerW, 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. More...
 
virtual bool IsChannelWidthSupported (Ptr< const WifiPpdu > ppdu) const
 Checks if the PPDU's bandwidth is supported by the PHY. More...
 
- Protected Member Functions inherited from ns3::PhyEntity
void AbortCurrentReception (WifiPhyRxfailureReason reason)
 Abort the current reception. More...
 
void AddPreambleEvent (Ptr< Event > event)
 Add an entry to the map of current preamble events (stored in WifiPhy). More...
 
Ptr< EventCreateInterferenceEvent (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector, Time duration, RxPowerWattPerChannelBand rxPower, bool isStartOfdmaRxing=false)
 Create an event using WifiPhy's InterferenceHelper class. More...
 
virtual void DoAbortCurrentReception (WifiPhyRxfailureReason reason)
 Perform amendment-specific actions before aborting the current reception. More...
 
virtual void DoEndReceivePayload (Ptr< const WifiPpdu > ppdu)
 Perform amendment-specific actions at the end of the reception of the payload. More...
 
virtual PhyFieldRxStatus DoEndReceivePreamble (Ptr< Event > event)
 End receiving the preamble, perform amendment-specific actions, and provide the status of the reception. More...
 
virtual Ptr< EventDoGetEvent (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand rxPowersW)
 Get the event corresponding to the incoming PPDU. More...
 
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. More...
 
virtual bool DoStartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field, perform amendment-specific actions, and signify if it is supported. More...
 
virtual void DoStartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e. More...
 
void DropPreambleEvent (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason, Time endRx, uint16_t measurementChannelWidth)
 Drop the PPDU and the corresponding preamble detection event, but keep CCA busy state after the completion of the currently processed event. More...
 
void EndOfMpdu (Ptr< Event > event, Ptr< const WifiPsdu > psdu, size_t mpduIndex, Time relativeStart, Time mpduDuration)
 The last symbol of an MPDU in an A-MPDU has arrived. More...
 
void EndPreambleDetectionPeriod (Ptr< Event > event)
 End the preamble detection period. More...
 
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. More...
 
uint16_t GetCenterFrequencyForChannelWidth (const WifiTxVector &txVector) const
 Get the center frequency of the channel corresponding the current TxVector rather than that of the supported channel width. More...
 
virtual std::pair< uint16_t, WifiSpectrumBandGetChannelWidthAndBand (const WifiTxVector &txVector, uint16_t staId) const
 Get the channel width and band to use (will be overloaded by child classes). More...
 
Ptr< const EventGetCurrentEvent (void) const
 Get the pointer to the current event (stored in WifiPhy). More...
 
const std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > & GetCurrentPreambleEvents (void) const
 Get the map of current preamble events (stored in WifiPhy). More...
 
uint16_t GetGuardBandwidth (uint16_t 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. More...
 
double GetRandomValue (void) const
 Obtain a random value from the WifiPhy's generator. More...
 
std::pair< bool, SignalNoiseDbmGetReceptionStatus (Ptr< const WifiPsdu > psdu, Ptr< Event > event, uint16_t staId, Time relativeMpduStart, Time mpduDuration)
 Get the reception status for the provided MPDU and notify. More...
 
double GetRxPowerWForPpdu (Ptr< Event > event) const
 Obtain the received power (W) for a given band. More...
 
std::tuple< double, double, double > GetTxMaskRejectionParams (void) const
 
virtual bool IsConfigSupported (Ptr< const WifiPpdu > ppdu) const
 Checks if the signaled configuration (excluding bandwidth) is supported by the PHY. More...
 
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. More...
 
virtual uint64_t ObtainNextUid (const WifiTxVector &txVector)
 Obtain the next UID for the PPDU to transmit. More...
 
void ScheduleEndOfMpdus (Ptr< Event > event)
 Schedule end of MPDUs events. More...
 
void StartPreambleDetectionPeriod (Ptr< Event > event)
 Start the preamble detection period. More...
 
void StartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e. More...
 
void UpdateInterferenceEvent (Ptr< Event > event, RxPowerWattPerChannelBand rxPower)
 Update an event in WifiPhy's InterferenceHelper class. More...
 
- Static Protected Member Functions inherited from ns3::OfdmPhy
static uint64_t CalculateDataRate (WifiCodeRate codeRate, uint16_t constellationSize, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
 Calculates data rate from the supplied parameters. More...
 
static uint64_t CalculateDataRate (double symbolDuration, uint16_t guardInterval, uint16_t usableSubCarriers, uint16_t numberOfBitsPerSubcarrier, double codingRate)
 Calculates data rate from the supplied parameters. More...
 
static uint64_t CalculatePhyRate (WifiCodeRate codeRate, uint64_t dataRate)
 Calculate the PHY rate in bps from code rate and data rate. More...
 
static double GetCodeRatio (WifiCodeRate codeRate)
 Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5. More...
 
- Protected Attributes inherited from ns3::PhyEntity
std::vector< EventIdm_endOfMpduEvents
 the end of MPDU events (only used for A-MPDUs) More...
 
std::vector< EventIdm_endPreambleDetectionEvents
 the end of preamble detection events More...
 
std::vector< EventIdm_endRxPayloadEvents
 the end of receive events (only one unless UL MU reception) More...
 
std::list< WifiModem_modeList
 the list of supported modes More...
 
std::map< UidStaIdPair, SignalNoiseDbmm_signalNoiseMap
 Map of the latest signal power and noise power in dBm (noise power includes the noise figure) More...
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper of the WifiPhy (to make it reachable for child classes) More...
 
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. More...
 
Ptr< WifiPhym_wifiPhy
 Pointer to the owning WifiPhy. More...
 
- Static Protected Attributes inherited from ns3::PhyEntity
static uint64_t m_globalPpduUid = 0
 Global counter of the PPDU UID. More...
 

Detailed Description

PHY entity for ERP-OFDM (11g)

ERP-OFDM PHY is based on OFDM PHY.

ERP-DSSS/CCK mode is not supported.

Refer to IEEE 802.11-2016, clause 18.

Definition at line 45 of file erp-ofdm-phy.h.

Constructor & Destructor Documentation

◆ ErpOfdmPhy()

ns3::ErpOfdmPhy::ErpOfdmPhy ( )

Constructor for ERP-OFDM PHY.

Definition at line 69 of file erp-ofdm-phy.cc.

References GetErpOfdmRate(), ns3::GetErpOfdmRatesBpsList(), ns3::PhyEntity::m_modeList, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ ~ErpOfdmPhy()

ns3::ErpOfdmPhy::~ErpOfdmPhy ( )
virtual

Destructor for ERP-OFDM PHY.

Definition at line 81 of file erp-ofdm-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ BuildPpdu()

Ptr< WifiPpdu > ns3::ErpOfdmPhy::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.

Definition at line 106 of file erp-ofdm-phy.cc.

References ns3::WifiPhy::GetPhyBand(), ns3::PhyEntity::m_wifiPhy, NS_LOG_FUNCTION, and ns3::PhyEntity::ObtainNextUid().

+ Here is the call graph for this function:

◆ CreateErpOfdmMode()

WifiMode ns3::ErpOfdmPhy::CreateErpOfdmMode ( std::string  uniqueName,
bool  isMandatory 
)
staticprivate

Create an ERP-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 ERP-OFDM WifiMode

Definition at line 168 of file erp-ofdm-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), GetCodeRate(), GetConstellationSize(), GetDataRate(), GetDataRateFromTxVector(), GetPhyRate(), GetPhyRateFromTxVector(), IsModeAllowed(), m_erpOfdmModulationLookupTable, ns3::MakeBoundCallback(), ns3::MakeCallback(), NS_ASSERT_MSG, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

+ Here is the call graph for this function:

◆ GetCodeRate()

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

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

This is mainly used as a callback for WifiMode operation.

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

Definition at line 187 of file erp-ofdm-phy.cc.

References m_erpOfdmModulationLookupTable.

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

+ Here is the caller graph for this function:

◆ GetConstellationSize()

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

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

This is mainly used as a callback for WifiMode operation.

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

Definition at line 193 of file erp-ofdm-phy.cc.

References m_erpOfdmModulationLookupTable.

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

+ Here is the caller graph for this function:

◆ GetDataRate()

uint64_t ns3::ErpOfdmPhy::GetDataRate ( const std::string &  name,
uint16_t  channelWidth,
uint16_t  guardInterval,
uint8_t  nss 
)
static

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

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

Parameters
namethe unique name of the ERP-OFDM mode
channelWidththe considered channel width in MHz
guardIntervalthe considered guard interval duration in nanoseconds
nssthe considered number of streams
Returns
the data bit rate of this signal in bps.

Definition at line 226 of file erp-ofdm-phy.cc.

References ns3::OfdmPhy::CalculateDataRate(), GetCodeRate(), and GetConstellationSize().

Referenced by CreateErpOfdmMode(), and GetDataRateFromTxVector().

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

◆ GetDataRateFromTxVector()

uint64_t ns3::ErpOfdmPhy::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 217 of file erp-ofdm-phy.cc.

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

Referenced by CreateErpOfdmMode().

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

◆ GetErpOfdmRate()

WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate ( uint64_t  rate)
static

Return a WifiMode for ERP-OFDM corresponding to the provided rate.

Parameters
ratethe rate in bps
Returns
a WifiMode for ERP-OFDM

Definition at line 123 of file erp-ofdm-phy.cc.

References GetErpOfdmRate12Mbps(), GetErpOfdmRate18Mbps(), GetErpOfdmRate24Mbps(), GetErpOfdmRate36Mbps(), GetErpOfdmRate48Mbps(), GetErpOfdmRate54Mbps(), GetErpOfdmRate6Mbps(), GetErpOfdmRate9Mbps(), and NS_ABORT_MSG.

Referenced by ns3::ErpOfdmPpdu::DoGetTxVector(), ErpOfdmPhy(), and InitializeModes().

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

◆ GetErpOfdmRate12Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate12Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 12 Mbps.

Returns
a WifiMode for ERP-OFDM at 12 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate18Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate18Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 18 Mbps.

Returns
a WifiMode for ERP-OFDM at 18 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate24Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate24Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 24 Mbps.

Returns
a WifiMode for ERP-OFDM at 24 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate36Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate36Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 36 Mbps.

Returns
a WifiMode for ERP-OFDM at 36 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate48Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate48Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 48 Mbps.

Returns
a WifiMode for ERP-OFDM at 48 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate54Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate54Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 54 Mbps.

Returns
a WifiMode for ERP-OFDM at 54 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate6Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate6Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 6 Mbps.

Returns
a WifiMode for ERP-OFDM at 6 Mbps

Referenced by GetErpOfdmRate(), and GetHeaderMode().

+ Here is the caller graph for this function:

◆ GetErpOfdmRate9Mbps()

static WifiMode ns3::ErpOfdmPhy::GetErpOfdmRate9Mbps ( void  )
static

Return a WifiMode for ERP-OFDM at 9 Mbps.

Returns
a WifiMode for ERP-OFDM at 9 Mbps

Referenced by GetErpOfdmRate().

+ Here is the caller graph for this function:

◆ GetHeaderDuration()

Time ns3::ErpOfdmPhy::GetHeaderDuration ( const WifiTxVector txVector) const
overrideprivatevirtual
Parameters
txVectorthe transmission parameters
Returns
the duration of the SIGNAL field

Reimplemented from ns3::OfdmPhy.

Definition at line 100 of file erp-ofdm-phy.cc.

References ns3::MicroSeconds().

+ Here is the call graph for this function:

◆ GetHeaderMode()

WifiMode ns3::ErpOfdmPhy::GetHeaderMode ( const WifiTxVector txVector) const
overrideprivatevirtual
Parameters
txVectorthe transmission parameters
Returns
the WifiMode used for the SIGNAL field

Reimplemented from ns3::OfdmPhy.

Definition at line 87 of file erp-ofdm-phy.cc.

References GetErpOfdmRate6Mbps(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), NS_ASSERT, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

+ Here is the call graph for this function:

◆ GetMaxPsduSize()

uint32_t ns3::ErpOfdmPhy::GetMaxPsduSize ( void  ) const
overridevirtual

Get the maximum PSDU size in bytes.

Returns
the maximum PSDU size in bytes

Implements ns3::PhyEntity.

Definition at line 240 of file erp-ofdm-phy.cc.

◆ GetPhyRate()

uint64_t ns3::ErpOfdmPhy::GetPhyRate ( const std::string &  name,
uint16_t  channelWidth,
uint16_t  guardInterval,
uint8_t  nss 
)
static

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

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

Parameters
namethe unique name of the ERP-OFDM mode
channelWidththe considered channel width in MHz
guardIntervalthe considered guard interval duration in nanoseconds
nssthe considered number of streams
Returns
the physical bit rate of this signal in bps.

Definition at line 199 of file erp-ofdm-phy.cc.

References ns3::OfdmPhy::CalculateDataRate(), ns3::OfdmPhy::CalculatePhyRate(), GetCodeRate(), and GetConstellationSize().

Referenced by CreateErpOfdmMode(), and GetPhyRateFromTxVector().

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

◆ GetPhyRateFromTxVector()

uint64_t ns3::ErpOfdmPhy::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 208 of file erp-ofdm-phy.cc.

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

Referenced by CreateErpOfdmMode().

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

◆ GetPreambleDuration()

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

Reimplemented from ns3::OfdmPhy.

Definition at line 94 of file erp-ofdm-phy.cc.

References ns3::MicroSeconds().

+ Here is the call graph for this function:

◆ InitializeModes()

void ns3::ErpOfdmPhy::InitializeModes ( void  )
static

Initialize all ERP-OFDM modes.

Definition at line 114 of file erp-ofdm-phy.cc.

References GetErpOfdmRate(), and ns3::GetErpOfdmRatesBpsList().

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

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

◆ IsModeAllowed()

bool ns3::ErpOfdmPhy::IsModeAllowed ( uint16_t  channelWidth,
uint8_t  nss 
)
static

Check whether the combination of <WifiMode, channel width, NSS> is allowed.

This function is used as a callback for WifiMode operation, and always returns true since there is no limitation for any mode in ErpOfdmPhy.

Parameters
channelWidththe considered channel width in MHz
nssthe considered number of streams
Returns
true.

Definition at line 234 of file erp-ofdm-phy.cc.

Referenced by CreateErpOfdmMode().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_erpOfdmModulationLookupTable

const PhyEntity::ModulationLookupTable ns3::ErpOfdmPhy::m_erpOfdmModulationLookupTable
staticprivate
Initial value:
{
{ "ErpOfdmRate6Mbps", { WIFI_CODE_RATE_1_2, 2 } },
{ "ErpOfdmRate9Mbps", { WIFI_CODE_RATE_3_4, 2 } },
{ "ErpOfdmRate12Mbps", { WIFI_CODE_RATE_1_2, 4 } },
{ "ErpOfdmRate18Mbps", { WIFI_CODE_RATE_3_4, 4 } },
{ "ErpOfdmRate24Mbps", { WIFI_CODE_RATE_1_2, 16 } },
{ "ErpOfdmRate36Mbps", { WIFI_CODE_RATE_3_4, 16 } },
{ "ErpOfdmRate48Mbps", { WIFI_CODE_RATE_2_3, 64 } },
{ "ErpOfdmRate54Mbps", { WIFI_CODE_RATE_3_4, 64 } }
}

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

Definition at line 215 of file erp-ofdm-phy.h.

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


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