A Discrete-Event Network Simulator
API
ns3::WifiPhy Class Referenceabstract

802.11 PHY layer model More...

#include "wifi-phy.h"

+ Inheritance diagram for ns3::WifiPhy:
+ Collaboration diagram for ns3::WifiPhy:

Public Types

typedef std::pair< uint8_t, WifiPhyStandardChannelNumberStandardPair
 A pair of a ChannelNumber and WifiPhyStandard. More...
 
typedef void(* EndOfHePreambleCallback) (HePreambleParameters params)
 TracedCallback signature for end of HE-SIG-A events. More...
 
typedef std::pair< uint16_t, uint16_t > FrequencyWidthPair
 A pair of a center Frequency (MHz) and a ChannelWidth (MHz) More...
 
typedef void(* MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
 TracedCallback signature for monitor mode receive events. More...
 
typedef void(* MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
 TracedCallback signature for monitor mode transmit events. More...
 
typedef void(* PsduTxBeginCallback) (Ptr< const WifiPsdu > psdu, WifiTxVector txVector, double txPowerW)
 TracedCallback signature for PSDU transmit events. More...
 

Public Member Functions

 WifiPhy ()
 
virtual ~WifiPhy ()
 
void AddSupportedChannelWidth (uint16_t width)
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
double CalculateSnr (WifiTxVector txVector, double ber) const
 
virtual void ConfigureStandard (WifiPhyStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard. More...
 
void ContinueReceiveHeader (Ptr< Event > event)
 Continue receiving the PHY header of a PPDU (i.e. More...
 
bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
 Add a channel definition to the WifiPhy. More...
 
void EndReceive (Ptr< Event > event)
 The last symbol of the PPDU has arrived. More...
 
void EndReceiveInterBss (void)
 For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception. More...
 
uint8_t GetBssMembershipSelector (uint8_t selector) const
 The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More...
 
double GetCcaEdThreshold (void) const
 Return the CCA threshold (dBm). More...
 
virtual Ptr< ChannelGetChannel (void) const =0
 Return the Channel this WifiPhy is connected to. More...
 
uint8_t GetChannelNumber (void) const
 Return current channel number. More...
 
Time GetChannelSwitchDelay (void) const
 
uint16_t GetChannelWidth (void) const
 
Time GetDelayUntilIdle (void)
 
Ptr< NetDeviceGetDevice (void) const
 Return the device this PHY is associated with. More...
 
uint16_t GetFrequency (void) const
 
bool GetGreenfield (void) const
 Return whether Greenfield is supported. More...
 
Time GetGuardInterval (void) const
 
WifiMode GetHeMcs (uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the HE modulation class. More...
 
WifiMode GetHtMcs (uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the HT modulation class. More...
 
Time GetLastRxStartTime (void) const
 Return the start time of the last received packet. More...
 
uint8_t GetMaxSupportedRxSpatialStreams (void) const
 
uint8_t GetMaxSupportedTxSpatialStreams (void) const
 
WifiMode GetMcs (uint8_t mcs) const
 The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indexes that this WifiPhy(-derived class) can support - a set of MCS indexes which we call the DeviceMcsSet, and which is stored as WifiPhy::m_deviceMcsSet. More...
 
WifiMode GetMcs (WifiModulationClass modulation, uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the given modulation class. More...
 
Ptr< MobilityModelGetMobility (void) const
 Return the mobility model this PHY is associated with. More...
 
WifiMode GetMode (uint8_t mode) const
 The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. More...
 
uint8_t GetNBssMembershipSelectors (void) const
 The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. More...
 
uint8_t GetNMcs (void) const
 The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indexes that this WifiPhy(-derived class) can support - a set of MCS indexes which we call the DeviceMcsSet, and which is stored as WifiPhy::m_deviceMcsSet. More...
 
uint8_t GetNModes (void) const
 The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. More...
 
uint8_t GetNTxPower (void) const
 Return the number of available transmission power levels. More...
 
uint8_t GetNumberOfAntennas (void) const
 
double GetPowerDbm (uint8_t power) const
 Get the power of the given power level in dBm. More...
 
double GetRxGain (void) const
 Return the reception gain (dB). More...
 
double GetRxSensitivity (void) const
 Return the receive sensitivity threshold (dBm). More...
 
bool GetShortGuardInterval (void) const
 Return whether short guard interval is supported. More...
 
bool GetShortPhyPreambleSupported (void) const
 Return whether short PHY preamble is supported. More...
 
WifiPhyStandard GetStandard (void) const
 Get the configured Wi-Fi standard. More...
 
Ptr< WifiPhyStateHelperGetState (void) const
 Return the WifiPhyStateHelper of this PHY. More...
 
std::vector< uint16_t > GetSupportedChannelWidthSet (void) const
 
double GetTxGain (void) const
 Return the transmission gain (dB). More...
 
double GetTxPowerEnd (void) const
 Return the maximum available transmission power level (dBm). More...
 
double GetTxPowerForTransmission (WifiTxVector txVector) const
 Compute the transmit power (in dBm) for the next transmission. More...
 
double GetTxPowerStart (void) const
 Return the minimum available transmission power level (dBm). More...
 
WifiMode GetVhtMcs (uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the VHT modulation class. More...
 
bool IsMcsSupported (WifiMode mcs) const
 Check if the given WifiMode is supported by the PHY. More...
 
bool IsMcsSupported (WifiModulationClass mc, uint8_t mcs) const
 Check if the given MCS of the given modulation class is supported by the PHY. More...
 
bool IsModeSupported (WifiMode mode) const
 Check if the given WifiMode is supported by the PHY. More...
 
bool IsStateCcaBusy (void) const
 
bool IsStateIdle (void) const
 
bool IsStateOff (void) const
 
bool IsStateRx (void) const
 
bool IsStateSleep (void) const
 
bool IsStateSwitching (void) const
 
bool IsStateTx (void) const
 
void NotifyChannelAccessRequested (void)
 Notify the PHY that an access to the channel was requested. More...
 
void NotifyEndOfHePreamble (HePreambleParameters params)
 Public method used to fire a EndOfHePreamble trace once both HE SIG fields have been received, as well as training fields. More...
 
void NotifyMonitorSniffRx (Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector, SignalNoiseDbm signalNoise, std::vector< bool > statusPerMpdu)
 Public method used to fire a MonitorSniffer trace for a wifi PSDU being received. More...
 
void NotifyMonitorSniffTx (Ptr< const WifiPsdu > psdu, uint16_t channelFreqMhz, WifiTxVector txVector)
 Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted. More...
 
void NotifyRxBegin (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyRxBegin trace. More...
 
void NotifyRxDrop (Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason)
 Public method used to fire a PhyRxDrop trace. More...
 
void NotifyRxEnd (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyRxEnd trace. More...
 
void NotifyTxBegin (Ptr< const WifiPsdu > psdu, double txPowerW)
 Public method used to fire a PhyTxBegin trace. More...
 
void NotifyTxDrop (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyTxDrop trace. More...
 
void NotifyTxEnd (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyTxEnd trace. More...
 
void RegisterListener (WifiPhyListener *listener)
 
void ResetCca (bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0)
 Reset PHY to IDLE, with some potential TX power restrictions for the next transmission. More...
 
void ResumeFromOff (void)
 Resume from off mode. More...
 
void ResumeFromSleep (void)
 Resume from sleep mode. More...
 
void Send (Ptr< const WifiPsdu > psdu, WifiTxVector txVector)
 
void SetCapabilitiesChangedCallback (Callback< void > callback)
 
void SetCcaEdThreshold (double threshold)
 Sets the CCA threshold (dBm). More...
 
virtual void SetChannelNumber (uint8_t id)
 Set channel number. More...
 
virtual void SetChannelWidth (uint16_t channelWidth)
 
void SetDevice (const Ptr< NetDevice > device)
 Sets the device this PHY is associated with. More...
 
void SetEdThreshold (double threshold)
 Sets the energy detection threshold (dBm). More...
 
void SetErrorRateModel (const Ptr< ErrorRateModel > rate)
 Sets the error rate model. More...
 
void SetFrameCaptureModel (const Ptr< FrameCaptureModel > frameCaptureModel)
 Sets the frame capture model. More...
 
virtual void SetFrequency (uint16_t freq)
 
void SetGreenfield (bool greenfield)
 Enable or disable Greenfield support. More...
 
void SetGuardInterval (Time guardInterval)
 
void SetMaxSupportedRxSpatialStreams (uint8_t streams)
 
void SetMaxSupportedTxSpatialStreams (uint8_t streams)
 
void SetMobility (const Ptr< MobilityModel > mobility)
 assign a mobility model to this device More...
 
void SetNTxPower (uint8_t n)
 Sets the number of transmission power levels available between the minimum level and the maximum level. More...
 
void SetNumberOfAntennas (uint8_t antennas)
 
void SetOffMode (void)
 Put in off mode. More...
 
void SetPostReceptionErrorModel (const Ptr< ErrorModel > em)
 Attach a receive ErrorModel to the WifiPhy. More...
 
void SetPreambleDetectionModel (const Ptr< PreambleDetectionModel > preambleDetectionModel)
 Sets the preamble detection model. More...
 
void SetReceiveErrorCallback (RxErrorCallback callback)
 
void SetReceiveOkCallback (RxOkCallback callback)
 
void SetRxGain (double gain)
 Sets the reception gain (dB). More...
 
void SetRxNoiseFigure (double noiseFigureDb)
 Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. More...
 
void SetRxSensitivity (double threshold)
 Sets the receive sensitivity threshold (dBm). More...
 
void SetShortGuardInterval (bool shortGuardInterval)
 Enable or disable support for HT/VHT short guard interval. More...
 
void SetShortPhyPreambleSupported (bool preamble)
 Enable or disable short PHY preamble. More...
 
void SetSleepMode (void)
 Put in sleep mode. More...
 
void SetTxGain (double gain)
 Sets the transmission gain (dB). More...
 
void SetTxPowerEnd (double end)
 Sets the maximum available transmission power level (dBm). More...
 
void SetTxPowerStart (double start)
 Sets the minimum available transmission power level (dBm). More...
 
void SetWifiRadioEnergyModel (const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
 Sets the wifi radio energy model. More...
 
void StartReceiveHeader (Ptr< Event > event, Time headerPayloadDuration)
 Start receiving the PHY header of a PPDU (i.e. More...
 
void StartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e. More...
 
void StartReceivePreamble (Ptr< WifiPpdu > ppdu, double rxPowerW)
 Start receiving the PHY preamble of a PPDU (i.e. More...
 
virtual void StartTx (Ptr< WifiPpdu > ppdu)=0
 
void UnregisterListener (WifiPhyListener *listener)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 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...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static Time CalculatePhyPreambleAndHeaderDuration (WifiTxVector txVector)
 
static Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency)
 
static WifiMode GetDsssRate11Mbps ()
 Return a WifiMode for DSSS at 11Mbps. More...
 
static WifiMode GetDsssRate1Mbps ()
 Return a WifiMode for DSSS at 1Mbps. More...
 
static WifiMode GetDsssRate2Mbps ()
 Return a WifiMode for DSSS at 2Mbps. More...
 
static WifiMode GetDsssRate5_5Mbps ()
 Return a WifiMode for DSSS at 5.5Mbps. More...
 
static WifiMode GetErpOfdmRate12Mbps ()
 Return a WifiMode for ERP-OFDM at 12Mbps. More...
 
static WifiMode GetErpOfdmRate18Mbps ()
 Return a WifiMode for ERP-OFDM at 18Mbps. More...
 
static WifiMode GetErpOfdmRate24Mbps ()
 Return a WifiMode for ERP-OFDM at 24Mbps. More...
 
static WifiMode GetErpOfdmRate36Mbps ()
 Return a WifiMode for ERP-OFDM at 36Mbps. More...
 
static WifiMode GetErpOfdmRate48Mbps ()
 Return a WifiMode for ERP-OFDM at 48Mbps. More...
 
static WifiMode GetErpOfdmRate54Mbps ()
 Return a WifiMode for ERP-OFDM at 54Mbps. More...
 
static WifiMode GetErpOfdmRate6Mbps ()
 Return a WifiMode for ERP-OFDM at 6Mbps. More...
 
static WifiMode GetErpOfdmRate9Mbps ()
 Return a WifiMode for ERP-OFDM at 9Mbps. More...
 
static WifiMode GetHeMcs0 ()
 Return MCS 0 from HE MCS values. More...
 
static WifiMode GetHeMcs1 ()
 Return MCS 1 from HE MCS values. More...
 
static WifiMode GetHeMcs10 ()
 Return MCS 10 from HE MCS values. More...
 
static WifiMode GetHeMcs11 ()
 Return MCS 11 from HE MCS values. More...
 
static WifiMode GetHeMcs2 ()
 Return MCS 2 from HE MCS values. More...
 
static WifiMode GetHeMcs3 ()
 Return MCS 3 from HE MCS values. More...
 
static WifiMode GetHeMcs4 ()
 Return MCS 4 from HE MCS values. More...
 
static WifiMode GetHeMcs5 ()
 Return MCS 5 from HE MCS values. More...
 
static WifiMode GetHeMcs6 ()
 Return MCS 6 from HE MCS values. More...
 
static WifiMode GetHeMcs7 ()
 Return MCS 7 from HE MCS values. More...
 
static WifiMode GetHeMcs8 ()
 Return MCS 8 from HE MCS values. More...
 
static WifiMode GetHeMcs9 ()
 Return MCS 9 from HE MCS values. More...
 
static WifiMode GetHePhyHeaderMode ()
 
static WifiMode GetHtMcs0 ()
 Return MCS 0 from HT MCS values. More...
 
static WifiMode GetHtMcs1 ()
 Return MCS 1 from HT MCS values. More...
 
static WifiMode GetHtMcs10 ()
 Return MCS 10 from HT MCS values. More...
 
static WifiMode GetHtMcs11 ()
 Return MCS 11 from HT MCS values. More...
 
static WifiMode GetHtMcs12 ()
 Return MCS 12 from HT MCS values. More...
 
static WifiMode GetHtMcs13 ()
 Return MCS 13 from HT MCS values. More...
 
static WifiMode GetHtMcs14 ()
 Return MCS 14 from HT MCS values. More...
 
static WifiMode GetHtMcs15 ()
 Return MCS 15 from HT MCS values. More...
 
static WifiMode GetHtMcs16 ()
 Return MCS 16 from HT MCS values. More...
 
static WifiMode GetHtMcs17 ()
 Return MCS 17 from HT MCS values. More...
 
static WifiMode GetHtMcs18 ()
 Return MCS 18 from HT MCS values. More...
 
static WifiMode GetHtMcs19 ()
 Return MCS 19 from HT MCS values. More...
 
static WifiMode GetHtMcs2 ()
 Return MCS 2 from HT MCS values. More...
 
static WifiMode GetHtMcs20 ()
 Return MCS 20 from HT MCS values. More...
 
static WifiMode GetHtMcs21 ()
 Return MCS 21 from HT MCS values. More...
 
static WifiMode GetHtMcs22 ()
 Return MCS 22 from HT MCS values. More...
 
static WifiMode GetHtMcs23 ()
 Return MCS 23 from HT MCS values. More...
 
static WifiMode GetHtMcs24 ()
 Return MCS 24 from HT MCS values. More...
 
static WifiMode GetHtMcs25 ()
 Return MCS 25 from HT MCS values. More...
 
static WifiMode GetHtMcs26 ()
 Return MCS 26 from HT MCS values. More...
 
static WifiMode GetHtMcs27 ()
 Return MCS 27 from HT MCS values. More...
 
static WifiMode GetHtMcs28 ()
 Return MCS 28 from HT MCS values. More...
 
static WifiMode GetHtMcs29 ()
 Return MCS 29 from HT MCS values. More...
 
static WifiMode GetHtMcs3 ()
 Return MCS 3 from HT MCS values. More...
 
static WifiMode GetHtMcs30 ()
 Return MCS 30 from HT MCS values. More...
 
static WifiMode GetHtMcs31 ()
 Return MCS 31 from HT MCS values. More...
 
static WifiMode GetHtMcs4 ()
 Return MCS 4 from HT MCS values. More...
 
static WifiMode GetHtMcs5 ()
 Return MCS 5 from HT MCS values. More...
 
static WifiMode GetHtMcs6 ()
 Return MCS 6 from HT MCS values. More...
 
static WifiMode GetHtMcs7 ()
 Return MCS 7 from HT MCS values. More...
 
static WifiMode GetHtMcs8 ()
 Return MCS 8 from HT MCS values. More...
 
static WifiMode GetHtMcs9 ()
 Return MCS 9 from HT MCS values. More...
 
static WifiMode GetHtPhyHeaderMode ()
 
static WifiMode GetOfdmRate12Mbps ()
 Return a WifiMode for OFDM at 12Mbps. More...
 
static WifiMode GetOfdmRate12MbpsBW10MHz ()
 Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate12MbpsBW5MHz ()
 Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate13_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate18Mbps ()
 Return a WifiMode for OFDM at 18Mbps. More...
 
static WifiMode GetOfdmRate18MbpsBW10MHz ()
 Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate1_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate24Mbps ()
 Return a WifiMode for OFDM at 24Mbps. More...
 
static WifiMode GetOfdmRate24MbpsBW10MHz ()
 Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate27MbpsBW10MHz ()
 Return a WifiMode for OFDM at 27Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate2_25MbpsBW5MHz ()
 Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate36Mbps ()
 Return a WifiMode for OFDM at 36Mbps. More...
 
static WifiMode GetOfdmRate3MbpsBW10MHz ()
 Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate3MbpsBW5MHz ()
 Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate48Mbps ()
 Return a WifiMode for OFDM at 48Mbps. More...
 
static WifiMode GetOfdmRate4_5MbpsBW10MHz ()
 Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate4_5MbpsBW5MHz ()
 Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate54Mbps ()
 Return a WifiMode for OFDM at 54Mbps. More...
 
static WifiMode GetOfdmRate6Mbps ()
 Return a WifiMode for OFDM at 6Mbps. More...
 
static WifiMode GetOfdmRate6MbpsBW10MHz ()
 Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate6MbpsBW5MHz ()
 Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing. More...
 
static WifiMode GetOfdmRate9Mbps ()
 Return a WifiMode for OFDM at 9Mbps. More...
 
static WifiMode GetOfdmRate9MbpsBW10MHz ()
 Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing. More...
 
static WifiMode GetOfdmRate9MbpsBW5MHz ()
 Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing. More...
 
static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype=NORMAL_MPDU)
 
static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols)
 
static Time GetPhyHeaderDuration (WifiTxVector txVector)
 
static WifiMode GetPhyHeaderMode (WifiTxVector txVector)
 
static Time GetPhyHtSigHeaderDuration (WifiPreamble preamble)
 
static Time GetPhyPreambleDuration (WifiTxVector txVector)
 
static Time GetPhySigA1Duration (WifiPreamble preamble)
 
static Time GetPhySigA2Duration (WifiPreamble preamble)
 
static Time GetPhySigBDuration (WifiPreamble preamble)
 
static Time GetPhyTrainingSymbolDuration (WifiTxVector txVector)
 
static Time GetPreambleDetectionDuration (void)
 
static Time GetStartOfPacketDuration (WifiTxVector txVector)
 
static TypeId GetTypeId (void)
 Get the type ID. More...
 
static WifiMode GetVhtMcs0 ()
 Return MCS 0 from VHT MCS values. More...
 
static WifiMode GetVhtMcs1 ()
 Return MCS 1 from VHT MCS values. More...
 
static WifiMode GetVhtMcs2 ()
 Return MCS 2 from VHT MCS values. More...
 
static WifiMode GetVhtMcs3 ()
 Return MCS 3 from VHT MCS values. More...
 
static WifiMode GetVhtMcs4 ()
 Return MCS 4 from VHT MCS values. More...
 
static WifiMode GetVhtMcs5 ()
 Return MCS 5 from VHT MCS values. More...
 
static WifiMode GetVhtMcs6 ()
 Return MCS 6 from VHT MCS values. More...
 
static WifiMode GetVhtMcs7 ()
 Return MCS 7 from VHT MCS values. More...
 
static WifiMode GetVhtMcs8 ()
 Return MCS 8 from VHT MCS values. More...
 
static WifiMode GetVhtMcs9 ()
 Return MCS 9 from VHT MCS values. More...
 
static WifiMode GetVhtPhyHeaderMode ()
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

bool DoChannelSwitch (uint8_t id)
 The default implementation does nothing and returns true. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
bool DoFrequencySwitch (uint16_t frequency)
 The default implementation does nothing and returns true. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
void SwitchMaybeToCcaBusy (void)
 Check if PHY state should move to CCA busy state based on current state of interference tracker. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Protected Attributes

EventId m_endPhyRxEvent
 the end of PHY receive event More...
 
EventId m_endPreambleDetectionEvent
 the end of preamble detection event More...
 
EventId m_endRxEvent
 the end of receive event More...
 
InterferenceHelper m_interference
 Pointer to InterferenceHelper. More...
 
Ptr< UniformRandomVariablem_random
 Provides uniform random variables. More...
 
uint32_t m_rxMpduReferenceNumber
 A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU. More...
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper. More...
 
uint32_t m_txMpduReferenceNumber
 A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU. More...
 

Private Types

typedef std::map< ChannelNumberStandardPair, FrequencyWidthPairChannelToFrequencyWidthMap
 channel to frequency width map typedef More...
 

Private Member Functions

void AbortCurrentReception (WifiPhyRxfailureReason reason)
 Due to newly arrived signal, the current reception cannot be continued and has to be aborted. More...
 
void Configure80211_10Mhz (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing. More...
 
void Configure80211_5Mhz ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing. More...
 
void Configure80211a (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard. More...
 
void Configure80211ac (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard. More...
 
void Configure80211ax (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard. More...
 
void Configure80211b (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard. More...
 
void Configure80211g (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard. More...
 
void Configure80211n (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard. More...
 
void ConfigureChannelForStandard (WifiPhyStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard. More...
 
void ConfigureDefaultsForStandard (WifiPhyStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard. More...
 
void ConfigureHolland (void)
 Configure WifiPhy with appropriate channel frequency and supported rates for Holland. More...
 
void ConfigureHtDeviceMcsSet (void)
 Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams. More...
 
uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const
 Look for channel number matching the frequency and width. More...
 
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const
 Lookup frequency/width pair for channelNumber/standard pair. More...
 
std::pair< bool, SignalNoiseDbmGetReceptionStatus (Ptr< const WifiPsdu > psdu, Ptr< Event > event, Time relativeMpduStart, Time mpduDuration)
 Get the reception status for the provided MPDU and notify. More...
 
void InitializeFrequencyChannelNumber (void)
 post-construction setting of frequency and/or channel number More...
 
void MaybeCcaBusyDuration (void)
 Eventually switch to CCA busy. More...
 
void PushMcs (WifiMode mode)
 Add the given MCS to the device MCS set. More...
 
void RebuildMcsMap (void)
 Rebuild the mapping of MCS values to indices in the device MCS set. More...
 
void StartRx (Ptr< Event > event, double rxPowerW)
 Starting receiving the PPDU after having detected the medium is idle or after a reception switch. More...
 

Private Attributes

std::vector< uint8_t > m_bssMembershipSelectorSet
 the BSS membership selector set More...
 
Callback< void > m_capabilitiesChangedCallback
 Callback when PHY capabilities changed. More...
 
double m_ccaEdThresholdW
 Clear channel assessment (CCA) threshold in watts. More...
 
bool m_channelAccessRequested
 Flag if channels access has been requested (used for OBSS_PD SR) More...
 
uint16_t m_channelCenterFrequency
 Center frequency in MHz. More...
 
uint8_t m_channelNumber
 Operating channel number. More...
 
Time m_channelSwitchDelay
 Time required to switch between channel. More...
 
uint16_t m_channelWidth
 Channel width (MHz) More...
 
Ptr< Eventm_currentEvent
 Hold the current event. More...
 
Ptr< NetDevicem_device
 Pointer to the device. More...
 
WifiModeList m_deviceMcsSet
 the device MCS set More...
 
WifiModeList m_deviceRateSet
 This vector holds the set of transmission modes that this WifiPhy(-derived class) can support. More...
 
Ptr< FrameCaptureModelm_frameCaptureModel
 Frame capture model. More...
 
bool m_frequencyChannelNumberInitialized
 Store initialization state. More...
 
bool m_greenfield
 Flag if GreenField format is supported (deprecated) More...
 
Time m_guardInterval
 Supported HE guard interval (deprecated) More...
 
uint8_t m_initialChannelNumber
 Initial channel number. More...
 
uint16_t m_initialFrequency
 Store frequency until initialization (MHz) More...
 
bool m_isConstructed
 true when ready to set frequency More...
 
std::map< WifiModulationClass, std::map< uint8_t, uint8_t > > m_mcsIndexMap
 Maps MCS values to indices in m_deviceMcsSet, for HT, VHT and HE modulation classes. More...
 
Ptr< MobilityModelm_mobility
 Pointer to the mobility model. More...
 
uint8_t m_nTxPower
 Number of available transmission power levels. More...
 
uint8_t m_numberOfAntennas
 Number of transmitters. More...
 
TracedCallback< HePreambleParametersm_phyEndOfHePreambleTrace
 A trace source that indicates the end of both HE SIG fields as well as training fields for received 802.11ax packets. More...
 
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbmm_phyMonitorSniffRxTrace
 A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received. More...
 
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfom_phyMonitorSniffTxTrace
 A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted. More...
 
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
 The trace source fired when a packet begins the reception process from the medium. More...
 
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReasonm_phyRxDropTrace
 The trace source fired when the PHY layer drops a packet it has received. More...
 
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
 The trace source fired when a packet ends the reception process from the medium. More...
 
TracedCallback< Ptr< const Packet >, double > m_phyTxBeginTrace
 The trace source fired when a packet begins the transmission process on the medium. More...
 
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
 The trace source fired when the PHY layer drops a packet as it tries to transmit it. More...
 
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
 The trace source fired when a packet ends the transmission process on the medium. More...
 
TracedCallback< Ptr< const WifiPsdu >, WifiTxVector, double > m_phyTxPsduBeginTrace
 The trace source fired when a PSDU begins the transmission process on the medium. More...
 
Ptr< ErrorModelm_postReceptionErrorModel
 Error model for receive packet events. More...
 
bool m_powerRestricted
 Flag whether transmit power is restricted by OBSS PD SR. More...
 
Ptr< PreambleDetectionModelm_preambleDetectionModel
 Preamble detection model. More...
 
double m_rxGainDb
 Reception gain (dB) More...
 
double m_rxSensitivityW
 Receive sensitivity threshold in watts. More...
 
uint8_t m_rxSpatialStreams
 Number of supported RX spatial streams. More...
 
bool m_shortGuardInterval
 Flag if HT/VHT short guard interval is supported (deprecated) More...
 
bool m_shortPreamble
 Flag if short PHY preamble is supported. More...
 
WifiPhyStandard m_standard
 WifiPhyStandard. More...
 
std::vector< uint16_t > m_supportedChannelWidthSet
 Supported channel width set (MHz) More...
 
Time m_timeLastPreambleDetected
 Record the time the last preamble was detected. More...
 
double m_txGainDb
 Transmission gain (dB) More...
 
double m_txPowerBaseDbm
 Minimum transmission power (dBm) More...
 
double m_txPowerEndDbm
 Maximum transmission power (dBm) More...
 
double m_txPowerMaxMimo
 MIMO maximum transmit power due to OBSS PD SR power restriction (dBm) More...
 
double m_txPowerMaxSiso
 SISO maximum transmit power due to OBSS PD SR power restriction (dBm) More...
 
uint8_t m_txSpatialStreams
 Number of supported TX spatial streams. More...
 
Ptr< WifiRadioEnergyModelm_wifiRadioEnergyModel
 Wifi radio energy model. More...
 

Static Private Attributes

static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
 the channel to frequency width map More...
 

Additional Inherited Members

Detailed Description

802.11 PHY layer model


Config Paths

ns3::WifiPhy is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Phy"
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WaveNetDevice/PhyEntities/[i]"

Attributes

  • Frequency: The operating center frequency (MHz)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write read
  • ChannelWidth: Whether 5MHz, 10MHz, 20MHz, 22MHz, 40MHz, 80 MHz or 160 MHz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 5:160
    • Initial value: 20
    • Flags: construct write read
  • ChannelNumber: If set to non-zero defined value, will control Frequency and ChannelWidth assignment
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:196
    • Initial value: 0
    • Flags: construct write read
  • EnergyDetectionThreshold: The energy of a received signal should be higher than this threshold (dBm) to allow the PHY layer to detect the signal.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -101
    • Flags: construct write
  • RxSensitivity: The energy of a received signal should be higher than this threshold (dBm) for the PHY to detect the signal.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -101
    • Flags: construct write read
  • CcaEdThreshold: The energy of a non Wi-Fi received signal should be higher than this threshold (dBm) to allow the PHY layer to declare CCA BUSY state. This check is performed on the 20 MHz primary channel only.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -62
    • Flags: construct write read
  • TxGain: Transmission gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • RxGain: Reception gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • TxPowerLevels: Number of transmission power levels available between TxPowerStart and TxPowerEnd included.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 1
    • Flags: construct write read
  • TxPowerEnd: Maximum available transmission level (dBm).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 16.0206
    • Flags: construct write read
  • TxPowerStart: Minimum available transmission level (dBm).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 16.0206
    • Flags: construct write read
  • RxNoiseFigure: Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0 (usually 290 K)".
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 7
    • Flags: construct write
  • State: The state of the PHY layer.
  • ChannelSwitchDelay: Delay between two short frames transmitted on different frequencies.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +250000.0ns
    • Flags: construct write read
  • Antennas: The number of antennas on the device.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: construct write read
  • MaxSupportedTxSpatialStreams: The maximum number of supported TX spatial streams.This parameter is only valuable for 802.11n/ac/ax STAs and APs.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: construct write read
  • MaxSupportedRxSpatialStreams: The maximum number of supported RX spatial streams.This parameter is only valuable for 802.11n/ac/ax STAs and APs.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: construct write read
  • ShortGuardEnabled: Whether or not short guard interval is enabled for HT/VHT transmissions.This parameter is only valuable for 802.11n/ac/ax STAs and APs.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • GuardInterval: Whether 800ns, 1600ns or 3200ns guard interval is used for HE transmissions.This parameter is only valuable for 802.11ax STAs and APs.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +800.0ns:+3200.0ns
    • Initial value: +3200.0ns
    • Flags: construct write read
  • GreenfieldEnabled: Whether or not Greenfield is enabled.This parameter is only valuable for 802.11n STAs and APs.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • ShortPlcpPreambleSupported: Whether or not short PHY preamble is supported.This parameter is only valuable for 802.11b STAs and APs.Note: 802.11g APs and STAs always support short PHY preamble.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • FrameCaptureModel: Ptr to an object that implements the frame capture model
  • PreambleDetectionModel: Ptr to an object that implements the preamble detection model
  • PostReceptionErrorModel: An optional packet error model can be added to the receive packet process after any propagation-based (SNR-based) error models have been applied. Typically this is used to force specific packet drops, for testing purposes.

TraceSources

  • PhyTxBegin: Trace source indicating a packet has begun transmitting over the channel medium
    Callback signature: ns3::Packet::TracedCallback
  • PhyTxPsduBegin: Trace source indicating a PSDU has begun transmitting over the channel medium
    Callback signature: ns3::WifiPhy::PsduTxBeginCallback
  • PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date never fires this trace source.
    Callback signature: ns3::Packet::TracedCallback
  • PhyTxDrop: Trace source indicating a packet has been dropped by the device during transmission
    Callback signature: ns3::Packet::TracedCallback
  • PhyRxBegin: Trace source indicating a packet has begun being received from the channel medium by the device
    Callback signature: ns3::Packet::TracedCallback
  • PhyRxEnd: Trace source indicating a packet has been completely received from the channel medium by the device
    Callback signature: ns3::Packet::TracedCallback
  • PhyRxDrop: Trace source indicating a packet has been dropped by the device during reception
    Callback signature: ns3::Packet::TracedCallback
  • MonitorSnifferRx: Trace source simulating a wifi device in monitor mode sniffing all received frames
    Callback signature: ns3::WifiPhy::MonitorSnifferRxTracedCallback
  • MonitorSnifferTx: Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted
    Callback signature: ns3::WifiPhy::MonitorSnifferTxTracedCallback
  • EndOfHePreamble: Trace source indicating the end of the 802.11ax preamble (after training fields)
    Callback signature: ns3::WifiPhy::EndOfHePreambleTracedCallback

Size of this type is 720 bytes (on a 64-bit architecture).

Definition at line 94 of file wifi-phy.h.

Member Typedef Documentation

◆ ChannelNumberStandardPair

A pair of a ChannelNumber and WifiPhyStandard.

Definition at line 594 of file wifi-phy.h.

◆ ChannelToFrequencyWidthMap

channel to frequency width map typedef

Definition at line 1979 of file wifi-phy.h.

◆ EndOfHePreambleCallback

typedef void(* ns3::WifiPhy::EndOfHePreambleCallback) (HePreambleParameters params)

TracedCallback signature for end of HE-SIG-A events.

Parameters
paramsthe HE preamble parameters

Definition at line 1301 of file wifi-phy.h.

◆ FrequencyWidthPair

typedef std::pair<uint16_t, uint16_t> ns3::WifiPhy::FrequencyWidthPair

A pair of a center Frequency (MHz) and a ChannelWidth (MHz)

Definition at line 598 of file wifi-phy.h.

◆ MonitorSnifferRxCallback

typedef void(* ns3::WifiPhy::MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)

TracedCallback signature for monitor mode receive events.

Parameters
packetthe packet being received
channelFreqMhzthe frequency in MHz at which the packet is received. Note that in real devices this is normally the frequency to which the receiver is tuned, and this can be different than the frequency at which the packet was originally transmitted. This is because it is possible to have the receiver tuned on a given channel and still to be able to receive packets on a nearby channel.
txVectorthe TXVECTOR that holds RX parameters
aMpduthe type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)
signalNoisesignal power and noise power in dBm
Todo:
WifiTxVector should be passed by const reference because of its size.

Definition at line 1240 of file wifi-phy.h.

◆ MonitorSnifferTxCallback

typedef void(* ns3::WifiPhy::MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)

TracedCallback signature for monitor mode transmit events.

Parameters
packetthe packet being transmitted
channelFreqMhzthe frequency in MHz at which the packet is transmitted.
txVectorthe TXVECTOR that holds TX parameters
aMpduthe type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)
Todo:
WifiTxVector should be passed by const reference because of its size.

Definition at line 1274 of file wifi-phy.h.

◆ PsduTxBeginCallback

typedef void(* ns3::WifiPhy::PsduTxBeginCallback) (Ptr< const WifiPsdu > psdu, WifiTxVector txVector, double txPowerW)

TracedCallback signature for PSDU transmit events.

Parameters
psduthe PSDU being transmitted
txVectorthe TXVECTOR holding the TX parameters
txPowerWthe transmit power in Watts

Definition at line 1286 of file wifi-phy.h.

Constructor & Destructor Documentation

◆ WifiPhy()

ns3::WifiPhy::WifiPhy ( )

Definition at line 385 of file wifi-phy.cc.

References m_random, m_state, and NS_LOG_FUNCTION.

◆ ~WifiPhy()

ns3::WifiPhy::~WifiPhy ( )
virtual

Definition at line 412 of file wifi-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AbortCurrentReception()

void ns3::WifiPhy::AbortCurrentReception ( WifiPhyRxfailureReason  reason)
private

Due to newly arrived signal, the current reception cannot be continued and has to be aborted.

Parameters
reasonthe reason the reception is aborted

Definition at line 4039 of file wifi-phy.cc.

References ns3::EventId::Cancel(), ns3::EventId::IsRunning(), m_currentEvent, m_endPhyRxEvent, m_endPreambleDetectionEvent, m_endRxEvent, m_interference, m_state, NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxEnd(), NS_LOG_FUNCTION, and ns3::OBSS_PD_CCA_RESET.

Referenced by ContinueReceiveHeader(), ResetCca(), and StartReceivePreamble().

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

◆ AddSupportedChannelWidth()

void ns3::WifiPhy::AddSupportedChannelWidth ( uint16_t  width)
Parameters
widththe channel width (in MHz) to support

Definition at line 1457 of file wifi-phy.cc.

References m_supportedChannelWidthSet, and NS_LOG_FUNCTION.

Referenced by SetChannelWidth().

+ Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::WifiPhy::AssignStreams ( int64_t  stream)
virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 4131 of file wifi-phy.cc.

References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

Referenced by TestThresholdPreambleDetectionWithoutFrameCapture::DoRun(), TestThresholdPreambleDetectionWithFrameCapture::DoRun(), TestSimpleFrameCaptureModel::DoRun(), TestPhyHeadersReception::DoRun(), and TestAmpduReception::DoRun().

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

◆ CalculatePhyPreambleAndHeaderDuration()

Time ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration ( WifiTxVector  txVector)
static
Parameters
txVectorthe transmission parameters used for this packet
Returns
the total amount of time this PHY will stay busy for the transmission of the PHY preamble and PHY header.

Definition at line 2398 of file wifi-phy.cc.

References GetPhyHeaderDuration(), GetPhyHtSigHeaderDuration(), GetPhyPreambleDuration(), GetPhySigA1Duration(), GetPhySigA2Duration(), GetPhySigBDuration(), GetPhyTrainingSymbolDuration(), and ns3::WifiTxVector::GetPreambleType().

Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), CalculateTxDuration(), ContinueReceiveHeader(), ns3::WifiPpdu::GetTxDuration(), StartReceiveHeader(), StartReceivePayload(), and ns3::WifiPpdu::WifiPpdu().

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

◆ CalculateSnr()

double ns3::WifiPhy::CalculateSnr ( WifiTxVector  txVector,
double  ber 
) const
Parameters
txVectorthe transmission vector
berthe probability of bit error rate
Returns
the minimum SNR which is required to achieve the requested BER for the specified transmission vector. (W/W)

Definition at line 823 of file wifi-phy.cc.

References ns3::InterferenceHelper::GetErrorRateModel(), and m_interference.

+ Here is the call graph for this function:

◆ CalculateTxDuration()

Time ns3::WifiPhy::CalculateTxDuration ( uint32_t  size,
WifiTxVector  txVector,
uint16_t  frequency 
)
static

◆ Configure80211_10Mhz()

void ns3::WifiPhy::Configure80211_10Mhz ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing.

Definition at line 950 of file wifi-phy.cc.

References GetOfdmRate12MbpsBW10MHz(), GetOfdmRate18MbpsBW10MHz(), GetOfdmRate24MbpsBW10MHz(), GetOfdmRate27MbpsBW10MHz(), GetOfdmRate3MbpsBW10MHz(), GetOfdmRate4_5MbpsBW10MHz(), GetOfdmRate6MbpsBW10MHz(), GetOfdmRate9MbpsBW10MHz(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by ConfigureStandard().

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

◆ Configure80211_5Mhz()

void ns3::WifiPhy::Configure80211_5Mhz ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing.

Definition at line 965 of file wifi-phy.cc.

References GetOfdmRate12MbpsBW5MHz(), GetOfdmRate13_5MbpsBW5MHz(), GetOfdmRate1_5MbpsBW5MHz(), GetOfdmRate2_25MbpsBW5MHz(), GetOfdmRate3MbpsBW5MHz(), GetOfdmRate4_5MbpsBW5MHz(), GetOfdmRate6MbpsBW5MHz(), GetOfdmRate9MbpsBW5MHz(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by ConfigureStandard().

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

◆ Configure80211a()

void ns3::WifiPhy::Configure80211a ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard.

Definition at line 908 of file wifi-phy.cc.

References GetOfdmRate12Mbps(), GetOfdmRate18Mbps(), GetOfdmRate24Mbps(), GetOfdmRate36Mbps(), GetOfdmRate48Mbps(), GetOfdmRate54Mbps(), GetOfdmRate6Mbps(), GetOfdmRate9Mbps(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by Configure80211n(), and ConfigureStandard().

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

◆ Configure80211ac()

void ns3::WifiPhy::Configure80211ac ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard.

Definition at line 1104 of file wifi-phy.cc.

References Configure80211n(), GetVhtMcs0(), GetVhtMcs1(), GetVhtMcs2(), GetVhtMcs3(), GetVhtMcs4(), GetVhtMcs5(), GetVhtMcs6(), GetVhtMcs7(), GetVhtMcs8(), GetVhtMcs9(), m_bssMembershipSelectorSet, NS_LOG_FUNCTION, PushMcs(), and VHT_PHY.

Referenced by Configure80211ax(), and ConfigureStandard().

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

◆ Configure80211ax()

void ns3::WifiPhy::Configure80211ax ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard.

Definition at line 1124 of file wifi-phy.cc.

References Configure80211ac(), Configure80211n(), GetFrequency(), GetHeMcs0(), GetHeMcs1(), GetHeMcs10(), GetHeMcs11(), GetHeMcs2(), GetHeMcs3(), GetHeMcs4(), GetHeMcs5(), GetHeMcs6(), GetHeMcs7(), GetHeMcs8(), GetHeMcs9(), HE_PHY, ns3::Is5Ghz(), m_bssMembershipSelectorSet, NS_LOG_FUNCTION, and PushMcs().

Referenced by ConfigureStandard().

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

◆ Configure80211b()

void ns3::WifiPhy::Configure80211b ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard.

Definition at line 923 of file wifi-phy.cc.

References GetDsssRate11Mbps(), GetDsssRate1Mbps(), GetDsssRate2Mbps(), GetDsssRate5_5Mbps(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by Configure80211g(), Configure80211n(), and ConfigureStandard().

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

◆ Configure80211g()

void ns3::WifiPhy::Configure80211g ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard.

Definition at line 934 of file wifi-phy.cc.

References Configure80211b(), GetErpOfdmRate12Mbps(), GetErpOfdmRate18Mbps(), GetErpOfdmRate24Mbps(), GetErpOfdmRate36Mbps(), GetErpOfdmRate48Mbps(), GetErpOfdmRate54Mbps(), GetErpOfdmRate6Mbps(), GetErpOfdmRate9Mbps(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by Configure80211n(), and ConfigureStandard().

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

◆ Configure80211n()

void ns3::WifiPhy::Configure80211n ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard.

Definition at line 1087 of file wifi-phy.cc.

References Configure80211a(), Configure80211b(), Configure80211g(), ConfigureHtDeviceMcsSet(), GetFrequency(), HT_PHY, ns3::Is2_4Ghz(), ns3::Is5Ghz(), m_bssMembershipSelectorSet, and NS_LOG_FUNCTION.

Referenced by Configure80211ac(), Configure80211ax(), and ConfigureStandard().

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

◆ ConfigureChannelForStandard()

void ns3::WifiPhy::ConfigureChannelForStandard ( WifiPhyStandard  standard)
private

Configure the PHY-level parameters for different Wi-Fi standard.

This method is called when the Frequency or ChannelNumber attributes are set by the user. If the Frequency or ChannelNumber are valid for the standard, they are used instead.

Parameters
standardthe Wi-Fi standard

Definition at line 1198 of file wifi-phy.cc.

References f(), FindChannelNumberForFrequencyWidth(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetFrequencyWidthForChannelNumberStandard(), NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, SetChannelNumber(), SetChannelWidth(), SetFrequency(), and ns3::WIFI_PHY_STANDARD_UNSPECIFIED.

Referenced by ConfigureStandard().

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

◆ ConfigureDefaultsForStandard()

void ns3::WifiPhy::ConfigureDefaultsForStandard ( WifiPhyStandard  standard)
private

Configure the PHY-level parameters for different Wi-Fi standard.

This method is called when defaults for each standard must be selected.

Parameters
standardthe Wi-Fi standard

Definition at line 829 of file wifi-phy.cc.

References GetChannelNumber(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_WARN, SetChannelWidth(), SetFrequency(), ns3::WIFI_PHY_STANDARD_80211_10MHZ, ns3::WIFI_PHY_STANDARD_80211_5MHZ, ns3::WIFI_PHY_STANDARD_80211a, ns3::WIFI_PHY_STANDARD_80211ac, ns3::WIFI_PHY_STANDARD_80211ax_2_4GHZ, ns3::WIFI_PHY_STANDARD_80211ax_5GHZ, ns3::WIFI_PHY_STANDARD_80211b, ns3::WIFI_PHY_STANDARD_80211g, ns3::WIFI_PHY_STANDARD_80211n_2_4GHZ, ns3::WIFI_PHY_STANDARD_80211n_5GHZ, ns3::WIFI_PHY_STANDARD_holland, and ns3::WIFI_PHY_STANDARD_UNSPECIFIED.

Referenced by ConfigureStandard().

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

◆ ConfigureHolland()

void ns3::WifiPhy::ConfigureHolland ( void  )
private

Configure WifiPhy with appropriate channel frequency and supported rates for Holland.

Definition at line 980 of file wifi-phy.cc.

References GetOfdmRate12Mbps(), GetOfdmRate18Mbps(), GetOfdmRate36Mbps(), GetOfdmRate54Mbps(), GetOfdmRate6Mbps(), m_deviceRateSet, and NS_LOG_FUNCTION.

Referenced by ConfigureStandard().

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

◆ ConfigureHtDeviceMcsSet()

void ns3::WifiPhy::ConfigureHtDeviceMcsSet ( void  )
private

◆ ConfigureStandard()

◆ ContinueReceiveHeader()

void ns3::WifiPhy::ContinueReceiveHeader ( Ptr< Event event)

Continue receiving the PHY header of a PPDU (i.e.

after the end of receiving the non-HT header part).

Parameters
eventthe event holding incoming PPDU's information

Definition at line 2663 of file wifi-phy.cc.

References AbortCurrentReception(), ns3::InterferenceHelper::CalculateNonHtPhyHeaderSnrPer(), CalculatePhyPreambleAndHeaderDuration(), GetPhyHeaderDuration(), GetPhyPreambleDuration(), ns3::UniformRandomVariable::GetValue(), ns3::EventId::IsExpired(), IsStateRx(), ns3::L_SIG_FAILURE, m_endPhyRxEvent, m_interference, m_random, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and StartReceivePayload().

Referenced by StartReceiveHeader().

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

◆ DefineChannelNumber()

bool ns3::WifiPhy::DefineChannelNumber ( uint8_t  channelNumber,
WifiPhyStandard  standard,
uint16_t  frequency,
uint16_t  channelWidth 
)

Add a channel definition to the WifiPhy.

The pair (channelNumber, WifiPhyStandard) may then be used to lookup a pair (frequency, channelWidth).

If the channel is not already defined for the standard, the method should return true; otherwise false.

Parameters
channelNumberthe channel number to define
standardthe applicable WifiPhyStandard
frequencythe frequency (MHz)
channelWidththe channel width (MHz)
Returns
true if the channel definition succeeded

Definition at line 1153 of file wifi-phy.cc.

References f(), m_channelToFrequencyWidth, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by SetChannelFrequencyTest::DoRun().

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

◆ DoChannelSwitch()

bool ns3::WifiPhy::DoChannelSwitch ( uint8_t  id)
protected

The default implementation does nothing and returns true.

This method is typically called internally by SetChannelNumber ().

Perform any actions necessary when user changes channel number

Parameters
idchannel number to try to switch to
Returns
true if WifiPhy can actually change the number; false if not
See also
SetChannelNumber

Definition at line 1546 of file wifi-phy.cc.

References ns3::EventId::Cancel(), CCA_BUSY, ns3::InterferenceHelper::EraseEvents(), GetChannelNumber(), GetChannelSwitchDelay(), GetDelayUntilIdle(), IDLE, ns3::Object::IsInitialized(), ns3::EventId::IsRunning(), IsStateSwitching(), m_channelAccessRequested, m_endPhyRxEvent, m_endPreambleDetectionEvent, m_endRxEvent, m_interference, m_powerRestricted, m_state, NS_ASSERT, NS_LOG_DEBUG, RX, ns3::Simulator::Schedule(), SetChannelNumber(), SLEEP, and TX.

Referenced by SetChannelNumber().

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

◆ DoDispose()

void ns3::WifiPhy::DoDispose ( void  )
protectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Reimplemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.

Definition at line 418 of file wifi-phy.cc.

References ns3::EventId::Cancel(), m_device, m_deviceMcsSet, m_deviceRateSet, m_endPhyRxEvent, m_endPreambleDetectionEvent, m_endRxEvent, m_mcsIndexMap, m_mobility, m_postReceptionErrorModel, m_state, m_wifiRadioEnergyModel, and NS_LOG_FUNCTION.

Referenced by ns3::YansWifiPhy::DoDispose(), and ns3::SpectrumWifiPhy::DoDispose().

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

◆ DoFrequencySwitch()

bool ns3::WifiPhy::DoFrequencySwitch ( uint16_t  frequency)
protected

The default implementation does nothing and returns true.

This method is typically called internally by SetFrequency ().

Perform any actions necessary when user changes frequency

Parameters
frequencyfrequency to try to switch to in MHz
Returns
true if WifiPhy can actually change the frequency; false if not
See also
SetFrequency

Definition at line 1606 of file wifi-phy.cc.

References ns3::EventId::Cancel(), CCA_BUSY, ns3::InterferenceHelper::EraseEvents(), GetChannelSwitchDelay(), GetDelayUntilIdle(), GetFrequency(), IDLE, ns3::Object::IsInitialized(), ns3::EventId::IsRunning(), IsStateSwitching(), m_channelAccessRequested, m_endPhyRxEvent, m_endPreambleDetectionEvent, m_endRxEvent, m_interference, m_powerRestricted, m_state, NS_ASSERT, NS_LOG_DEBUG, RX, ns3::Simulator::Schedule(), SetFrequency(), SLEEP, and TX.

Referenced by SetFrequency().

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

◆ DoInitialize()

void ns3::WifiPhy::DoInitialize ( void  )
protectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Reimplemented in ns3::SpectrumWifiPhy.

Definition at line 435 of file wifi-phy.cc.

References InitializeFrequencyChannelNumber(), m_frequencyChannelNumberInitialized, m_isConstructed, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::SpectrumWifiPhy::DoInitialize().

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

◆ EndReceive()

void ns3::WifiPhy::EndReceive ( Ptr< Event event)

The last symbol of the PPDU has arrived.

Parameters
eventthe corresponding event of the first time the packet arrives (also storing packet and TxVector information)

Definition at line 2864 of file wifi-phy.cc.

References ns3::InterferenceHelper::CalculateSnr(), ns3::Copy(), ns3::FIRST_MPDU_IN_AGGREGATE, GetFrequency(), ns3::Time::GetNanoSeconds(), GetPayloadDuration(), GetReceptionStatus(), ns3::LAST_MPDU_IN_AGGREGATE, m_currentEvent, m_interference, m_state, MaybeCcaBusyDuration(), ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::NanoSeconds(), NotifyMonitorSniffRx(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by StartReceivePayload().

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

◆ EndReceiveInterBss()

void ns3::WifiPhy::EndReceiveInterBss ( void  )

For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception.

Definition at line 2969 of file wifi-phy.cc.

References m_channelAccessRequested, m_powerRestricted, and NS_LOG_FUNCTION.

Referenced by ResetCca().

+ Here is the caller graph for this function:

◆ FindChannelNumberForFrequencyWidth()

uint8_t ns3::WifiPhy::FindChannelNumberForFrequencyWidth ( uint16_t  frequency,
uint16_t  width 
) const
private

Look for channel number matching the frequency and width.

Parameters
frequencyThe center frequency to use in MHz
widthThe channel width to use in MHz
Returns
the channel number if found, zero if not

Definition at line 1170 of file wifi-phy.cc.

References f(), m_channelToFrequencyWidth, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ConfigureChannelForStandard(), and SetFrequency().

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

◆ GetBssMembershipSelector()

uint8_t ns3::WifiPhy::GetBssMembershipSelector ( uint8_t  selector) const

The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet.

Parameters
selectorindex in array of supported memberships
Returns
the membership selector whose index is specified.

Definition at line 1451 of file wifi-phy.cc.

References m_bssMembershipSelectorSet.

Referenced by ns3::ApWifiMac::GetSupportedRates(), ns3::StaWifiMac::GetSupportedRates(), ns3::StaWifiMac::Receive(), and ns3::StaWifiMac::UpdateApInfoFromProbeResp().

+ Here is the caller graph for this function:

◆ GetCcaEdThreshold()

double ns3::WifiPhy::GetCcaEdThreshold ( void  ) const

Return the CCA threshold (dBm).

Returns
the CCA threshold in dBm

Definition at line 538 of file wifi-phy.cc.

References m_ccaEdThresholdW, and ns3::WToDbm().

Referenced by GetTypeId().

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

◆ GetChannel()

virtual Ptr<Channel> ns3::WifiPhy::GetChannel ( void  ) const
pure virtual

Return the Channel this WifiPhy is connected to.

Returns
the Channel this WifiPhy is connected to

Implemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.

Referenced by ns3::WifiNetDevice::GetChannel(), and ns3::WaveNetDevice::GetChannel().

+ Here is the caller graph for this function:

◆ GetChannelNumber()

◆ GetChannelSwitchDelay()

Time ns3::WifiPhy::GetChannelSwitchDelay ( void  ) const
Returns
the required time for channel switch operation of this WifiPhy

Definition at line 817 of file wifi-phy.cc.

References m_channelSwitchDelay.

Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), DoChannelSwitch(), DoFrequencySwitch(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the caller graph for this function:

◆ GetChannelWidth()

uint16_t ns3::WifiPhy::GetChannelWidth ( void  ) const

◆ GetDelayUntilIdle()

Time ns3::WifiPhy::GetDelayUntilIdle ( void  )
Returns
the predicted delay until this PHY can become WifiPhy::IDLE.

The PHY will never become WifiPhy::IDLE before the delay returned by this method but it could become really idle later.

Definition at line 4010 of file wifi-phy.cc.

References m_state.

Referenced by DoChannelSwitch(), DoFrequencySwitch(), and SetSleepMode().

+ Here is the caller graph for this function:

◆ GetDevice()

◆ GetDsssRate11Mbps()

WifiMode ns3::WifiPhy::GetDsssRate11Mbps ( )
static

Return a WifiMode for DSSS at 11Mbps.

Returns
a WifiMode for DSSS at 11Mbps

Definition at line 3027 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_HR_DSSS.

Referenced by Configure80211b(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetDsssRate1Mbps()

WifiMode ns3::WifiPhy::GetDsssRate1Mbps ( )
static

Return a WifiMode for DSSS at 1Mbps.

Returns
a WifiMode for DSSS at 1Mbps

Definition at line 2988 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_DSSS.

Referenced by Configure80211b(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), GetPhyHeaderMode(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetDsssRate2Mbps()

WifiMode ns3::WifiPhy::GetDsssRate2Mbps ( )
static

Return a WifiMode for DSSS at 2Mbps.

Returns
a WifiMode for DSSS at 2Mbps

Definition at line 3000 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_DSSS.

Referenced by Configure80211b(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), GetPhyHeaderMode(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetDsssRate5_5Mbps()

WifiMode ns3::WifiPhy::GetDsssRate5_5Mbps ( )
static

Return a WifiMode for DSSS at 5.5Mbps.

Returns
a WifiMode for DSSS at 5.5Mbps

Definition at line 3015 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_UNDEFINED, and ns3::WIFI_MOD_CLASS_HR_DSSS.

Referenced by Configure80211b(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate12Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate12Mbps ( )
static

Return a WifiMode for ERP-OFDM at 12Mbps.

Returns
a WifiMode for ERP-OFDM at 12Mbps

Definition at line 3066 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_1_2, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate18Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate18Mbps ( )
static

Return a WifiMode for ERP-OFDM at 18Mbps.

Returns
a WifiMode for ERP-OFDM at 18Mbps

Definition at line 3078 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_3_4, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate24Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate24Mbps ( )
static

Return a WifiMode for ERP-OFDM at 24Mbps.

Returns
a WifiMode for ERP-OFDM at 24Mbps

Definition at line 3090 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_1_2, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate36Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate36Mbps ( )
static

Return a WifiMode for ERP-OFDM at 36Mbps.

Returns
a WifiMode for ERP-OFDM at 36Mbps

Definition at line 3102 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_3_4, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate48Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate48Mbps ( )
static

Return a WifiMode for ERP-OFDM at 48Mbps.

Returns
a WifiMode for ERP-OFDM at 48Mbps

Definition at line 3114 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_2_3, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate54Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate54Mbps ( )
static

Return a WifiMode for ERP-OFDM at 54Mbps.

Returns
a WifiMode for ERP-OFDM at 54Mbps

Definition at line 3126 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_3_4, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate6Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate6Mbps ( )
static

Return a WifiMode for ERP-OFDM at 6Mbps.

Returns
a WifiMode for ERP-OFDM at 6Mbps

Definition at line 3042 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_1_2, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), GetPhyHeaderMode(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetErpOfdmRate9Mbps()

WifiMode ns3::WifiPhy::GetErpOfdmRate9Mbps ( )
static

Return a WifiMode for ERP-OFDM at 9Mbps.

Returns
a WifiMode for ERP-OFDM at 9Mbps

Definition at line 3054 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMode(), ns3::WIFI_CODE_RATE_3_4, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

Referenced by Configure80211g(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetFrequency()

uint16_t ns3::WifiPhy::GetFrequency ( void  ) const
Returns
the operating center frequency (MHz)

Definition at line 1368 of file wifi-phy.cc.

References m_channelCenterFrequency.

Referenced by ns3::WifiRemoteStationManager::AddStationHeCapabilities(), ns3::MacLow::CalculateOverallTxTime(), ns3::MacLow::CalculateOverheadTxTime(), ns3::MacLow::CalculateTransmissionTime(), ns3::MacLow::CanTransmitNextCfFrame(), Configure80211ax(), Configure80211n(), ConfigureChannelForStandard(), ConfigureStandard(), DoFrequencySwitch(), SetChannelFrequencyTest::DoRun(), EndReceive(), ns3::MacLow::ForwardDown(), ns3::MacLow::GetAckDuration(), ns3::MacLow::GetBlockAckDuration(), ns3::MacLow::GetBlockAckRequestDuration(), ns3::SpectrumWifiPhy::GetCenterFrequencyForChannelWidth(), ns3::MacLow::GetCtsDuration(), ns3::RegularWifiMac::GetHeCapabilities(), ns3::SpectrumWifiPhy::GetRxSpectrumModel(), GetTypeId(), ns3::MacLow::IsWithinSizeAndTimeLimits(), SpectrumWifiPhyBasicTest::MakeSignal(), WifiPhyThresholdsTest::MakeWifiSignal(), ns3::MacLow::NotifyNav(), ns3::SpectrumWifiPhy::ResetSpectrumModel(), Send(), TestAmpduReception::SendAmpduWithThreeMpdus(), ns3::MacLow::SendCtsToSelf(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), TestThresholdPreambleDetectionWithoutFrameCapture::SendPacket(), TestThresholdPreambleDetectionWithFrameCapture::SendPacket(), TestSimpleFrameCaptureModel::SendPacket(), TestPhyHeadersReception::SendPacket(), ns3::MacLow::SendRtsForPacket(), SetFrequency(), ns3::MacLow::StartDataTxTimers(), and ns3::SpectrumWifiPhy::StartRx().

+ Here is the caller graph for this function:

◆ GetFrequencyWidthForChannelNumberStandard()

WifiPhy::FrequencyWidthPair ns3::WifiPhy::GetFrequencyWidthForChannelNumberStandard ( uint8_t  channelNumber,
WifiPhyStandard  standard 
) const
private

Lookup frequency/width pair for channelNumber/standard pair.

Parameters
channelNumberThe channel number to check
standardThe WifiPhyStandard to check
Returns
the FrequencyWidthPair found

Definition at line 1478 of file wifi-phy.cc.

References f(), and m_channelToFrequencyWidth.

Referenced by ConfigureChannelForStandard(), and SetChannelNumber().

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

◆ GetGreenfield()

bool ns3::WifiPhy::GetGreenfield ( void  ) const

Return whether Greenfield is supported.

Returns
true if Greenfield is supported, false otherwise
Deprecated:

Definition at line 633 of file wifi-phy.cc.

References GetDevice(), ns3::WifiNetDevice::GetHtConfiguration(), and m_greenfield.

Referenced by GetTypeId().

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

◆ GetGuardInterval()

Time ns3::WifiPhy::GetGuardInterval ( void  ) const

◆ GetHeMcs()

WifiMode ns3::WifiPhy::GetHeMcs ( uint8_t  mcs) const

Get the WifiMode object corresponding to the given MCS of the HE modulation class.

Parameters
mcsthe MCS value
Returns
the WifiMode object corresponding to the given MCS of the HE modulation class

Definition at line 3962 of file wifi-phy.cc.

References GetMcs(), and ns3::WIFI_MOD_CLASS_HE.

+ Here is the call graph for this function:

◆ GetHeMcs0()

WifiMode ns3::WifiPhy::GetHeMcs0 ( )
static

Return MCS 0 from HE MCS values.

Returns
MCS 0 from HE MCS values

Definition at line 3779 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), GetHePhyHeaderMode(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs1()

WifiMode ns3::WifiPhy::GetHeMcs1 ( )
static

Return MCS 1 from HE MCS values.

Returns
MCS 1 from HE MCS values

Definition at line 3787 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs10()

WifiMode ns3::WifiPhy::GetHeMcs10 ( )
static

Return MCS 10 from HE MCS values.

Returns
MCS 10 from HE MCS values

Definition at line 3859 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs11()

WifiMode ns3::WifiPhy::GetHeMcs11 ( )
static

Return MCS 11 from HE MCS values.

Returns
MCS 11 from HE MCS values

Definition at line 3867 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs2()

WifiMode ns3::WifiPhy::GetHeMcs2 ( )
static

Return MCS 2 from HE MCS values.

Returns
MCS 2 from HE MCS values

Definition at line 3795 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs3()

WifiMode ns3::WifiPhy::GetHeMcs3 ( )
static

Return MCS 3 from HE MCS values.

Returns
MCS 3 from HE MCS values

Definition at line 3803 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs4()

WifiMode ns3::WifiPhy::GetHeMcs4 ( )
static

Return MCS 4 from HE MCS values.

Returns
MCS 4 from HE MCS values

Definition at line 3811 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs5()

WifiMode ns3::WifiPhy::GetHeMcs5 ( )
static

Return MCS 5 from HE MCS values.

Returns
MCS 5 from HE MCS values

Definition at line 3819 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs6()

WifiMode ns3::WifiPhy::GetHeMcs6 ( )
static

Return MCS 6 from HE MCS values.

Returns
MCS 6 from HE MCS values

Definition at line 3827 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs7()

WifiMode ns3::WifiPhy::GetHeMcs7 ( )
static

Return MCS 7 from HE MCS values.

Returns
MCS 7 from HE MCS values

Definition at line 3835 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs8()

WifiMode ns3::WifiPhy::GetHeMcs8 ( )
static

Return MCS 8 from HE MCS values.

Returns
MCS 8 from HE MCS values

Definition at line 3843 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHeMcs9()

WifiMode ns3::WifiPhy::GetHeMcs9 ( )
static

Return MCS 9 from HE MCS values.

Returns
MCS 9 from HE MCS values

Definition at line 3851 of file wifi-phy.cc.

References ns3::WifiModeFactory::CreateWifiMcs(), and ns3::WIFI_MOD_CLASS_HE.

Referenced by Configure80211ax(), anonymous_namespace{wifi-phy.cc}::Constructor::Constructor(), and ns3::WifiPpdu::GetTxVector().

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

◆ GetHePhyHeaderMode()

WifiMode ns3::WifiPhy::GetHePhyHeaderMode ( )
static
Returns
the WifiMode used for the transmission of the HE-STF, HE-LTF and HE-SIG-B fields

Definition at line 1785 of file wifi-phy.cc.

References GetHeMcs0().

Referenced by ns3::InterferenceHelper::CalculateHtPhyHeaderPer().

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

◆ GetHtMcs()

WifiMode ns3::WifiPhy::GetHtMcs ( uint8_t  mcs) const

Get the WifiMode object corresponding to the given MCS of the HT modulation class.

Parameters
mcsthe MCS value