A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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

using ChannelSegments
 segments identifying an operating channel
 
using ChannelTuple
 Tuple identifying a segment of an operating channel.
 
typedef void(* MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId)
 TracedCallback signature for monitor mode receive events.
 
typedef void(* MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId)
 TracedCallback signature for monitor mode transmit events.
 
typedef void(* PhyRxBeginTracedCallback) (Ptr< const Packet > packet, RxPowerWattPerChannelBand rxPowersW)
 TracedCallback signature for PhyRxBegin trace source.
 
typedef void(* PhyRxMacHeaderEndTracedCallback) (const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration)
 TracedCallback signature for end of MAC header reception events.
 
typedef void(* PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration)
 TracedCallback signature for start of PSDU reception events.
 
typedef void(* PhyRxPpduDropTracedCallback) (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason)
 TracedCallback signature for start of PSDU reception events.
 
typedef void(* PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW)
 TracedCallback signature for Phy transmit events.
 
typedef void(* PsduTxBeginCallback) (WifiConstPsduMap psduMap, const WifiTxVector &txVector, double txPowerW)
 TracedCallback signature for PSDU transmit events.
 
typedef void(* SignalTransmissionCallback) (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector)
 Callback invoked when the PHY model starts to transmit a signal.
 

Public Member Functions

 WifiPhy ()
 
 ~WifiPhy () override
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
 
double CalculateSnr (const WifiTxVector &txVector, double ber) const
 
virtual void ConfigureStandard (WifiStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard.
 
virtual WifiSpectrumBandFrequencies ConvertIndicesToFrequencies (const WifiSpectrumBandIndices &indices) const =0
 This is a helper function to convert start and stop indices to start and stop frequencies.
 
void EndReceiveInterBss ()
 For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception.
 
Time GetAckTxTime () const
 Return the estimated Ack TX time for this PHY.
 
virtual WifiSpectrumBandInfo GetBand (MHz_u bandWidth, uint8_t bandIndex=0)=0
 Get the info of a given band.
 
Time GetBlockAckTxTime () const
 Return the estimated BlockAck TX time for this PHY.
 
std::list< uint8_t > GetBssMembershipSelectorList () 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 inside HT PHY (and above) instances.
 
dBm_u GetCcaEdThreshold () const
 Return the CCA energy detection threshold.
 
dBm_u GetCcaSensitivityThreshold () const
 Return the CCA sensitivity threshold.
 
virtual Ptr< ChannelGetChannel () const =0
 Return the Channel this WifiPhy is connected to.
 
uint8_t GetChannelNumber () const
 Return current channel number.
 
Time GetChannelSwitchDelay () const
 
MHz_u GetChannelWidth () const
 
virtual FrequencyRange GetCurrentFrequencyRange () const =0
 Get the frequency range of the current RF interface.
 
WifiMode GetDefaultMode () const
 Get the default WifiMode supported by the PHY.
 
Time GetDelayUntilIdle ()
 
Ptr< WifiNetDeviceGetDevice () const
 Return the device this PHY is associated with.
 
MHz_u GetFrequency () const
 
virtual MHz_u GetGuardBandwidth (MHz_u currentChannelWidth) const =0
 
Time GetLastRxEndTime () const
 Return the end time of the last received packet.
 
Time GetLastRxStartTime () const
 Return the start time of the last received packet.
 
Ptr< PhyEntityGetLatestPhyEntity () const
 Get the latest PHY entity supported by this PHY instance.
 
WifiModulationClass GetMaxModulationClassSupported () const
 
uint8_t GetMaxSupportedRxSpatialStreams () const
 
uint8_t GetMaxSupportedTxSpatialStreams () const
 
WifiMode GetMcs (WifiModulationClass modulation, uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the given modulation class.
 
std::list< WifiModeGetMcsList () const
 The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indices that this WifiPhy(-derived class) can support - a set of MCS indices which is stored by each HT PHY (and above).
 
std::list< WifiModeGetMcsList (WifiModulationClass modulation) const
 Get the list of supported MCSs for the given modulation class (i.e.
 
Ptr< MobilityModelGetMobility () const
 Return the mobility model this PHY is associated with.
 
std::list< WifiModeGetModeList () const
 The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception (non-MCS) modes that this WifiPhy(-derived class) can support - a set of modes which is stored by each non-HT PHY.
 
std::list< WifiModeGetModeList (WifiModulationClass modulation) const
 Get the list of supported (non-MCS) modes for the given modulation class (i.e.
 
uint16_t GetNMcs () const
 
uint8_t GetNTxPower () const
 Return the number of available transmission power levels.
 
uint8_t GetNumberOfAntennas () const
 
const WifiPhyOperatingChannelGetOperatingChannel () const
 Get a const reference to the operating channel.
 
WifiPhyBand GetPhyBand () const
 Get the configured Wi-Fi band.
 
Ptr< PhyEntityGetPhyEntity (WifiModulationClass modulation) const
 Get the supported PHY entity corresponding to the modulation class.
 
Ptr< PhyEntityGetPhyEntity (WifiStandard standard) const
 Get the supported PHY entity corresponding to the wifi standard.
 
Ptr< PhyEntityGetPhyEntityForPpdu (const Ptr< const WifiPpdu > ppdu) const
 Get the supported PHY entity to use for a received PPDU.
 
uint8_t GetPhyId () const
 Get the index allocated to this PHY.
 
Time GetPifs () const
 Return the PCF Interframe Space (PIFS) for this PHY.
 
dBm_u GetPower (uint8_t powerLevel) const
 Get the power of the given power level.
 
uint64_t GetPreviouslyRxPpduUid () const
 
uint8_t GetPrimary20Index () const
 
uint8_t GetPrimaryChannelNumber (MHz_u primaryChannelWidth) const
 Get channel number of the primary channel.
 
dB_u GetRxGain () const
 Return the reception gain.
 
dBm_u GetRxSensitivity () const
 Return the receive sensitivity threshold.
 
bool GetShortPhyPreambleSupported () const
 Return whether short PHY preamble is supported.
 
Time GetSifs () const
 Return the Short Interframe Space (SIFS) for this PHY.
 
Time GetSlot () const
 Return the slot duration for this PHY.
 
WifiStandard GetStandard () const
 Get the configured Wi-Fi standard.
 
Ptr< WifiPhyStateHelperGetState () const
 Return the WifiPhyStateHelper of this PHY.
 
Hz_u GetSubcarrierSpacing () const
 
MHz_u GetTxBandwidth (WifiMode mode, MHz_u maxAllowedBandWidth=std::numeric_limits< MHz_u >::max()) const
 Get the bandwidth for a transmission occurring on the current operating channel and using the given WifiMode, subject to the constraint that the TX bandwidth cannot exceed the given maximum allowed value.
 
dB_u GetTxGain () const
 Return the transmission gain.
 
virtual std::tuple< dBr_u, dBr_u, dBr_uGetTxMaskRejectionParams () const =0
 
dBm_u GetTxPowerEnd () const
 Return the maximum available transmission power level.
 
dBm_u GetTxPowerForTransmission (Ptr< const WifiPpdu > ppdu) const
 Compute the transmit power for the next transmission.
 
dBm_u GetTxPowerStart () const
 Return the minimum available transmission power level.
 
bool HasFixedPhyBand () const
 
bool IsMcsSupported (WifiModulationClass modulation, uint8_t mcs) const
 Check if the given MCS of the given modulation class is supported by the PHY.
 
bool IsModeSupported (WifiMode mode) const
 Check if the given WifiMode is supported by the PHY.
 
bool IsReceivingPhyHeader () const
 
bool IsStateCcaBusy () const
 
bool IsStateIdle () const
 
bool IsStateOff () const
 
bool IsStateRx () const
 
bool IsStateSleep () const
 
bool IsStateSwitching () const
 
bool IsStateTx () const
 
void NotifyChannelAccessRequested ()
 Notify the PHY that an access to the channel was requested.
 
void NotifyMonitorSniffRx (Ptr< const WifiPsdu > psdu, MHz_u channelFreq, const WifiTxVector &txVector, SignalNoiseDbm signalNoise, const std::vector< bool > &statusPerMpdu, uint16_t staId=SU_STA_ID)
 Public method used to fire a MonitorSniffer trace for a wifi PSDU being received.
 
void NotifyMonitorSniffTx (Ptr< const WifiPsdu > psdu, MHz_u channelFreq, const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
 Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted.
 
void NotifyRxBegin (Ptr< const WifiPsdu > psdu, const RxPowerWattPerChannelBand &rxPowersW)
 Public method used to fire a PhyRxBegin trace.
 
void NotifyRxDrop (Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason)
 Public method used to fire a PhyRxDrop trace.
 
void NotifyRxEnd (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyRxEnd trace.
 
void NotifyRxPpduDrop (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason)
 Public method used to fire a PhyRxPpduDrop trace.
 
void NotifyTxBegin (const WifiConstPsduMap &psdus, Watt_u txPower)
 Public method used to fire a PhyTxBegin trace.
 
void NotifyTxDrop (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyTxDrop trace.
 
void NotifyTxEnd (const WifiConstPsduMap &psdus)
 Public method used to fire a PhyTxEnd trace.
 
void RegisterListener (const std::shared_ptr< WifiPhyListener > &listener)
 
void ResetCca (bool powerRestricted, dBm_u txPowerMaxSiso=0, dBm_u txPowerMaxMimo=0)
 Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
 
void ResumeFromOff ()
 Resume from off mode.
 
void ResumeFromSleep ()
 Resume from sleep mode.
 
void Send (const WifiConstPsduMap &psdus, const WifiTxVector &txVector)
 
void Send (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.
 
void SetCapabilitiesChangedCallback (Callback< void > callback)
 
void SetCcaEdThreshold (dBm_u threshold)
 Sets the CCA energy detection threshold.
 
void SetCcaSensitivityThreshold (dBm_u threshold)
 Sets the CCA sensitivity threshold.
 
virtual void SetDevice (const Ptr< WifiNetDevice > device)
 Sets the device this PHY is associated with.
 
void SetErrorRateModel (const Ptr< ErrorRateModel > model)
 Sets the error rate model.
 
void SetFixedPhyBand (bool enable)
 Configure whether it is prohibited to change PHY band after initialization.
 
void SetFrameCaptureModel (const Ptr< FrameCaptureModel > frameCaptureModel)
 Sets the frame capture model.
 
virtual void SetInterferenceHelper (const Ptr< InterferenceHelper > helper)
 Sets the interference helper.
 
void SetMaxModulationClassSupported (WifiModulationClass modClass)
 Set the maximum modulation class that has to be supported by this PHY object.
 
void SetMaxSupportedRxSpatialStreams (uint8_t streams)
 
void SetMaxSupportedTxSpatialStreams (uint8_t streams)
 
void SetMobility (const Ptr< MobilityModel > mobility)
 assign a mobility model to this device
 
void SetNTxPower (uint8_t n)
 Sets the number of transmission power levels available between the minimum level and the maximum level.
 
void SetNumberOfAntennas (uint8_t antennas)
 
void SetOffMode ()
 Put in off mode.
 
void SetOperatingChannel (const ChannelSegments &channelSegments)
 This overloaded function is used to pass a list of segments from which the operating channel can be deduced.
 
void SetOperatingChannel (const ChannelTuple &tuple)
 This overloaded function is used when the operating channel consists of a single segment, identified by a tuple.
 
void SetOperatingChannel (const WifiPhyOperatingChannel &channel)
 If the standard for this object has not been set yet, store the channel settings corresponding to the given operating channel.
 
void SetPhyId (uint8_t phyId)
 Set the index allocated to this PHY.
 
void SetPifs (Time pifs)
 Set the PCF Interframe Space (PIFS) for this PHY.
 
void SetPostReceptionErrorModel (const Ptr< ErrorModel > em)
 Attach a receive ErrorModel to the WifiPhy.
 
void SetPreambleDetectionModel (const Ptr< PreambleDetectionModel > preambleDetectionModel)
 Sets the preamble detection model.
 
void SetPreviouslyRxPpduUid (uint64_t uid)
 Set the UID of the previously received PPDU.
 
void SetReceiveErrorCallback (RxErrorCallback callback)
 
void SetReceiveOkCallback (RxOkCallback callback)
 
void SetRxGain (dB_u gain)
 Sets the reception gain.
 
void SetRxNoiseFigure (dB_u noiseFigure)
 Sets the RX loss in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
 
void SetRxSensitivity (dBm_u threshold)
 Sets the receive sensitivity threshold.
 
void SetShortPhyPreambleSupported (bool preamble)
 Enable or disable short PHY preamble.
 
void SetSifs (Time sifs)
 Set the Short Interframe Space (SIFS) for this PHY.
 
void SetSleepMode (bool forceSleepWhileInRx=false)
 Put in sleep mode.
 
void SetSlot (Time slot)
 Set the slot duration for this PHY.
 
void SetTxGain (dB_u gain)
 Sets the transmission gain.
 
void SetTxPowerEnd (dBm_u end)
 Sets the maximum available transmission power level.
 
void SetTxPowerStart (dBm_u start)
 Sets the minimum available transmission power level.
 
void SetWifiRadioEnergyModel (const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
 Sets the wifi radio energy model.
 
void StartReceivePreamble (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration)
 Start receiving the PHY preamble of a PPDU (i.e.
 
virtual void StartTx (Ptr< const WifiPpdu > ppdu)=0
 
void UnregisterListener (const std::shared_ptr< WifiPhyListener > &listener)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static void AddStaticPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
 Add the PHY entity to the map of implemented PHY entities for the given modulation class.
 
static Time CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector)
 
static Time CalculateTxDuration (const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, WifiPhyBand band)
 
static Time CalculateTxDuration (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band)
 This function is a wrapper for the CalculateTxDuration variant that accepts a WifiConstPsduMap as first argument.
 
static Time CalculateTxDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
 
static uint32_t GetMaxPsduSize (WifiModulationClass modulation)
 Get the maximum PSDU size in bytes for the given modulation class.
 
static Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId)
 
static Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype=NORMAL_MPDU, uint16_t staId=SU_STA_ID)
 
static Time GetPreambleDetectionDuration ()
 
static Time GetStartOfPacketDuration (const WifiTxVector &txVector)
 
static const Ptr< const PhyEntityGetStaticPhyEntity (WifiModulationClass modulation)
 Get the implemented PHY entity corresponding to the modulation class.
 
static TypeId GetTypeId ()
 Get the type ID.
 
static WifiConstPsduMap GetWifiConstPsduMap (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void AddPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
 Add the PHY entity to the map of supported PHY entities for the given modulation class for the WifiPhy instance.
 
virtual void DoChannelSwitch ()
 Actually switch channel based on the stored channel settings.
 
void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
std::optional< TimeGetDelayUntilChannelSwitch ()
 Perform any actions necessary when user changes operating channel after initialization.
 
void NotifyCcaBusy (const Ptr< const WifiPpdu > ppdu, Time duration)
 Notify PHY state helper to switch to CCA busy state,.
 
void Reset ()
 Reset data upon end of TX or RX.
 
void SwitchMaybeToCcaBusy (const Ptr< const WifiPpdu > ppdu=nullptr)
 Check if PHY state should move to CCA busy state based on current state of interference tracker.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Protected Attributes

Ptr< Eventm_currentEvent
 Hold the current event.
 
std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > m_currentPreambleEvents
 store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is being received
 
EventId m_endPhyRxEvent
 the end of PHY receive event
 
EventId m_endTxEvent
 the end of transmit event
 
Ptr< InterferenceHelperm_interference
 Pointer to a helper responsible for interference computations.
 
std::map< WifiModulationClass, Ptr< PhyEntity > > m_phyEntities
 This map holds the supported PHY entities.
 
uint8_t m_phyId
 the index of the PHY in the vector of PHYs held by the WifiNetDevice
 
uint64_t m_previouslyRxPpduUid
 UID of the previously received PPDU, reset to UINT64_MAX upon transmission.
 
Ptr< UniformRandomVariablem_random
 Provides uniform random variables.
 
uint32_t m_rxMpduReferenceNumber
 A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU.
 
TracedCallback< Ptr< const WifiPpdu >, const WifiTxVector & > m_signalTransmissionCb
 Signal Transmission callback.
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper.
 
uint32_t m_txMpduReferenceNumber
 A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU.
 

Private Member Functions

void AbortCurrentReception (WifiPhyRxfailureReason reason)
 Due to newly arrived signal, the current reception cannot be continued and has to be aborted.
 
void Configure80211a ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
 
void Configure80211ac ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard.
 
void Configure80211ax ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard.
 
void Configure80211b ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
 
void Configure80211be ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11be standard.
 
void Configure80211g ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
 
void Configure80211n ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
 
void Configure80211p ()
 Configure WifiPhy with appropriate channel frequency and supported rates for 802.11p standard.
 
void ConfigureHtDeviceMcsSet ()
 Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams.
 
virtual void FinalizeChannelSwitch ()=0
 Method that can be overridden by subclasses to perform operations after the channel is actually switched but before the MAC is notified of the channel switch.
 
Ptr< const WifiPsduGetAddressedPsduInPpdu (Ptr< const WifiPpdu > ppdu) const
 Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
 
void PushMcs (WifiMode mode)
 Add the given MCS to the device MCS set.
 
void RebuildMcsMap ()
 Rebuild the mapping of MCS values to indices in the device MCS set.
 
void TxDone (const WifiConstPsduMap &psdus)
 Callback function when a transmission is completed.
 

Static Private Member Functions

static std::map< WifiModulationClass, Ptr< PhyEntity > > & GetStaticPhyEntities ()
 

Private Attributes

Time m_ackTxTime
 estimated Ack TX time
 
WifiPhyBand m_band
 WifiPhyBand.
 
Time m_blockAckTxTime
 estimated BlockAck TX time
 
Callback< void > m_capabilitiesChangedCallback
 Callback when PHY capabilities changed.
 
dBm_u m_ccaEdThreshold
 Clear channel assessment (CCA) energy detection (ED) threshold.
 
dBm_u m_ccaSensitivityThreshold
 Clear channel assessment (CCA) modulation and coding rate sensitivity threshold.
 
bool m_channelAccessRequested
 Flag if channels access has been requested (used for OBSS_PD SR)
 
ChannelSegments m_channelSettings
 Store operating channel settings until initialization.
 
Time m_channelSwitchDelay
 Time required to switch between channel.
 
Ptr< WifiNetDevicem_device
 Pointer to the device.
 
bool m_fixedPhyBand
 True to prohibit changing PHY band after initialization.
 
Ptr< FrameCaptureModelm_frameCaptureModel
 Frame capture model.
 
WifiModulationClass m_maxModClassSupported
 max modulation class supported
 
Ptr< MobilityModelm_mobility
 Pointer to the mobility model.
 
dB_u m_noiseFigure
 The noise figure.
 
bool m_notifyRxMacHeaderEnd
 whether the PHY is capable of notifying MAC header RX end
 
uint8_t m_nTxPower
 Number of available transmission power levels.
 
uint8_t m_numberOfAntennas
 Number of transmitters.
 
WifiPhyOperatingChannel m_operatingChannel
 Operating channel.
 
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm, uint16_t > m_phyMonitorSniffRxTrace
 A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received.
 
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, uint16_t > m_phyMonitorSniffTxTrace
 A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted.
 
TracedCallback< Ptr< const Packet >, RxPowerWattPerChannelBandm_phyRxBeginTrace
 The trace source fired when a packet begins the reception process from the medium.
 
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReasonm_phyRxDropTrace
 The trace source fired when the PHY layer drops a packet it has received.
 
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
 The trace source fired when a packet ends the reception process from the medium.
 
TracedCallback< const WifiMacHeader &, const WifiTxVector &, Timem_phyRxMacHeaderEndTrace
 The trace source fired when the reception of a MAC header ends.
 
TracedCallback< WifiTxVector, Timem_phyRxPayloadBeginTrace
 The trace source fired when the reception of the PHY payload (PSDU) begins.
 
TracedCallback< Ptr< const WifiPpdu >, WifiPhyRxfailureReasonm_phyRxPpduDropTrace
 The trace source fired when the PHY layer drops a packet it has received.
 
TracedCallback< Ptr< const Packet >, doublem_phyTxBeginTrace
 The trace source fired when a packet begins the transmission process on the medium.
 
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
 The trace source fired when the PHY layer drops a packet as it tries to transmit it.
 
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
 The trace source fired when a packet ends the transmission process on the medium.
 
TracedCallback< WifiConstPsduMap, WifiTxVector, doublem_phyTxPsduBeginTrace
 The trace source fired when a PSDU map begins the transmission process on the medium.
 
Time m_pifs
 PCF Interframe Space (PIFS) duration.
 
Ptr< ErrorModelm_postReceptionErrorModel
 Error model for receive packet events.
 
dBm_per_MHz_u m_powerDensityLimit
 the power density limit
 
bool m_powerRestricted
 Flag whether transmit power is restricted by OBSS PD SR.
 
Ptr< PreambleDetectionModelm_preambleDetectionModel
 Preamble detection model.
 
dB_u m_rxGain
 Reception gain.
 
dBm_u m_rxSensitivity
 Receive sensitivity threshold.
 
uint8_t m_rxSpatialStreams
 Number of supported RX spatial streams.
 
bool m_shortPreamble
 Flag if short PHY preamble is supported.
 
Time m_sifs
 Short Interframe Space (SIFS) duration.
 
Time m_slot
 Slot duration.
 
WifiStandard m_standard
 WifiStandard.
 
Time m_timeLastPreambleDetected
 Record the time the last preamble was detected.
 
dB_u m_txGain
 Transmission gain.
 
dBm_u m_txPowerBase
 Minimum transmission power.
 
dBm_u m_txPowerEnd
 Maximum transmission power.
 
dBm_u m_txPowerMaxMimo
 MIMO maximum transmit power due to OBSS PD SR power restriction.
 
dBm_u m_txPowerMaxSiso
 SISO maximum transmit power due to OBSS PD SR power restriction.
 
uint8_t m_txSpatialStreams
 Number of supported TX spatial streams.
 
Ptr< WifiRadioEnergyModelm_wifiRadioEnergyModel
 Wifi radio energy model.
 

Friends

class PhyEntity
 

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::WifiNetDevice/Phys/[i]"

Attributes

  • Antennas: The number of antennas on the device.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • CcaEdThreshold: The energy of all received signals should be higher than this threshold (dBm) in the primary channel to allow the PHY layer to declare CCA BUSY state.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -62
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • CcaSensitivity: The energy of a received wifi signal should be higher than this threshold (dBm) in the primary channel to allow the PHY layer to declare CCA BUSY state.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -82
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Channel: The channel attached to this PHY
  • ChannelNumber: The channel number of the current operating channel.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:233
    • Flags: read
    • Support level: SUPPORTED
  • ChannelSettings: A vector of tuple {channel number, channel width (MHz), PHY band, primary20 index} describing the settings of the operating channel for each segment. The primary20 index (only the value set for the first segment is used) is the index of the primary 20 MHz channel within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency) and is only valid if the width of the operating channel is a multiple of 20 MHz. If the standard for this object has not been set yet, the value of this attribute is saved and will be used to set the operating channel when the standard is configured. If the PHY band is left unspecified, the default band for the configured standard is used. If the channel width and the channel number are both 0, the default channel width for the configured standard and band are used. If the channel number is 0, the default channel number for the configured standard, band and channel width is used. Note that the channel width can be left unspecified (0) if the channel number uniquely identify a frequency channel for the given standard and band.
  • ChannelSwitchDelay: Delay between two short frames transmitted on different frequencies.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+9.22337e+18ns
    • Initial value: +250000ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • ChannelWidth: The width in MHz of the current operating channel (5, 10, 20, 22, 40, 80 or 160). If 80+80MHz is used, this corresponds to the total channel width, hence 160 MHz.
    • Set with class: ns3::UintegerValue
    • Underlying type: double 5:160
    • Flags: read
    • Support level: SUPPORTED
  • FixedPhyBand: If set to true, changing PHY band is prohibited after initialization.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • FrameCaptureModel: Ptr to an object that implements the frame capture model
  • Frequency: The center frequency (MHz) of the current operating channel.
    • Set with class: ns3::UintegerValue
    • Underlying type: int64_t 9223372036854775808:9223372036854775807
    • Flags: read
    • Support level: SUPPORTED
  • InterferenceHelper: Ptr to an object that implements the interference helper
  • 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: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED
  • NotifyMacHdrRxEnd: Whether the PHY is capable of notifying the MAC about the end of the reception of the MAC header of every MPDU.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Pifs: The duration of the PCF Interframe Space. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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.
  • PowerDensityLimit: The mean equivalent isotropically radiated power densitylimit (in dBm/MHz) set by regulators.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 100
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • PreambleDetectionModel: Ptr to an object that implements the preamble detection model
  • Primary20MHzIndex: The index of the primary 20 MHz channel within the current operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:7
    • Flags: read
    • Support level: SUPPORTED
  • RxGain: Reception gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwrite
    • Support level: SUPPORTED
  • RxSensitivity: The energy of a received signal should be higher than this threshold (dBm) for the PHY to detect the signal. This threshold refers to a width of 20 MHz and will be scaled to match the width of the received signal.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -101
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Sifs: The duration of the Short Interframe Space. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Slot: The duration of a slot. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • State: The state of the PHY layer.
  • TxGain: Transmission gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED

TraceSources

  • MonitorSnifferRx: Trace source simulating a wifi device in monitor mode sniffing all received frames
    • Callback signature: ns3::WifiPhy::MonitorSnifferRxTracedCallback
    • Support level: SUPPORTED
  • MonitorSnifferTx: Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted
    • Callback signature: ns3::WifiPhy::MonitorSnifferTxTracedCallback
    • Support level: SUPPORTED
  • PhyRxBegin: Trace source indicating a packet has begun being received from the channel medium by the device
  • PhyRxDrop: Trace source indicating a packet has been dropped by the device during reception
  • PhyRxEnd: Trace source indicating a packet has been completely received from the channel medium by the device
  • PhyRxMacHeaderEnd: Trace source indicating the MAC header of an MPDU has been completely received.
  • PhyRxPayloadBegin: Trace source indicating the reception of the payload of a PPDU has begun
  • PhyRxPpduDrop: Trace source indicating a ppdu has been dropped by the device during reception
  • PhyTxBegin: Trace source indicating a packet has begun transmitting over the medium; the packet holds a single MPDU even if the MPDU is transmitted within an A-MPDU (in which case this trace fires for each MPDU in the A-MPDU).
  • PhyTxDrop: Trace source indicating a packet has been dropped by the device during transmission
  • PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel.
  • PhyTxPsduBegin: Trace source indicating a PSDU has begun transmitting over the channel medium; this trace returns a WifiConstPsduMap with a single element (in the case of SU PPDU) or multiple elements (in the case of MU PPDU)
  • SignalTransmission: Trace start of signal transmission

Group: Wifi

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

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

Member Typedef Documentation

◆ ChannelSegments

Initial value:
std::vector<ChannelTuple>

segments identifying an operating channel

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

◆ ChannelTuple

Initial value:
std::tuple<uint8_t ,
uint8_t >
WifiPhyBand
Identifies the PHY band.
double MHz_u
MHz weak type.
Definition wifi-units.h:31

Tuple identifying a segment of an operating channel.

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

◆ MonitorSnifferRxCallback

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

TracedCallback signature for monitor mode receive events.

Parameters
packetthe packet being received
channelFreqthe frequency 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
staIdthe STA-ID
Todo
WifiTxVector should be passed by const reference because of its size.

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

◆ MonitorSnifferTxCallback

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

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)
staIdthe STA-ID
Todo
WifiTxVector should be passed by const reference because of its size.

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

◆ PhyRxBeginTracedCallback

typedef void(* ns3::WifiPhy::PhyRxBeginTracedCallback) (Ptr< const Packet > packet, RxPowerWattPerChannelBand rxPowersW)

TracedCallback signature for PhyRxBegin trace source.

Parameters
packetthe packet being received
rxPowersWthe receive power per channel band in Watts

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

◆ PhyRxMacHeaderEndTracedCallback

typedef void(* ns3::WifiPhy::PhyRxMacHeaderEndTracedCallback) (const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration)

TracedCallback signature for end of MAC header reception events.

Parameters
macHdrthe MAC header of the MPDU being received
txVectorthe TXVECTOR used to transmit the PSDU
psduDurationthe remaining duration of the PSDU

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

◆ PhyRxPayloadBeginTracedCallback

typedef void(* ns3::WifiPhy::PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration)

TracedCallback signature for start of PSDU reception events.

Parameters
txVectorthe TXVECTOR decoded from the PHY header
psduDurationthe duration of the PSDU

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

◆ PhyRxPpduDropTracedCallback

typedef void(* ns3::WifiPhy::PhyRxPpduDropTracedCallback) (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason)

TracedCallback signature for start of PSDU reception events.

Parameters
txVectorthe TXVECTOR decoded from the PHY header
psduDurationthe duration of the PSDU

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

◆ PhyTxBeginTracedCallback

typedef void(* ns3::WifiPhy::PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW)

TracedCallback signature for Phy transmit events.

Parameters
packetthe packet being transmitted
txPowerWthe transmit power in Watts

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

◆ PsduTxBeginCallback

typedef void(* ns3::WifiPhy::PsduTxBeginCallback) (WifiConstPsduMap psduMap, const WifiTxVector &txVector, double txPowerW)

TracedCallback signature for PSDU transmit events.

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

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

◆ SignalTransmissionCallback

typedef void(* ns3::WifiPhy::SignalTransmissionCallback) (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector)

Callback invoked when the PHY model starts to transmit a signal.

Parameters
ppduThe PPDU being transmitted
txVectortxVector used for transmitting the PPDU

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

Constructor & Destructor Documentation

◆ WifiPhy()

ns3::WifiPhy::WifiPhy ( )

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

References ns3::CreateObject(), m_random, m_state, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ ~WifiPhy()

ns3::WifiPhy::~WifiPhy ( )
override

Definition at line 405 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 2229 of file wifi-phy.cc.

References NS_LOG_FUNCTION, ns3::OBSS_PD_CCA_RESET, ns3::RECEPTION_ABORTED_BY_TX, and ns3::SIGNAL_DETECTION_ABORTED_BY_TX.

Referenced by ns3::PhyEntity::AbortCurrentReception(), and GetDelayUntilChannelSwitch().

+ Here is the caller graph for this function:

◆ AddPhyEntity()

void ns3::WifiPhy::AddPhyEntity ( WifiModulationClass modulation,
Ptr< PhyEntity > phyEntity )
protected

Add the PHY entity to the map of supported PHY entities for the given modulation class for the WifiPhy instance.

This is a wrapper method used to check that the PHY entity is in the static map of implemented PHY entities (

See also
GetStaticPhyEntities). In addition, child classes can add their own PHY entities.
Parameters
modulationthe modulation class
phyEntitythe PHY entity

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

References GetStaticPhyEntities(), m_phyEntities, NS_ABORT_MSG_IF, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by Configure80211a(), Configure80211ac(), Configure80211ax(), Configure80211b(), Configure80211be(), Configure80211g(), Configure80211n(), and Configure80211p().

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

◆ AddStaticPhyEntity()

void ns3::WifiPhy::AddStaticPhyEntity ( WifiModulationClass modulation,
Ptr< PhyEntity > phyEntity )
static

Add the PHY entity to the map of implemented PHY entities for the given modulation class.

Through this method, child classes can add their own PHY entities in a static manner.

Parameters
modulationthe modulation class
phyEntitythe PHY entity

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

References GetStaticPhyEntities(), and NS_ASSERT_MSG.

Referenced by anonymous_namespace{dsss-phy.cc}::ConstructorDsss::ConstructorDsss(), anonymous_namespace{eht-phy.cc}::ConstructorEht::ConstructorEht(), anonymous_namespace{erp-ofdm-phy.cc}::ConstructorErpOfdm::ConstructorErpOfdm(), anonymous_namespace{he-phy.cc}::ConstructorHe::ConstructorHe(), anonymous_namespace{ht-phy.cc}::ConstructorHt::ConstructorHt(), anonymous_namespace{ofdm-phy.cc}::ConstructorOfdm::ConstructorOfdm(), and anonymous_namespace{vht-phy.cc}::ConstructorVht::ConstructorVht().

+ Here is the call graph for this function:
+ 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 2345 of file wifi-phy.cc.

References NS_LOG_FUNCTION.

Referenced by TestMultipleHeTbPreambles::DoRun(), TestUlOfdmaPpduUid::DoRun(), TestWifiPhyRxTraceHelperYans::DoRun(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestDlMuMimoPhyTransmission::RunOne(), TestDlOfdmaPhyPuncturing::RunOne(), TestDlOfdmaPhyTransmission::RunOne(), TestUlMuMimoPhyTransmission::RunOne(), and TestUlOfdmaPhyTransmission::RunOne().

+ Here is the caller graph for this function:

◆ CalculatePhyPreambleAndHeaderDuration()

Time ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration ( const 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 1580 of file wifi-phy.cc.

References ns3::WifiTxVector::GetModulationClass().

Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), ns3::InterferenceHelper::CalculatePayloadPer(), EmlsrUlTxopTest::CheckQosFrames(), WifiTxopTest::CheckResults(), ns3::DsssPpdu::GetTxDuration(), ns3::VhtPpdu::GetTxDuration(), ns3::HePhy::GetValidPpduDuration(), ns3::FrameExchangeManager::SendMpdu(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::FrameExchangeManager::SendRts(), ns3::DsssPpdu::SetDsssHeader(), ns3::VhtPpdu::SetVhtSigHeader(), BackoffGenerationTest::Transmit(), and ns3::FrameExchangeManager::UpdateNav().

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

◆ CalculateSnr()

double ns3::WifiPhy::CalculateSnr ( const 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 745 of file wifi-phy.cc.

References m_interference.

◆ CalculateTxDuration() [1/3]

Time ns3::WifiPhy::CalculateTxDuration ( const WifiConstPsduMap & psduMap,
const WifiTxVector & txVector,
WifiPhyBand band )
static
Parameters
psduMapthe PSDU(s) to transmit indexed by STA-ID
txVectorthe TXVECTOR used for the transmission of the PPDU
bandthe frequency band being used
Returns
the total amount of time this PHY will stay busy for the transmission of the PPDU

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

References ns3::WifiTxVector::GetModulationClass().

+ Here is the call graph for this function:

◆ CalculateTxDuration() [2/3]

Time ns3::WifiPhy::CalculateTxDuration ( Ptr< const WifiPsdu > psdu,
const WifiTxVector & txVector,
WifiPhyBand band )
static

This function is a wrapper for the CalculateTxDuration variant that accepts a WifiConstPsduMap as first argument.

This function inserts the given PSDU in a WifiConstPsduMap along with a STA-ID value that is determined based on whether the given PSDU has to be transmitted as a DL or UL frame, thus allowing to properly calculate the TX duration in case the PSDU has to be transmitted as an UL frame.

Parameters
psduthe PSDU to transmit
txVectorthe TXVECTOR used for the transmission of the PSDU
bandthe frequency band
Returns
the total amount of time this PHY will stay busy for the transmission of the PPDU

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

◆ CalculateTxDuration() [3/3]

Time ns3::WifiPhy::CalculateTxDuration ( uint32_t size,
const WifiTxVector & txVector,
WifiPhyBand band,
uint16_t staId = SU_STA_ID )
static
Parameters
sizethe number of bytes in the packet to send
txVectorthe TXVECTOR used for the transmission of this packet
bandthe frequency band being used
staIdthe STA-ID of the recipient (only used for MU)
Returns
the total amount of time this PHY will stay busy for the transmission of these bytes.

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

References ns3::Time::IsStrictlyPositive(), ns3::NORMAL_MPDU, and NS_ASSERT.

Referenced by ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::HePhy::CalculateTxDuration(), ns3::PhyEntity::CalculateTxDuration(), TxDurationTest::CalculateTxDurationUsingList(), EmlsrDlTxopTest::CheckApEmlNotificationFrame(), EmlsrDlTxopTest::CheckBlockAck(), EmlsrUlTxopTest::CheckBlockAck(), MultiLinkMuTxTest::CheckBlockAck(), MultiLinkTxTest::CheckBlockAck(), EmlsrUlTxopTest::CheckCtsFrames(), EmlOmnExchangeTest::CheckEmlNotification(), EmlsrDlTxopTest::CheckInitialControlFrame(), EmlsrLinkSwitchTest::CheckInitialControlFrame(), MultiLinkSetupTest::CheckQosData(), EmlsrDlTxopTest::CheckQosFrames(), EmlsrUlTxopTest::CheckQosFrames(), EmlsrDlTxopTest::CheckResults(), EmlsrUlTxopTest::CheckResults(), EmlsrDlTxopTest::CheckStaEmlNotificationFrame(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), WifiPrimaryChannelsTest::DoSetup(), ns3::FrameExchangeManager::ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), ns3::DefaultApEmlsrManager::GetDelayOnTxPsduNotForEmlsr(), ns3::RrMultiUserScheduler::GetExtraTimeForBsrpTfDurationId(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::HeFrameExchangeManager::GetMuRtsDurationId(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), ns3::FrameExchangeManager::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), ns3::ApWifiMac::ReceiveEmlOmn(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), TestMultipleHeTbPreambles::RxHeTbPpdu(), TestMultiUserScheduler::SelectTxFormat(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpdu(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::FrameExchangeManager::SendNormalAck(), SpectrumWifiPhyMultipleInterfacesTest::SendPpdu(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::FrameExchangeManager::SendRts(), TestUlOfdmaPpduUid::SendTbPpdu(), WifiRetransmitTest::SetEvents(), ns3::StaWifiMac::SetPmModeAfterAssociation(), BackoffGenerationTest::Transmit(), EmlsrDlTxopTest::Transmit(), EmlsrOperationsTestBase::Transmit(), EmlsrUlOfdmaTest::Transmit(), MultiLinkMuTxTest::Transmit(), OfdmaAckSequenceTest::Transmit(), StartSeqNoUpdateAfterAddBaTimeoutTest::Transmit(), WifiChannelSwitchingTest::Transmit(), WifiTxopTest::Transmit(), WifiUseAvailBwTest::Transmit(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::FrameExchangeManager::UpdateNav().

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

◆ Configure80211a()

void ns3::WifiPhy::Configure80211a ( )
private

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

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

References AddPhyEntity(), ns3::Create(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_LOG_FUNCTION, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.

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 ( )
private

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

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

References AddPhyEntity(), Configure80211n(), ns3::Create(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_VHT.

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 ( )
private

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

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

References AddPhyEntity(), Configure80211ac(), Configure80211n(), ns3::Create(), m_band, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PHY_BAND_2_4GHZ.

Referenced by Configure80211be(), and ConfigureStandard().

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

◆ Configure80211b()

void ns3::WifiPhy::Configure80211b ( )
private

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

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

References AddPhyEntity(), ns3::Create(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_LOG_FUNCTION, SetPifs(), SetSifs(), SetSlot(), ns3::WIFI_MOD_CLASS_DSSS, and ns3::WIFI_MOD_CLASS_HR_DSSS.

Referenced by Configure80211g(), and ConfigureStandard().

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

◆ Configure80211be()

void ns3::WifiPhy::Configure80211be ( )
private

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

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

References AddPhyEntity(), Configure80211ax(), ns3::Create(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_EHT.

Referenced by ConfigureStandard().

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

◆ Configure80211g()

void ns3::WifiPhy::Configure80211g ( )
private

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

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

References AddPhyEntity(), Configure80211b(), ns3::Create(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_ERP_OFDM.

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 ( )
private

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

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

References AddPhyEntity(), Configure80211a(), Configure80211g(), ns3::Create(), m_band, m_blockAckTxTime, m_txSpatialStreams, ns3::MicroSeconds(), NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HT, and ns3::WIFI_PHY_BAND_2_4GHZ.

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

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

◆ Configure80211p()

void ns3::WifiPhy::Configure80211p ( )
private

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

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

References AddPhyEntity(), ns3::Create(), GetChannelWidth(), GetSifs(), GetSlot(), m_ackTxTime, ns3::MicroSeconds(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::OFDM_PHY_10_MHZ, ns3::OFDM_PHY_5_MHZ, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.

Referenced by ConfigureStandard().

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

◆ ConfigureHtDeviceMcsSet()

void ns3::WifiPhy::ConfigureHtDeviceMcsSet ( )
private

Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams.

◆ ConfigureStandard()

void ns3::WifiPhy::ConfigureStandard ( WifiStandard standard)
virtual

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

Note that, in case a Spectrum PHY is used, this method must be called after adding a spectrum channel covering the operating channel bandwidth.

Parameters
standardthe Wi-Fi standard

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

References Configure80211a(), Configure80211ac(), Configure80211ax(), Configure80211b(), Configure80211be(), Configure80211g(), Configure80211n(), Configure80211p(), ns3::GetModulationClassForStandard(), ns3::WifiPhyOperatingChannel::IsSet(), m_channelSettings, m_maxModClassSupported, m_operatingChannel, m_phyEntities, m_standard, NS_ABORT_MSG_IF, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, SetOperatingChannel(), ns3::WIFI_MOD_CLASS_UNKNOWN, ns3::WIFI_STANDARD_80211a, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211b, ns3::WIFI_STANDARD_80211be, ns3::WIFI_STANDARD_80211g, ns3::WIFI_STANDARD_80211n, ns3::WIFI_STANDARD_80211p, and ns3::WIFI_STANDARD_UNSPECIFIED.

Referenced by Bug2831TestCase::DoRun(), SpectrumWifiPhyFilterTest::DoSetup(), SpectrumWifiPhyTrackedBandsTest::DoSetup(), TestDlMuMimoPhyTransmission::DoSetup(), TestDlOfdmaPhyPuncturing::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlMuMimoPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), and TestWifiPhyRxTraceHelperYans::DoSetup().

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

◆ ConvertIndicesToFrequencies()

virtual WifiSpectrumBandFrequencies ns3::WifiPhy::ConvertIndicesToFrequencies ( const WifiSpectrumBandIndices & indices) const
pure virtual

This is a helper function to convert start and stop indices to start and stop frequencies.

Parameters
indicesthe start/stop indices to convert
Returns
the converted frequencies

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

Referenced by ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), and ns3::HePhy::GetRuBandForTx().

+ Here is the caller graph for this function:

◆ DoChannelSwitch()

void ns3::WifiPhy::DoChannelSwitch ( )
protectedvirtual

Actually switch channel based on the stored channel settings.

Reimplemented in ns3::SpectrumWifiPhy.

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

References ns3::WifiPhyOperatingChannel::GetDefaultChannelNumber(), ns3::GetDefaultChannelWidth(), ns3::GetDefaultPhyBand(), ns3::Object::IsInitialized(), m_band, m_channelAccessRequested, m_channelSettings, m_fixedPhyBand, m_powerRestricted, m_standard, NS_ABORT_MSG_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WIFI_PHY_BAND_UNSPECIFIED.

Referenced by ns3::SpectrumWifiPhy::DoChannelSwitch(), and SetOperatingChannel().

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

◆ DoDispose()

void ns3::WifiPhy::DoDispose ( )
overrideprotectedvirtual

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::YansWifiPhy.

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

References m_device, m_frameCaptureModel, m_interference, m_mobility, m_phyEntities, m_postReceptionErrorModel, m_preambleDetectionModel, m_random, m_state, m_wifiRadioEnergyModel, NS_LOG_FUNCTION, and Reset().

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

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

◆ DoInitialize()

void ns3::WifiPhy::DoInitialize ( )
overrideprotectedvirtual

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.

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

References m_device, m_mobility, NS_ABORT_MSG_UNLESS, NS_LOG_FUNCTION, and NS_LOG_WARN.

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

+ Here is the caller graph for this function:

◆ EndReceiveInterBss()

void ns3::WifiPhy::EndReceiveInterBss ( )

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

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

References NS_LOG_FUNCTION.

◆ FinalizeChannelSwitch()

virtual void ns3::WifiPhy::FinalizeChannelSwitch ( )
privatepure virtual

Method that can be overridden by subclasses to perform operations after the channel is actually switched but before the MAC is notified of the channel switch.

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

◆ GetAckTxTime()

Time ns3::WifiPhy::GetAckTxTime ( ) const

Return the estimated Ack TX time for this PHY.

Returns
the estimated Ack TX time

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

References m_ackTxTime.

Referenced by ns3::MinstrelWifiManager::CalculateTimeUnicastPacket(), and ns3::ChannelAccessManager::GetEifsNoDifs().

+ Here is the caller graph for this function:

◆ GetAddressedPsduInPpdu()

Ptr< const WifiPsdu > ns3::WifiPhy::GetAddressedPsduInPpdu ( Ptr< const WifiPpdu > ppdu) const
private

Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).

Parameters
ppduthe PPDU to extract the PSDU from
Returns
the PSDU addressed to that PHY

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

◆ GetBand()

virtual WifiSpectrumBandInfo ns3::WifiPhy::GetBand ( MHz_u bandWidth,
uint8_t bandIndex = 0 )
pure virtual

Get the info of a given band.

Parameters
bandWidththe width of the band to be returned
bandIndexthe index of the band to be returned
Returns
the info that defines the band

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

Referenced by ns3::HePhy::GetPer20MHzDurations(), ns3::PhyEntity::GetPrimaryBand(), and ns3::PhyEntity::GetSecondaryBand().

+ Here is the caller graph for this function:

◆ GetBlockAckTxTime()

Time ns3::WifiPhy::GetBlockAckTxTime ( ) const

Return the estimated BlockAck TX time for this PHY.

Returns
the estimated BlockAck TX time

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

References m_blockAckTxTime.

Referenced by ns3::MinstrelHtWifiManager::CalculateRetransmits().

+ Here is the caller graph for this function:

◆ GetBssMembershipSelectorList()

std::list< uint8_t > ns3::WifiPhy::GetBssMembershipSelectorList ( ) 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 inside HT PHY (and above) instances.

Returns
the list of BSS membership selectors.

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

References list.

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

+ Here is the caller graph for this function:

◆ GetCcaEdThreshold()

dBm_u ns3::WifiPhy::GetCcaEdThreshold ( ) const

Return the CCA energy detection threshold.

Returns
the CCA energy detection threshold

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

References m_ccaEdThreshold.

Referenced by ns3::PhyEntity::GetCcaThreshold(), ns3::VhtPhy::GetCcaThreshold(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetCcaSensitivityThreshold()

dBm_u ns3::WifiPhy::GetCcaSensitivityThreshold ( ) const

Return the CCA sensitivity threshold.

Returns
the CCA sensitivity threshold

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

References m_ccaSensitivityThreshold.

Referenced by ns3::OfdmPhy::GetCcaThreshold(), ns3::PhyEntity::GetCcaThreshold(), ns3::VhtPhy::GetCcaThreshold(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetChannel()

virtual Ptr< Channel > ns3::WifiPhy::GetChannel ( ) 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 GetTypeId().

+ Here is the caller graph for this function:

◆ GetChannelNumber()

uint8_t ns3::WifiPhy::GetChannelNumber ( ) const

Return current channel number.

Returns
the current channel number

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

References ns3::WifiPhyOperatingChannel::GetNumber(), and m_operatingChannel.

Referenced by ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), GetTypeId(), and ns3::PhyEntity::Transmit().

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

◆ GetChannelSwitchDelay()

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

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

References m_channelSwitchDelay.

◆ GetChannelWidth()

◆ GetCurrentFrequencyRange()

virtual FrequencyRange ns3::WifiPhy::GetCurrentFrequencyRange ( ) const
pure virtual

Get the frequency range of the current RF interface.

Returns
the frequency range of the current RF interface

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

Referenced by ns3::PhyEntity::CreateInterferenceEvent(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::NotifyInterferenceRxEndAndClear(), ns3::PhyEntity::ResetReceive(), and ns3::PhyEntity::StartPreambleDetectionPeriod().

+ Here is the caller graph for this function:

◆ GetDefaultMode()

WifiMode ns3::WifiPhy::GetDefaultMode ( ) const

Get the default WifiMode supported by the PHY.

This is the first mode to be added (i.e. the lowest one over all supported PHY entities).

Returns
the default WifiMode

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

References NS_ASSERT_MSG.

◆ GetDelayUntilChannelSwitch()

std::optional< Time > ns3::WifiPhy::GetDelayUntilChannelSwitch ( )
protected

Perform any actions necessary when user changes operating channel after initialization.

Returns
the amount of time to wait until the channel switch can be performed or std::nullopt if channel switch is currently not possible (i.e., the radio is in sleep mode)

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

References AbortCurrentReception(), ns3::CCA_BUSY, ns3::CHANNEL_SWITCHING, GetDelayUntilIdle(), ns3::IDLE, ns3::Object::IsInitialized(), m_state, NS_ASSERT, NS_LOG_DEBUG, Reset(), ns3::RX, ns3::Seconds(), ns3::SLEEP, ns3::SWITCHING, and ns3::TX.

Referenced by SetOperatingChannel().

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

◆ GetDelayUntilIdle()

Time ns3::WifiPhy::GetDelayUntilIdle ( )
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 2197 of file wifi-phy.cc.

Referenced by GetDelayUntilChannelSwitch().

+ Here is the caller graph for this function:

◆ GetDevice()

◆ GetFrequency()

MHz_u ns3::WifiPhy::GetFrequency ( ) const
Returns
the operating center frequency

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

References ns3::WifiPhyOperatingChannel::GetFrequency(), and m_operatingChannel.

Referenced by ns3::PhyEntity::EndReceivePayload(), ns3::HePhy::GetPer20MHzDurations(), and GetTypeId().

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

◆ GetGuardBandwidth()

virtual MHz_u ns3::WifiPhy::GetGuardBandwidth ( MHz_u currentChannelWidth) const
pure virtual
Parameters
currentChannelWidthchannel width of the current transmission
Returns
the width of the guard band

Note: in order to properly model out of band transmissions for OFDM, the guard band has been configured so as to expand the modeled spectrum up to the outermost referenced point in "Transmit spectrum mask" sections' PSDs of each PHY specification of 802.11-2016 standard. It thus ultimately corresponds to the current channel bandwidth (which can be different from devices max channel width).

This method is only relevant for SpectrumWifiPhy.

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

Referenced by ns3::PhyEntity::GetGuardBandwidth().

+ Here is the caller graph for this function:

◆ GetLastRxEndTime()

Time ns3::WifiPhy::GetLastRxEndTime ( ) const

Return the end time of the last received packet.

Returns
the end time of the last received packet

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

Referenced by ns3::HePhy::DoEndReceivePayload(), and ns3::PhyEntity::DoEndReceivePayload().

+ Here is the caller graph for this function:

◆ GetLastRxStartTime()

Time ns3::WifiPhy::GetLastRxStartTime ( ) const

Return the start time of the last received packet.

Returns
the start time of the last received packet

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

◆ GetLatestPhyEntity()

Ptr< PhyEntity > ns3::WifiPhy::GetLatestPhyEntity ( ) const

Get the latest PHY entity supported by this PHY instance.

Returns
the latest PHY entity supported by this PHY instance

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

References GetPhyEntity(), and m_standard.

Referenced by ns3::ErpOfdmPhy::BuildPpdu(), ns3::OfdmPhy::BuildPpdu(), ns3::SpectrumWifiPhy::CanStartRx(), OfdmaSpectrumWifiPhy::GetHePhy(), GetPhyEntityForPpdu(), TestMultipleHeTbPreambles::RxHeTbPpdu(), TestPhyPaddingExclusion::SetTrigVector(), and TestUlOfdmaPhyTransmission::SetTrigVector().

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

◆ GetMaxModulationClassSupported()

WifiModulationClass ns3::WifiPhy::GetMaxModulationClassSupported ( ) const
Returns
the maximum modulation class that has to be supported by this PHY object.

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

References m_maxModClassSupported.

◆ GetMaxPsduSize()

uint32_t ns3::WifiPhy::GetMaxPsduSize ( WifiModulationClass modulation)
static

Get the maximum PSDU size in bytes for the given modulation class.

Parameters
modulationthe modulation class
Returns
the maximum PSDU size in bytes for the given modulation class

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

Referenced by ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits().

+ Here is the caller graph for this function:

◆ GetMaxSupportedRxSpatialStreams()

uint8_t ns3::WifiPhy::GetMaxSupportedRxSpatialStreams ( ) const
Returns
the maximum number of supported RX spatial streams

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

Referenced by ns3::ApWifiMac::GetEhtOperation(), ns3::ApWifiMac::GetHeOperation(), GetTypeId(), ns3::HePhy::IsConfigSupported(), and ns3::HtPhy::IsConfigSupported().

+ Here is the caller graph for this function:

◆ GetMaxSupportedTxSpatialStreams()

uint8_t ns3::WifiPhy::GetMaxSupportedTxSpatialStreams ( ) const
Returns
the maximum number of supported TX spatial streams

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

Referenced by ns3::IdealWifiManager::BuildSnrThresholds(), GetTypeId(), and ns3::ThompsonSamplingWifiManager::InitializeStation().

+ Here is the caller graph for this function:

◆ GetMcs()

WifiMode ns3::WifiPhy::GetMcs ( WifiModulationClass modulation,
uint8_t mcs ) const

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

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

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

References NS_ASSERT_MSG.

◆ GetMcsList() [1/2]

std::list< WifiMode > ns3::WifiPhy::GetMcsList ( ) const

The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indices that this WifiPhy(-derived class) can support - a set of MCS indices which is stored by each HT PHY (and above).

Returns
the list of supported MCSs.

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

References list.

Referenced by ns3::WifiRemoteStationManager::AddAllSupportedMcs(), ns3::IdealWifiManager::BuildSnrThresholds(), ns3::WifiRemoteStationManager::GetControlAnswerMode(), ns3::MinstrelHtWifiManager::GetDeviceMcsList(), ns3::ThompsonSamplingWifiManager::InitializeStation(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the caller graph for this function:

◆ GetMcsList() [2/2]

std::list< WifiMode > ns3::WifiPhy::GetMcsList ( WifiModulationClass modulation) const

Get the list of supported MCSs for the given modulation class (i.e.

corresponding to a given PHY entity).

Parameters
modulationthe modulation class
Returns
the list of supported MCSs for the given modulation class.
See also
GetMcsList ()

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

References list.

◆ GetMobility()

Ptr< MobilityModel > ns3::WifiPhy::GetMobility ( ) const

Return the mobility model this PHY is associated with.

This method will return either the mobility model that has been explicitly set by a call to YansWifiPhy::SetMobility(), or else will return the mobility model (if any) that has been aggregated to the node.

Returns
the mobility model this PHY is associated with

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

References m_mobility.

◆ GetModeList() [1/2]

std::list< WifiMode > ns3::WifiPhy::GetModeList ( ) const

The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception (non-MCS) modes that this WifiPhy(-derived class) can support - a set of modes which is stored by each non-HT PHY.

It is important to note that this list is a superset (not necessarily proper) of the OperationalRateSet (which is logically, if not actually, a property of the associated WifiRemoteStationManager), which itself is a superset (again, not necessarily proper) of the BSSBasicRateSet.

Returns
the list of supported (non-MCS) modes.

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

References list.

Referenced by ns3::WifiRemoteStationManager::AddAllSupportedModes(), ns3::IdealWifiManager::BuildSnrThresholds(), ns3::MinstrelHtWifiManager::DoGetRtsTxVector(), ns3::MeshWifiInterfaceMac::Enqueue(), ns3::WifiRemoteStationManager::GetControlAnswerMode(), ns3::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), ns3::StaWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::Receive(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the caller graph for this function:

◆ GetModeList() [2/2]

std::list< WifiMode > ns3::WifiPhy::GetModeList ( WifiModulationClass modulation) const

Get the list of supported (non-MCS) modes for the given modulation class (i.e.

corresponding to a given PHY entity).

Parameters
modulationthe modulation class
Returns
the list of supported (non-MCS) modes for the given modulation class.
See also
GetModeList ()

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

References list.

◆ GetNMcs()

uint16_t ns3::WifiPhy::GetNMcs ( ) const
Returns
the number of supported MCSs.
See also
GetMcsList ()

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

◆ GetNTxPower()

uint8_t ns3::WifiPhy::GetNTxPower ( ) const

Return the number of available transmission power levels.

Returns
the number of available transmission power levels

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

References m_nTxPower.

◆ GetNumberOfAntennas()

uint8_t ns3::WifiPhy::GetNumberOfAntennas ( ) const
Returns
the number of antennas on this device

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

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetOperatingChannel()

◆ GetPayloadDuration() [1/2]

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

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

References ns3::WifiTxVector::GetModulationClass().

+ Here is the call graph for this function:

◆ GetPayloadDuration() [2/2]

Time ns3::WifiPhy::GetPayloadDuration ( uint32_t size,
const WifiTxVector & txVector,
WifiPhyBand band,
MpduType mpdutype = NORMAL_MPDU,
uint16_t staId = SU_STA_ID )
static
Parameters
sizethe number of bytes in the packet to send
txVectorthe TXVECTOR used for the transmission of this packet
bandthe frequency band
mpdutypethe type of the MPDU as defined in WifiPhy::MpduType.
staIdthe STA-ID of the PSDU (only used for MU PPDUs)
Returns
the duration of the PSDU

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

Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), and ns3::PhyEntity::ScheduleEndOfMpdus().

+ Here is the caller graph for this function:

◆ GetPhyBand()

WifiPhyBand ns3::WifiPhy::GetPhyBand ( ) const

Get the configured Wi-Fi band.

Returns
the Wi-Fi band that has been configured

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

References m_band.

Referenced by ns3::WifiRemoteStationManager::AdjustTxVectorForIcf(), ns3::IdealWifiManager::BuildSnrThresholds(), ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::ChannelAccessManager::DoGrantDcfAccess(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), ns3::HePhy::DoStartReceivePayload(), ns3::FrameExchangeManager::ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::QosFrameExchangeManager::GetCtsToSelfDurationId(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::QosFrameExchangeManager::GetFrameDurationId(), ns3::WifiRemoteStationManager::GetHtSupported(), ns3::HeFrameExchangeManager::GetMuRtsDurationId(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::QosFrameExchangeManager::GetRtsDurationId(), ns3::FrameExchangeManager::GetTxDuration(), ns3::WifiRemoteStationManager::GetVhtSupported(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), TestMultipleHeTbPreambles::RxHeTbPpdu(), ns3::PhyEntity::ScheduleEndOfMpdus(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::FrameExchangeManager::SendCtsToSelf(), ns3::FrameExchangeManager::SendMpdu(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::FrameExchangeManager::SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), ns3::FrameExchangeManager::SendRts(), TestUlOfdmaPpduUid::SendTbPpdu(), TestPhyPaddingExclusion::SetTrigVector(), TestUlMuMimoPhyTransmission::SetTrigVector(), TestUlOfdmaPhyTransmission::SetTrigVector(), ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(), and ns3::FrameExchangeManager::UpdateNav().

+ Here is the caller graph for this function:

◆ GetPhyEntity() [1/2]

Ptr< PhyEntity > ns3::WifiPhy::GetPhyEntity ( WifiModulationClass modulation) const

Get the supported PHY entity corresponding to the modulation class.

Parameters
modulationthe modulation class
Returns
the pointer to the supported PHY entity

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

References m_phyEntities, and NS_ABORT_MSG_IF.

Referenced by ns3::EhtFrameExchangeManager::ForwardPsduDown(), GetLatestPhyEntity(), GetPhyEntity(), GetPhyEntityForPpdu(), TestUlOfdmaPpduUid::SendTbPpdu(), TestUlMuMimoPhyTransmission::SetTrigVector(), and ns3::SpectrumWifiPhy::StartTx().

+ Here is the caller graph for this function:

◆ GetPhyEntity() [2/2]

Ptr< PhyEntity > ns3::WifiPhy::GetPhyEntity ( WifiStandard standard) const

Get the supported PHY entity corresponding to the wifi standard.

Parameters
standardthe wifi standard
Returns
the pointer to the supported PHY entity

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

References ns3::GetModulationClassForStandard(), and GetPhyEntity().

+ Here is the call graph for this function:

◆ GetPhyEntityForPpdu()

Ptr< PhyEntity > ns3::WifiPhy::GetPhyEntityForPpdu ( const Ptr< const WifiPpdu > ppdu) const

Get the supported PHY entity to use for a received PPDU.

This typically returns the entity corresponding to the modulation class used to transmit the PPDU. If the modulation class used to transmit the PPDU is not supported by the PHY, the latest PHY entity corresponding to the configured standard is returned. If the modulation used to transmit the PPDU is non-HT (duplicate), the latest PHY entity corresponding to the configured standard is also returned.

Parameters
ppduthe received PPDU
Returns
the pointer to the supported PHY entity

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

References GetLatestPhyEntity(), GetPhyEntity(), m_phyEntities, NS_ABORT_IF, and ns3::WIFI_MOD_CLASS_HT.

Referenced by ns3::SpectrumWifiPhy::GetRxPpduFromTxPpdu(), and ns3::PhyEntity::HandleRxPpduWithSameContent().

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

◆ GetPhyId()

uint8_t ns3::WifiPhy::GetPhyId ( ) const

Get the index allocated to this PHY.

Returns
the ID allocated to this PHY

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

References m_phyId.

◆ GetPifs()

Time ns3::WifiPhy::GetPifs ( ) const

Return the PCF Interframe Space (PIFS) for this PHY.

Returns
the PIFS duration

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

References m_pifs.

Referenced by ns3::ChannelAccessManager::DoGrantDcfAccess(), ns3::QosFrameExchangeManager::PifsRecovery(), and ns3::QosFrameExchangeManager::TransmissionFailed().

+ Here is the caller graph for this function:

◆ GetPower()

dBm_u ns3::WifiPhy::GetPower ( uint8_t powerLevel) const

Get the power of the given power level.

In current implementation, the power levels are equally spaced (in dBm).

Parameters
powerLevelthe power level
Returns
the transmission power at the given power level

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

References m_nTxPower, m_txPowerBase, m_txPowerEnd, NS_ASSERT, and NS_ASSERT_MSG.

Referenced by ns3::AparfWifiManager::CheckInit(), ns3::ParfWifiManager::CheckInit(), ns3::RrpaaWifiManager::CheckInit(), ns3::AparfWifiManager::DoGetDataTxVector(), ns3::ParfWifiManager::DoGetDataTxVector(), ns3::RrpaaWifiManager::DoGetDataTxVector(), and ns3::YansWifiPhy::StartTx().

+ Here is the caller graph for this function:

◆ GetPreambleDetectionDuration()

Time ns3::WifiPhy::GetPreambleDetectionDuration ( )
static
Returns
the preamble detection duration, which is the time correlation needs to detect the start of an incoming frame.

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

References ns3::MicroSeconds().

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), TestUlOfdmaPhyTransmission::SchedulePowerMeasurementChecks(), and ns3::PhyEntity::StartPreambleDetectionPeriod().

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

◆ GetPreviouslyRxPpduUid()

uint64_t ns3::WifiPhy::GetPreviouslyRxPpduUid ( ) const
Returns
the UID of the previously received PPDU (reset to UINT64_MAX upon transmission)

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

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

+ Here is the caller graph for this function:

◆ GetPrimary20Index()

uint8_t ns3::WifiPhy::GetPrimary20Index ( ) const
Returns
the index of the primary 20 MHz channel

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

References ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex(), and m_operatingChannel.

Referenced by GetTypeId().

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

◆ GetPrimaryChannelNumber()

uint8_t ns3::WifiPhy::GetPrimaryChannelNumber ( MHz_u primaryChannelWidth) const

Get channel number of the primary channel.

Parameters
primaryChannelWidththe width of the primary channel
Returns
channel number of the primary channel

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

◆ GetRxGain()

dB_u ns3::WifiPhy::GetRxGain ( ) const

Return the reception gain.

Returns
the reception gain

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

References m_rxGain.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetRxSensitivity()

dBm_u ns3::WifiPhy::GetRxSensitivity ( ) const

Return the receive sensitivity threshold.

Returns
the receive sensitivity threshold

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

References m_rxSensitivity.

Referenced by GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().

+ Here is the caller graph for this function:

◆ GetShortPhyPreambleSupported()

bool ns3::WifiPhy::GetShortPhyPreambleSupported ( ) const

Return whether short PHY preamble is supported.

Returns
if short PHY preamble is supported or not

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

References m_shortPreamble.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSifs()

Time ns3::WifiPhy::GetSifs ( ) const

Return the Short Interframe Space (SIFS) for this PHY.

Returns
the SIFS duration

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

References m_sifs.

Referenced by ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::MinstrelHtWifiManager::CalculateRetransmits(), ns3::MinstrelWifiManager::CalculateTimeUnicastPacket(), Configure80211a(), Configure80211b(), Configure80211p(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), ns3::HtFrameExchangeManager::EndReceiveAmpdu(), ns3::FrameExchangeManager::GetCtsToSelfDurationId(), ns3::ChannelAccessManager::GetEifsNoDifs(), ns3::FrameExchangeManager::GetFrameDurationId(), ns3::FrameExchangeManager::GetRtsDurationId(), ns3::ChannelAccessManager::GetSifs(), ns3::FrameExchangeManager::ProtectionCompleted(), ns3::HeFrameExchangeManager::ProtectionCompleted(), ns3::HtFrameExchangeManager::ProtectionCompleted(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ns3::FrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::ReceiveMpdu(), ns3::QosFrameExchangeManager::ReceiveMpdu(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::FrameExchangeManager::SendMpdu(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::FrameExchangeManager::SendNormalAck(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMapWithProtection(), ns3::FrameExchangeManager::SendRts(), ns3::FrameExchangeManager::TransmissionSucceeded(), ns3::HeFrameExchangeManager::TransmissionSucceeded(), ns3::HtFrameExchangeManager::TransmissionSucceeded(), ns3::QosFrameExchangeManager::TransmissionSucceeded(), ns3::FrameExchangeManager::UpdateNav(), ns3::EhtFrameExchangeManager::UpdateTxopEndOnRxEnd(), and ns3::EhtFrameExchangeManager::UpdateTxopEndOnTxStart().

+ Here is the caller graph for this function:

◆ GetSlot()

◆ GetStandard()

WifiStandard ns3::WifiPhy::GetStandard ( ) const

Get the configured Wi-Fi standard.

Returns
the Wi-Fi standard that has been configured

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

References m_standard.

Referenced by ns3::WifiMac::ConfigurePhyDependentParameters(), ns3::ChannelAccessManager::ResizeLastBusyStructs(), ns3::SpectrumWifiPhy::StartRx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().

+ Here is the caller graph for this function:

◆ GetStartOfPacketDuration()

Time ns3::WifiPhy::GetStartOfPacketDuration ( const WifiTxVector & txVector)
static
Parameters
txVectorthe transmission parameters used for this packet
Returns
the duration until the start of the packet

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

References ns3::MicroSeconds().

+ Here is the call graph for this function:

◆ GetState()

Ptr< WifiPhyStateHelper > ns3::WifiPhy::GetState ( ) const

Return the WifiPhyStateHelper of this PHY.

Returns
the WifiPhyStateHelper of this PHY

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

References m_state.

Referenced by ns3::FrameExchangeManager::ResetPhy().

+ Here is the caller graph for this function:

◆ GetStaticPhyEntities()

std::map< WifiModulationClass, Ptr< PhyEntity > > & ns3::WifiPhy::GetStaticPhyEntities ( )
staticprivate
Returns
the map of implemented PHY entities. This is used to compute the different amendment-specific parameters in a static manner. For PHY entities supported by a given WifiPhy instance,
See also
m_phyEntities.

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

Referenced by AddPhyEntity(), AddStaticPhyEntity(), and GetStaticPhyEntity().

+ Here is the caller graph for this function:

◆ GetStaticPhyEntity()

const Ptr< const PhyEntity > ns3::WifiPhy::GetStaticPhyEntity ( WifiModulationClass modulation)
static

Get the implemented PHY entity corresponding to the modulation class.

This is used to compute the different amendment-specific parameters within calling static methods.

Parameters
modulationthe modulation class
Returns
the pointer to the static implemented PHY entity

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

References GetStaticPhyEntities(), and NS_ABORT_MSG_IF.

Referenced by ns3::InterferenceHelper::CalculatePhyHeaderPer(), and HeSigBDurationTest::DoRun().

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

◆ GetSubcarrierSpacing()

Hz_u ns3::WifiPhy::GetSubcarrierSpacing ( ) const
Returns
the subcarrier spacing corresponding to the configure standard

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

References NS_FATAL_ERROR, ns3::WIFI_STANDARD_80211a, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211b, ns3::WIFI_STANDARD_80211be, ns3::WIFI_STANDARD_80211g, ns3::WIFI_STANDARD_80211n, and ns3::WIFI_STANDARD_80211p.

Referenced by ns3::SpectrumWifiPhy::GetBandForInterface(), ns3::SpectrumWifiPhy::GetHeRuBands(), ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), ns3::HePhy::GetRuBandForTx(), and ns3::SpectrumWifiPhy::ResetSpectrumModel().

+ Here is the caller graph for this function:

◆ GetTxBandwidth()

MHz_u ns3::WifiPhy::GetTxBandwidth ( WifiMode mode,
MHz_u maxAllowedBandWidth = std::numeric_limits<MHz_u>::max() ) const

Get the bandwidth for a transmission occurring on the current operating channel and using the given WifiMode, subject to the constraint that the TX bandwidth cannot exceed the given maximum allowed value.

Parameters
modethe given WifiMode
maxAllowedBandWidththe maximum allowed TX bandwidth
Returns
the bandwidth for the transmission

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

References GetChannelWidth(), ns3::GetMaximumChannelWidth(), ns3::WifiMode::GetModulationClass(), ns3::WIFI_MOD_CLASS_DSSS, and ns3::WIFI_MOD_CLASS_HR_DSSS.

Referenced by ns3::IdealWifiManager::DoGetDataTxVector(), ns3::MinstrelHtWifiManager::DoGetDataTxVector(), ns3::WifiRemoteStationManager::GetAckTxVector(), ns3::WifiRemoteStationManager::GetBlockAckTxVector(), ns3::WifiRemoteStationManager::GetCtsToSelfTxVector(), ns3::WifiRemoteStationManager::GetCtsTxVector(), ns3::WifiRemoteStationManager::GetDataTxVector(), and ns3::WifiRemoteStationManager::GetRtsTxVector().

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

◆ GetTxGain()

dB_u ns3::WifiPhy::GetTxGain ( ) const

Return the transmission gain.

Returns
the transmission gain

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

References m_txGain.

Referenced by GetTypeId(), ns3::HePhy::StartTx(), ns3::PhyEntity::StartTx(), and ns3::YansWifiPhy::StartTx().

+ Here is the caller graph for this function:

◆ GetTxMaskRejectionParams()

virtual std::tuple< dBr_u, dBr_u, dBr_u > ns3::WifiPhy::GetTxMaskRejectionParams ( ) const
pure virtual
Returns
a tuple containing the minimum rejection for the inner band, the minimum rejection for the outer band, and the maximum rejection for the outer band for the transmit spectrum mask.

This method is only relevant for SpectrumWifiPhy.

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

Referenced by ns3::PhyEntity::GetTxMaskRejectionParams().

+ Here is the caller graph for this function:

◆ GetTxPowerEnd()

dBm_u ns3::WifiPhy::GetTxPowerEnd ( ) const

Return the maximum available transmission power level.

Returns
the maximum available transmission power level

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

References m_txPowerEnd.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTxPowerForTransmission()

dBm_u ns3::WifiPhy::GetTxPowerForTransmission ( Ptr< const WifiPpdu > ppdu) const

Compute the transmit power for the next transmission.

The returned power will satisfy the power density constraints after addition of antenna gain.

Parameters
ppduthe PPDU to transmit
Returns
the transmit power for the next transmission

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

References NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::RatioToDb().

Referenced by ns3::HePhy::StartTx(), ns3::PhyEntity::StartTx(), and ns3::YansWifiPhy::StartTx().

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

◆ GetTxPowerStart()

dBm_u ns3::WifiPhy::GetTxPowerStart ( ) const

Return the minimum available transmission power level.

Returns
the minimum available transmission power level

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

References m_txPowerBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::WifiPhy::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

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

References ns3::TypeId::ATTR_GET, GetCcaEdThreshold(), GetCcaSensitivityThreshold(), GetChannel(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetMaxSupportedRxSpatialStreams(), GetMaxSupportedTxSpatialStreams(), GetNumberOfAntennas(), GetPrimary20Index(), GetRxGain(), GetRxSensitivity(), GetShortPhyPreambleSupported(), GetTxGain(), GetTxPowerEnd(), GetTxPowerStart(), HasFixedPhyBand(), m_channelSwitchDelay, m_frameCaptureModel, m_interference, m_notifyRxMacHeaderEnd, m_nTxPower, m_phyMonitorSniffRxTrace, m_phyMonitorSniffTxTrace, m_phyRxBeginTrace, m_phyRxDropTrace, m_phyRxEndTrace, m_phyRxMacHeaderEndTrace, m_phyRxPayloadBeginTrace, m_phyRxPpduDropTrace, m_phyTxBeginTrace, m_phyTxDropTrace, m_phyTxEndTrace, m_phyTxPsduBeginTrace, m_pifs, m_postReceptionErrorModel, m_powerDensityLimit, m_preambleDetectionModel, m_sifs, m_signalTransmissionCb, m_slot, m_state, ns3::MakeAttributeContainerAccessor(), ns3::MakeAttributeContainerChecker(), ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeTupleChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::MicroSeconds(), ns3::Seconds(), SetCcaEdThreshold(), SetCcaSensitivityThreshold(), SetFixedPhyBand(), SetMaxSupportedRxSpatialStreams(), SetMaxSupportedTxSpatialStreams(), SetNumberOfAntennas(), SetOperatingChannel(), ns3::TypeId::SetParent(), SetRxGain(), SetRxNoiseFigure(), SetRxSensitivity(), SetShortPhyPreambleSupported(), SetTxGain(), SetTxPowerEnd(), SetTxPowerStart(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.

+ Here is the call graph for this function:

◆ GetWifiConstPsduMap()

WifiConstPsduMap ns3::WifiPhy::GetWifiConstPsduMap ( Ptr< const WifiPsdu > psdu,
const WifiTxVector & txVector )
static

Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.

The STA-ID value is properly determined based on whether the given PSDU has to be transmitted as a DL or UL frame.

Parameters
psduthe given PSDU
txVectorthe TXVECTOR to use to send the PSDU
Returns
a WifiConstPsduMap built from the given PSDU and the given TXVECTOR

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

References ns3::WifiTxVector::GetModulationClass().

+ Here is the call graph for this function:

◆ HasFixedPhyBand()

bool ns3::WifiPhy::HasFixedPhyBand ( ) const
Returns
whether it is prohibited to change PHY band after initialization

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

References m_fixedPhyBand.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ IsMcsSupported()

bool ns3::WifiPhy::IsMcsSupported ( WifiModulationClass modulation,
uint8_t mcs ) const

Check if the given MCS of the given modulation class is supported by the PHY.

Parameters
modulationthe modulation class
mcsthe MCS value
Returns
true if the given mode is supported, false otherwise

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

◆ IsModeSupported()

bool ns3::WifiPhy::IsModeSupported ( WifiMode mode) const

Check if the given WifiMode is supported by the PHY.

Parameters
modethe wifi mode to check
Returns
true if the given mode is supported, false otherwise

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

◆ IsReceivingPhyHeader()

bool ns3::WifiPhy::IsReceivingPhyHeader ( ) const
Returns
whether the PHY is busy decoding the PHY header fields of a PPDU

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

Referenced by ns3::EhtFrameExchangeManager::TxopEnd().

+ Here is the caller graph for this function:

◆ IsStateCcaBusy()

bool ns3::WifiPhy::IsStateCcaBusy ( ) const
Returns
true of the current state of the PHY layer is WifiPhy::CCA_BUSY, false otherwise.

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

◆ IsStateIdle()

bool ns3::WifiPhy::IsStateIdle ( ) const
Returns
true of the current state of the PHY layer is WifiPhy::IDLE, false otherwise.

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

◆ IsStateOff()

bool ns3::WifiPhy::IsStateOff ( ) const
Returns
true if the current state of the PHY layer is WifiPhy::OFF, false otherwise.

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

Referenced by ns3::PhyEntity::DropPreambleEvent().

+ Here is the caller graph for this function:

◆ IsStateRx()

bool ns3::WifiPhy::IsStateRx ( ) const
Returns
true of the current state of the PHY layer is WifiPhy::RX, false otherwise.

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

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::ResetReceive().

+ Here is the caller graph for this function:

◆ IsStateSleep()

bool ns3::WifiPhy::IsStateSleep ( ) const
Returns
true if the current state of the PHY layer is WifiPhy::SLEEP, false otherwise.

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

Referenced by ns3::PhyEntity::DropPreambleEvent().

+ Here is the caller graph for this function:

◆ IsStateSwitching()

bool ns3::WifiPhy::IsStateSwitching ( ) const
Returns
true of the current state of the PHY layer is WifiPhy::SWITCHING, false otherwise.

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

◆ IsStateTx()

bool ns3::WifiPhy::IsStateTx ( ) const
Returns
true of the current state of the PHY layer is WifiPhy::TX, false otherwise.

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

◆ NotifyCcaBusy()

void ns3::WifiPhy::NotifyCcaBusy ( const Ptr< const WifiPpdu > ppdu,
Time duration )
protected

Notify PHY state helper to switch to CCA busy state,.

Parameters
ppduthe incoming PPDU or nullptr for any signal
durationthe duration of the CCA state

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

References NS_LOG_FUNCTION, and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::EndReceiveField(), and ns3::PhyEntity::StartReceiveField().

+ Here is the caller graph for this function:

◆ NotifyChannelAccessRequested()

void ns3::WifiPhy::NotifyChannelAccessRequested ( )

Notify the PHY that an access to the channel was requested.

This is typically called by the channel access manager to to notify the PHY about an ongoing transmission. The PHY will use this information to determine whether it should use power restriction as imposed by OBSS_PD SR.

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

References NS_LOG_FUNCTION.

Referenced by ns3::ChannelAccessManager::RequestAccess().

+ Here is the caller graph for this function:

◆ NotifyMonitorSniffRx()

void ns3::WifiPhy::NotifyMonitorSniffRx ( Ptr< const WifiPsdu > psdu,
MHz_u channelFreq,
const WifiTxVector & txVector,
SignalNoiseDbm signalNoise,
const std::vector< bool > & statusPerMpdu,
uint16_t staId = SU_STA_ID )

Public method used to fire a MonitorSniffer trace for a wifi PSDU being received.

Implemented for encapsulation purposes. This method will extract all MPDUs if packet is an A-MPDU and will fire tracedCallback. The A-MPDU reference number (RX side) is set within the method. It must be a different value for each A-MPDU but the same for each subframe within one A-MPDU.

Parameters
psduthe PSDU being received
channelFreqthe frequency 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
signalNoisesignal power and noise power in dBm (noise power includes the noise figure)
statusPerMpdureception status per MPDU
staIdthe STA-ID

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

References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiTxVector::IsAggregation(), ns3::LAST_MPDU_IN_AGGREGATE, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.

Referenced by ns3::PhyEntity::EndReceivePayload().

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

◆ NotifyMonitorSniffTx()

void ns3::WifiPhy::NotifyMonitorSniffTx ( Ptr< const WifiPsdu > psdu,
MHz_u channelFreq,
const WifiTxVector & txVector,
uint16_t staId = SU_STA_ID )

Public method used to fire a MonitorSniffer trace for a wifi PSDU being transmitted.

Implemented for encapsulation purposes. This method will extract all MPDUs if packet is an A-MPDU and will fire tracedCallback. The A-MPDU reference number (RX side) is set within the method. It must be a different value for each A-MPDU but the same for each subframe within one A-MPDU.

Parameters
psduthe PSDU being received
channelFreqthe frequency at which the packet is transmitted.
txVectorthe TXVECTOR that holds TX parameters
staIdthe STA-ID

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

References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiTxVector::IsAggregation(), ns3::LAST_MPDU_IN_AGGREGATE, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.

+ Here is the call graph for this function:

◆ NotifyRxBegin()

void ns3::WifiPhy::NotifyRxBegin ( Ptr< const WifiPsdu > psdu,
const RxPowerWattPerChannelBand & rxPowersW )

Public method used to fire a PhyRxBegin trace.

Implemented for encapsulation purposes.

Parameters
psduthe PSDU being transmitted
rxPowersWthe receive power per channel band in Watts

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

References ns3::PeekPointer().

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod().

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

◆ NotifyRxDrop()

void ns3::WifiPhy::NotifyRxDrop ( Ptr< const WifiPsdu > psdu,
WifiPhyRxfailureReason reason )

Public method used to fire a PhyRxDrop trace.

Implemented for encapsulation purposes.

Note
This method is called also by NotifyRxPpduDrop and is left in the public API for backward compatibility reasons. Do not call both this method and the newer NotifyRxPpduDrop(). Instead, call NotifyRxPpduDrop() and it will call this method also.
Parameters
psduthe PSDU being transmitted
reasonthe reason the packet was dropped

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

References ns3::PeekPointer().

+ Here is the call graph for this function:

◆ NotifyRxEnd()

void ns3::WifiPhy::NotifyRxEnd ( Ptr< const WifiPsdu > psdu)

Public method used to fire a PhyRxEnd trace.

Implemented for encapsulation purposes.

Parameters
psduthe PSDU being transmitted

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

References ns3::PeekPointer().

Referenced by ns3::PhyEntity::EndReceivePayload().

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

◆ NotifyRxPpduDrop()

void ns3::WifiPhy::NotifyRxPpduDrop ( Ptr< const WifiPpdu > ppdu,
WifiPhyRxfailureReason reason )

Public method used to fire a PhyRxPpduDrop trace.

Implemented for encapsulation purposes. This method also calls the PhyRxDrop trace.

Parameters
ppduthe PSDU being transmitted
reasonthe reason the packet was dropped

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

Referenced by ns3::PhyEntity::DropPreambleEvent(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::EndReceiveField(), ns3::HePhy::HandleRxPpduWithSameContent(), and ns3::PhyEntity::HandleRxPpduWithSameContent().

+ Here is the caller graph for this function:

◆ NotifyTxBegin()

void ns3::WifiPhy::NotifyTxBegin ( const WifiConstPsduMap & psdus,
Watt_u txPower )

Public method used to fire a PhyTxBegin trace.

Implemented for encapsulation purposes.

Parameters
psdusthe PSDUs being transmitted (only one unless DL MU transmission)
txPowerthe transmit power

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

References ns3::PeekPointer().

+ Here is the call graph for this function:

◆ NotifyTxDrop()

void ns3::WifiPhy::NotifyTxDrop ( Ptr< const WifiPsdu > psdu)

Public method used to fire a PhyTxDrop trace.

Implemented for encapsulation purposes.

Parameters
psduthe PSDU being transmitted

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

References ns3::PeekPointer().

+ Here is the call graph for this function:

◆ NotifyTxEnd()

void ns3::WifiPhy::NotifyTxEnd ( const WifiConstPsduMap & psdus)

Public method used to fire a PhyTxEnd trace.

Implemented for encapsulation purposes.

Parameters
psdusthe PSDUs being transmitted (only one unless DL MU transmission)

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

References ns3::PeekPointer().

+ Here is the call graph for this function:

◆ PushMcs()

void ns3::WifiPhy::PushMcs ( WifiMode mode)
private

Add the given MCS to the device MCS set.

Parameters
modethe MCS to add to the device MCS set

◆ RebuildMcsMap()

void ns3::WifiPhy::RebuildMcsMap ( )
private

Rebuild the mapping of MCS values to indices in the device MCS set.

◆ RegisterListener()

void ns3::WifiPhy::RegisterListener ( const std::shared_ptr< WifiPhyListener > & listener)
Parameters
listenerthe new listener

Add the input listener to the list of objects to be notified of PHY-level events. The input listener is notified of CCA busy information.

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

References ns3::Object::IsInitialized(), m_state, and SwitchMaybeToCcaBusy().

Referenced by TestUlOfdmaPhyTransmission::DoSetup().

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

◆ Reset()

void ns3::WifiPhy::Reset ( )
protected

Reset data upon end of TX or RX.

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

References NS_LOG_FUNCTION.

Referenced by DoDispose(), ns3::PhyEntity::ErasePreambleEvent(), GetDelayUntilChannelSwitch(), and ns3::PhyEntity::NotifyInterferenceRxEndAndClear().

+ Here is the caller graph for this function:

◆ ResetCca()

void ns3::WifiPhy::ResetCca ( bool powerRestricted,
dBm_u txPowerMaxSiso = 0,
dBm_u txPowerMaxMimo = 0 )

Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.

Parameters
powerRestrictedflag whether the transmit power is restricted for the next transmission
txPowerMaxSisothe SISO transmit power restriction for the next transmission
txPowerMaxMimothe MIMO transmit power restriction for the next transmission

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

References NS_ASSERT, NS_LOG_FUNCTION, and ns3::OBSS_PD_CCA_RESET.

◆ ResumeFromOff()

void ns3::WifiPhy::ResumeFromOff ( )

Resume from off mode.

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

References NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall().

+ Here is the caller graph for this function:

◆ ResumeFromSleep()

void ns3::WifiPhy::ResumeFromSleep ( )

Resume from sleep mode.

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

References NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

◆ Send() [1/2]

void ns3::WifiPhy::Send ( const WifiConstPsduMap & psdus,
const WifiTxVector & txVector )
Parameters
psdusthe PSDUs to send
txVectorthe TXVECTOR that has tx parameters such as mode, the transmission mode to use to send this PSDU, and txPowerLevel, a power level to use to send the whole PPDU. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels

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

References ns3::DbmToW(), ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxVector::GetNss(), ns3::WifiTxVector::GetNssMax(), ns3::WifiTxVector::GetNssTotal(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::WifiTxVector::IsDlMuMimo(), ns3::WifiTxVector::IsMu(), ns3::WifiTxVector::IsValid(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::RECEPTION_ABORTED_BY_TX, and ns3::SIGNAL_DETECTION_ABORTED_BY_TX.

+ Here is the call graph for this function:

◆ Send() [2/2]

void ns3::WifiPhy::Send ( Ptr< const WifiPsdu > psdu,
const WifiTxVector & txVector )

This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.

This function inserts the given PSDU in a WifiConstPsduMap along with a STA-ID value that is determined based on whether the given PSDU has to be transmitted as a DL or UL frame.

Parameters
psduthe PSDU to send (in a SU PPDU)
txVectorthe TXVECTOR that has TX parameters such as mode, the transmission mode to use to send this PSDU, and txPowerLevel, a power level to use to send the whole PPDU. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels

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

References NS_LOG_FUNCTION, and Send().

Referenced by ns3::FrameExchangeManager::ForwardMpduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), PsrExperiment::Send(), TestUlOfdmaPpduUid::SendMuPpdu(), SpectrumWifiPhyFilterTest::SendPpdu(), TestUlOfdmaPpduUid::SendSuPpdu(), and TestUlOfdmaPpduUid::SendTbPpdu().

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

◆ SetCapabilitiesChangedCallback()

void ns3::WifiPhy::SetCapabilitiesChangedCallback ( Callback< void > callback)
Parameters
callbackthe callback to invoke when PHY capabilities have changed.

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

References m_capabilitiesChangedCallback.

◆ SetCcaEdThreshold()

void ns3::WifiPhy::SetCcaEdThreshold ( dBm_u threshold)

Sets the CCA energy detection threshold.

The energy of a all received signals should be higher than this threshold to allow the PHY layer to declare CCA BUSY state.

Parameters
thresholdthe CCA threshold

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

References m_ccaEdThreshold, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetCcaSensitivityThreshold()

void ns3::WifiPhy::SetCcaSensitivityThreshold ( dBm_u threshold)

Sets the CCA sensitivity threshold.

The energy of a received wifi signal should be higher than this threshold to allow the PHY layer to declare CCA BUSY state.

Parameters
thresholdthe CCA sensitivity threshold

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

References m_ccaSensitivityThreshold, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDevice()

void ns3::WifiPhy::SetDevice ( const Ptr< WifiNetDevice > device)
virtual

Sets the device this PHY is associated with.

Parameters
devicethe device this PHY is associated with

Reimplemented in ns3::SpectrumWifiPhy.

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

References m_device.

Referenced by Bug2831TestCase::DoRun(), TestWifiPhyRxTraceHelperYans::DoSetup(), and ns3::SpectrumWifiPhy::SetDevice().

+ Here is the caller graph for this function:

◆ SetErrorRateModel()

void ns3::WifiPhy::SetErrorRateModel ( const Ptr< ErrorRateModel > model)

◆ SetFixedPhyBand()

void ns3::WifiPhy::SetFixedPhyBand ( bool enable)

Configure whether it is prohibited to change PHY band after initialization.

Parameters
enabletrue to prohibit changing PHY band after initialization, false otherwise

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

References m_fixedPhyBand.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetFrameCaptureModel()

void ns3::WifiPhy::SetFrameCaptureModel ( const Ptr< FrameCaptureModel > frameCaptureModel)

Sets the frame capture model.

Parameters
frameCaptureModelthe frame capture model

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

References m_frameCaptureModel.

◆ SetInterferenceHelper()

void ns3::WifiPhy::SetInterferenceHelper ( const Ptr< InterferenceHelper > helper)
virtual

Sets the interference helper.

Parameters
helperthe interference helper

Reimplemented in ns3::YansWifiPhy.

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

References ns3::DbToRatio(), m_interference, m_noiseFigure, m_numberOfAntennas, and NS_LOG_FUNCTION.

Referenced by SpectrumWifiPhyFilterTest::DoSetup(), SpectrumWifiPhyTrackedBandsTest::DoSetup(), TestDlMuMimoPhyTransmission::DoSetup(), TestDlOfdmaPhyPuncturing::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlMuMimoPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), and ns3::YansWifiPhy::SetInterferenceHelper().

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

◆ SetMaxModulationClassSupported()

void ns3::WifiPhy::SetMaxModulationClassSupported ( WifiModulationClass modClass)

Set the maximum modulation class that has to be supported by this PHY object.

The maximum modulation class supported will be the minimum between the given modulation class and the maximum modulation class supported based on the configured standard.

Parameters
modClassthe given modulation class

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

References m_maxModClassSupported, and NS_LOG_FUNCTION.

◆ SetMaxSupportedRxSpatialStreams()

void ns3::WifiPhy::SetMaxSupportedRxSpatialStreams ( uint8_t streams)
Parameters
streamsthe maximum number of supported RX spatial streams.

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

References NS_ASSERT.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMaxSupportedTxSpatialStreams()

void ns3::WifiPhy::SetMaxSupportedTxSpatialStreams ( uint8_t streams)
Parameters
streamsthe maximum number of supported TX spatial streams.

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

References NS_ASSERT, and ns3::WIFI_MOD_CLASS_HT.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMobility()

void ns3::WifiPhy::SetMobility ( const Ptr< MobilityModel > mobility)

assign a mobility model to this device

This method allows a user to specify a mobility model that should be associated with this physical layer. Calling this method is optional and only necessary if the user wants to override the mobility model that is aggregated to the node.

Parameters
mobilitythe mobility model this PHY is associated with

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

References m_mobility.

Referenced by Bug2831TestCase::DoRun(), SpectrumWifiPhyFilterTest::DoSetup(), TestDlOfdmaPhyPuncturing::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), and TestUlOfdmaPpduUid::DoSetup().

+ Here is the caller graph for this function:

◆ SetNTxPower()

void ns3::WifiPhy::SetNTxPower ( uint8_t n)

Sets the number of transmission power levels available between the minimum level and the maximum level.

Transmission power levels are equally separated (in dBm) with the minimum and the maximum included.

Parameters
nthe number of available levels

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

References m_nTxPower, and NS_LOG_FUNCTION.

◆ SetNumberOfAntennas()

void ns3::WifiPhy::SetNumberOfAntennas ( uint8_t antennas)
Parameters
antennasthe number of antennas on this node.

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

References NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetOffMode()

void ns3::WifiPhy::SetOffMode ( )

Put in off mode.

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

References NS_LOG_FUNCTION.

Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall(), and ns3::StaWifiMac::ReceiveAssocResp().

+ Here is the caller graph for this function:

◆ SetOperatingChannel() [1/3]

void ns3::WifiPhy::SetOperatingChannel ( const ChannelSegments & channelSegments)

This overloaded function is used to pass a list of segments from which the operating channel can be deduced.

Parameters
channelSegmentsthe segments identifying the operating channel

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

References DoChannelSwitch(), GetDelayUntilChannelSwitch(), ns3::Object::IsInitialized(), m_channelSettings, m_standard, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SetOperatingChannel(), and ns3::WIFI_STANDARD_UNSPECIFIED.

+ Here is the call graph for this function:

◆ SetOperatingChannel() [2/3]

void ns3::WifiPhy::SetOperatingChannel ( const ChannelTuple & tuple)

This overloaded function is used when the operating channel consists of a single segment, identified by a tuple.

Parameters
tuplethe segment identifying the operating channel

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

References SetOperatingChannel().

+ Here is the call graph for this function:

◆ SetOperatingChannel() [3/3]

void ns3::WifiPhy::SetOperatingChannel ( const WifiPhyOperatingChannel & channel)

If the standard for this object has not been set yet, store the channel settings corresponding to the given operating channel.

Otherwise, check if a channel switch can be performed now. If not, schedule another call to this method when channel switch can be performed. Otherwise, set the given operating channel and call ConfigureStandard if the PHY band has changed.

Note that, in case a Spectrum PHY is used, a spectrum channel covering the operating channel bandwidth must have been already added when actually setting the operating channel.

Parameters
channelthe given operating channel

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

References NS_LOG_FUNCTION, and SetOperatingChannel().

Referenced by Bug2831TestCase::ChangeSupportedChannelWidth(), ConfigureStandard(), Bug2831TestCase::DoRun(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestMultipleHeTbPreambles::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestWifiPhyRxTraceHelperYans::DoSetup(), GetTypeId(), SpectrumWifiPhyFilterTest::RunOne(), TestDlMuMimoPhyTransmission::RunOne(), TestDlOfdmaPhyPuncturing::RunOne(), TestDlOfdmaPhyTransmission::RunOne(), TestUlMuMimoPhyTransmission::RunOne(), TestUlOfdmaPhyTransmission::RunOne(), SetOperatingChannel(), SetOperatingChannel(), SetOperatingChannel(), SpectrumWifiPhyTrackedBandsTest::SwitchChannel(), and ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel().

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

◆ SetPhyId()

void ns3::WifiPhy::SetPhyId ( uint8_t phyId)

Set the index allocated to this PHY.

Parameters
phyIdthe ID allocated to this PHY

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

References m_phyId, and NS_LOG_FUNCTION.

◆ SetPifs()

void ns3::WifiPhy::SetPifs ( Time pifs)

Set the PCF Interframe Space (PIFS) for this PHY.

Parameters
pifsthe PIFS duration

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

References m_pifs.

Referenced by Configure80211a(), Configure80211b(), and Configure80211p().

+ Here is the caller graph for this function:

◆ SetPostReceptionErrorModel()

void ns3::WifiPhy::SetPostReceptionErrorModel ( const Ptr< ErrorModel > em)

Attach a receive ErrorModel to the WifiPhy.

The WifiPhy may optionally include an ErrorModel in the packet receive chain. The error model is additive to any modulation-based error model based on SNR, and is typically used to force specific packet losses or for testing purposes.

Parameters
emPointer to the ErrorModel.

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

References m_postReceptionErrorModel, and NS_LOG_FUNCTION.

◆ SetPreambleDetectionModel()

void ns3::WifiPhy::SetPreambleDetectionModel ( const Ptr< PreambleDetectionModel > preambleDetectionModel)

Sets the preamble detection model.

Parameters
preambleDetectionModelthe preamble detection model

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

References m_preambleDetectionModel.

Referenced by TestMultipleHeTbPreambles::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), and TestWifiPhyRxTraceHelperYans::DoSetup().

+ Here is the caller graph for this function:

◆ SetPreviouslyRxPpduUid()

void ns3::WifiPhy::SetPreviouslyRxPpduUid ( uint64_t uid)

Set the UID of the previously received PPDU.

Parameters
uidthe value for the UID of the previously received PPDU
Note
This method shall only be used in exceptional circumstances, such as when a PHY transmits a response to a Trigger Frame that was received by another PHY. This is the case, e.g., when an aux PHY of an EMLSR client receives an ICF but it is the main PHY that switches channel and transmits the response to the ICF.

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

References NS_ASSERT, and ns3::WIFI_STANDARD_80211be.

◆ SetReceiveErrorCallback()

void ns3::WifiPhy::SetReceiveErrorCallback ( RxErrorCallback callback)
Parameters
callbackthe callback to invoke upon erroneous packet reception.

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

References m_state.

Referenced by TestDlMuMimoPhyTransmission::DoSetup(), TestDlOfdmaPhyPuncturing::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlMuMimoPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), ns3::FrameExchangeManager::ResetPhy(), and ns3::FrameExchangeManager::SetWifiPhy().

+ Here is the caller graph for this function:

◆ SetReceiveOkCallback()

void ns3::WifiPhy::SetReceiveOkCallback ( RxOkCallback callback)
Parameters
callbackthe callback to invoke upon successful packet reception.

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

References m_state.

Referenced by WifiPrimaryChannelsTest::DoRun(), TestDlMuMimoPhyTransmission::DoSetup(), TestDlOfdmaPhyPuncturing::DoSetup(), TestDlOfdmaPhyTransmission::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), TestPhyPaddingExclusion::DoSetup(), TestUlMuMimoPhyTransmission::DoSetup(), TestUlOfdmaPhyTransmission::DoSetup(), ns3::FrameExchangeManager::ResetPhy(), and ns3::FrameExchangeManager::SetWifiPhy().

+ Here is the caller graph for this function:

◆ SetRxGain()

void ns3::WifiPhy::SetRxGain ( dB_u gain)

Sets the reception gain.

Parameters
gainthe reception gain

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

References m_rxGain, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetRxNoiseFigure()

void ns3::WifiPhy::SetRxNoiseFigure ( dB_u noiseFigure)

Sets the RX loss in the Signal-to-Noise-Ratio due to non-idealities in the receiver.

Parameters
noiseFigurenoise figure

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

References ns3::DbToRatio(), m_interference, m_noiseFigure, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

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

◆ SetRxSensitivity()

void ns3::WifiPhy::SetRxSensitivity ( dBm_u threshold)

Sets the receive sensitivity threshold.

The energy of a received signal should be higher than this threshold to allow the PHY layer to detect the signal.

Parameters
thresholdthe receive sensitivity threshold

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

References m_rxSensitivity, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetShortPhyPreambleSupported()

void ns3::WifiPhy::SetShortPhyPreambleSupported ( bool preamble)

Enable or disable short PHY preamble.

Parameters
preamblesets whether short PHY preamble is supported or not

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

References m_shortPreamble, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSifs()

void ns3::WifiPhy::SetSifs ( Time sifs)

Set the Short Interframe Space (SIFS) for this PHY.

Parameters
sifsthe SIFS duration

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

References m_sifs.

Referenced by Configure80211a(), Configure80211b(), and Configure80211p().

+ Here is the caller graph for this function:

◆ SetSleepMode()

void ns3::WifiPhy::SetSleepMode ( bool forceSleepWhileInRx = false)

Put in sleep mode.

Parameters
forceSleepWhileInRxforce setting sleep mode if state is RX

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

References NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

◆ SetSlot()

void ns3::WifiPhy::SetSlot ( Time slot)

Set the slot duration for this PHY.

Parameters
slotthe slot duration

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

References m_slot.

Referenced by Configure80211a(), Configure80211b(), Configure80211p(), ns3::ApWifiMac::SendOneBeacon(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the caller graph for this function:

◆ SetTxGain()

void ns3::WifiPhy::SetTxGain ( dB_u gain)

Sets the transmission gain.

Parameters
gainthe transmission gain

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

References m_txGain, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetTxPowerEnd()

void ns3::WifiPhy::SetTxPowerEnd ( dBm_u end)

Sets the maximum available transmission power level.

Parameters
endthe maximum transmission power level

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

References m_txPowerEnd, and NS_LOG_FUNCTION.

Referenced by TestWifiPhyRxTraceHelperYans::DoSetup(), and GetTypeId().

+ Here is the caller graph for this function:

◆ SetTxPowerStart()

void ns3::WifiPhy::SetTxPowerStart ( dBm_u start)

Sets the minimum available transmission power level.

Parameters
startthe minimum transmission power level

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

References m_txPowerBase, and NS_LOG_FUNCTION.

Referenced by TestWifiPhyRxTraceHelperYans::DoSetup(), and GetTypeId().

+ Here is the caller graph for this function:

◆ SetWifiRadioEnergyModel()

void ns3::WifiPhy::SetWifiRadioEnergyModel ( const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)

Sets the wifi radio energy model.

Parameters
wifiRadioEnergyModelthe wifi radio energy model

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

References m_wifiRadioEnergyModel.

◆ StartReceivePreamble()

void ns3::WifiPhy::StartReceivePreamble ( Ptr< const WifiPpdu > ppdu,
RxPowerWattPerChannelBand & rxPowersW,
Time rxDuration )

Start receiving the PHY preamble of a PPDU (i.e.

the first bit of the preamble has arrived).

Parameters
ppduthe arriving PPDU
rxPowersWthe receive power in W per band
rxDurationthe duration of the PPDU

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

References NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_UNKNOWN.

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

+ Here is the caller graph for this function:

◆ StartTx()

virtual void ns3::WifiPhy::StartTx ( Ptr< const WifiPpdu > ppdu)
pure virtual
Parameters
ppduthe PPDU to send

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

◆ SwitchMaybeToCcaBusy()

void ns3::WifiPhy::SwitchMaybeToCcaBusy ( const Ptr< const WifiPpdu > ppdu = nullptr)
protected

Check if PHY state should move to CCA busy state based on current state of interference tracker.

Parameters
ppduthe incoming PPDU or nullptr for any signal

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

References NS_LOG_FUNCTION.

Referenced by ns3::PhyEntity::DropPreambleEvent(), ns3::PhyEntity::EndReceiveField(), ns3::PhyEntity::EndReceivePayload(), ns3::PhyEntity::ErasePreambleEvent(), ns3::SpectrumWifiPhy::FinalizeChannelSwitch(), RegisterListener(), ns3::PhyEntity::ResetReceive(), ns3::PhyEntity::StartReceivePreamble(), and ns3::SpectrumWifiPhy::StartRx().

+ Here is the caller graph for this function:

◆ TxDone()

void ns3::WifiPhy::TxDone ( const WifiConstPsduMap & psdus)
private

Callback function when a transmission is completed.

Parameters
psdusthe PSDUs that have been sent

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

References NS_LOG_FUNCTION.

◆ UnregisterListener()

void ns3::WifiPhy::UnregisterListener ( const std::shared_ptr< WifiPhyListener > & listener)
Parameters
listenerthe listener to be unregistered

Remove the input listener from the list of objects to be notified of PHY-level events.

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

References m_state.

Friends And Related Symbol Documentation

◆ PhyEntity

friend class PhyEntity
friend

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

Member Data Documentation

◆ m_ackTxTime

Time ns3::WifiPhy::m_ackTxTime
private

estimated Ack TX time

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

Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and GetAckTxTime().

◆ m_band

WifiPhyBand ns3::WifiPhy::m_band
private

WifiPhyBand.

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

Referenced by Configure80211ax(), Configure80211n(), DoChannelSwitch(), and GetPhyBand().

◆ m_blockAckTxTime

Time ns3::WifiPhy::m_blockAckTxTime
private

estimated BlockAck TX time

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

Referenced by Configure80211n(), and GetBlockAckTxTime().

◆ m_capabilitiesChangedCallback

Callback<void> ns3::WifiPhy::m_capabilitiesChangedCallback
private

Callback when PHY capabilities changed.

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

Referenced by SetCapabilitiesChangedCallback().

◆ m_ccaEdThreshold

dBm_u ns3::WifiPhy::m_ccaEdThreshold
private

Clear channel assessment (CCA) energy detection (ED) threshold.

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

Referenced by GetCcaEdThreshold(), and SetCcaEdThreshold().

◆ m_ccaSensitivityThreshold

dBm_u ns3::WifiPhy::m_ccaSensitivityThreshold
private

Clear channel assessment (CCA) modulation and coding rate sensitivity threshold.

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

Referenced by GetCcaSensitivityThreshold(), and SetCcaSensitivityThreshold().

◆ m_channelAccessRequested

bool ns3::WifiPhy::m_channelAccessRequested
private

Flag if channels access has been requested (used for OBSS_PD SR)

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

Referenced by DoChannelSwitch().

◆ m_channelSettings

ChannelSegments ns3::WifiPhy::m_channelSettings
private

Store operating channel settings until initialization.

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

Referenced by ConfigureStandard(), DoChannelSwitch(), and SetOperatingChannel().

◆ m_channelSwitchDelay

Time ns3::WifiPhy::m_channelSwitchDelay
private

Time required to switch between channel.

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

Referenced by GetChannelSwitchDelay(), and GetTypeId().

◆ m_currentEvent

◆ m_currentPreambleEvents

◆ m_device

Ptr<WifiNetDevice> ns3::WifiPhy::m_device
private

Pointer to the device.

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

Referenced by DoDispose(), DoInitialize(), GetDevice(), and SetDevice().

◆ m_endPhyRxEvent

EventId ns3::WifiPhy::m_endPhyRxEvent
protected

◆ m_endTxEvent

EventId ns3::WifiPhy::m_endTxEvent
protected

the end of transmit event

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

◆ m_fixedPhyBand

bool ns3::WifiPhy::m_fixedPhyBand
private

True to prohibit changing PHY band after initialization.

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

Referenced by DoChannelSwitch(), HasFixedPhyBand(), and SetFixedPhyBand().

◆ m_frameCaptureModel

Ptr<FrameCaptureModel> ns3::WifiPhy::m_frameCaptureModel
private

Frame capture model.

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

Referenced by DoDispose(), GetTypeId(), SetFrameCaptureModel(), and ns3::PhyEntity::StartReceivePreamble().

◆ m_interference

◆ m_maxModClassSupported

WifiModulationClass ns3::WifiPhy::m_maxModClassSupported
private

max modulation class supported

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

Referenced by ConfigureStandard(), GetMaxModulationClassSupported(), and SetMaxModulationClassSupported().

◆ m_mobility

Ptr<MobilityModel> ns3::WifiPhy::m_mobility
private

Pointer to the mobility model.

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

Referenced by DoDispose(), DoInitialize(), GetMobility(), and SetMobility().

◆ m_noiseFigure

dB_u ns3::WifiPhy::m_noiseFigure
private

The noise figure.

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

Referenced by SetInterferenceHelper(), and SetRxNoiseFigure().

◆ m_notifyRxMacHeaderEnd

bool ns3::WifiPhy::m_notifyRxMacHeaderEnd
private

whether the PHY is capable of notifying MAC header RX end

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

Referenced by GetTypeId(), and ns3::PhyEntity::ScheduleEndOfMpdus().

◆ m_nTxPower

uint8_t ns3::WifiPhy::m_nTxPower
private

Number of available transmission power levels.

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

Referenced by GetNTxPower(), GetPower(), GetTypeId(), and SetNTxPower().

◆ m_numberOfAntennas

uint8_t ns3::WifiPhy::m_numberOfAntennas
private

Number of transmitters.

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

Referenced by SetInterferenceHelper().

◆ m_operatingChannel

WifiPhyOperatingChannel ns3::WifiPhy::m_operatingChannel
private

◆ m_phyEntities

std::map<WifiModulationClass, Ptr<PhyEntity> > ns3::WifiPhy::m_phyEntities
protected

This map holds the supported PHY entities.

The set of parameters (e.g. mode) that this WifiPhy(-derived class) can support can be obtained through it.

When it comes to modes, in conversation we call this set the DeviceRateSet (not a term you'll find in the standard), and it is a superset of standard-defined parameters such as the OperationalRateSet, and the BSSBasicRateSet (which, themselves, have a superset/subset relationship).

Mandatory rates relevant to this WifiPhy can be found by iterating over the elements of this map, for each modulation class, looking for WifiMode objects for which WifiMode::IsMandatory() is true.

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

Referenced by AddPhyEntity(), ConfigureStandard(), DoDispose(), MuMimoSpectrumWifiPhy::DoInitialize(), MuRtsCtsSpectrumWifiPhy::DoInitialize(), OfdmaSpectrumWifiPhy::DoInitialize(), ns3::PhyEntity::EndPreambleDetectionPeriod(), GetPhyEntity(), and GetPhyEntityForPpdu().

◆ m_phyId

uint8_t ns3::WifiPhy::m_phyId
protected

the index of the PHY in the vector of PHYs held by the WifiNetDevice

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

Referenced by GetPhyId(), and SetPhyId().

◆ m_phyMonitorSniffRxTrace

TracedCallback<Ptr<const Packet>, uint16_t , WifiTxVector, MpduInfo, SignalNoiseDbm, uint16_t > ns3::WifiPhy::m_phyMonitorSniffRxTrace
private

A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received.

As a reference with the real world, firing this trace corresponds in the madwifi driver to calling the function ieee80211_input_monitor()

See also
class CallBackTraceSource
Todo
WifiTxVector and signalNoiseDbm should be passed as const references because of their sizes.

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

Referenced by GetTypeId().

◆ m_phyMonitorSniffTxTrace

TracedCallback<Ptr<const Packet>, uint16_t , WifiTxVector, MpduInfo, uint16_t > ns3::WifiPhy::m_phyMonitorSniffTxTrace
private

A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted.

As a reference with the real world, firing this trace corresponds in the madwifi driver to calling the function ieee80211_input_monitor()

See also
class CallBackTraceSource
Todo
WifiTxVector should be passed by const reference because of its size.

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

Referenced by GetTypeId().

◆ m_phyRxBeginTrace

TracedCallback<Ptr<const Packet>, RxPowerWattPerChannelBand> ns3::WifiPhy::m_phyRxBeginTrace
private

The trace source fired when a packet begins the reception process from the medium.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyRxDropTrace

TracedCallback<Ptr<const Packet>, WifiPhyRxfailureReason> ns3::WifiPhy::m_phyRxDropTrace
private

The trace source fired when the PHY layer drops a packet it has received.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyRxEndTrace

TracedCallback<Ptr<const Packet> > ns3::WifiPhy::m_phyRxEndTrace
private

The trace source fired when a packet ends the reception process from the medium.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyRxMacHeaderEndTrace

TracedCallback<const WifiMacHeader&, const WifiTxVector&, Time> ns3::WifiPhy::m_phyRxMacHeaderEndTrace
private

The trace source fired when the reception of a MAC header ends.

This traced callback models the behavior of real PHYs that are able to decode the MAC header of an MPDU being received and make the information therein available to the MAC as soon as the reception of the MAC header ends.

See also
class CallBackTraceSource

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

Referenced by GetTypeId(), and ns3::PhyEntity::ScheduleEndOfMpdus().

◆ m_phyRxPayloadBeginTrace

TracedCallback<WifiTxVector, Time> ns3::WifiPhy::m_phyRxPayloadBeginTrace
private

The trace source fired when the reception of the PHY payload (PSDU) begins.

This traced callback models the behavior of the PHY-RXSTART primitive which is launched upon correct decoding of the PHY header and support of modes within. We thus assume that it is sent just before starting the decoding of the payload, since it's there that support of the header's content is checked. In addition, it's also at that point that the correct decoding of HT-SIG, VHT-SIGs, and HE-SIGs are checked.

See also
class CallBackTraceSource

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

Referenced by ns3::PhyEntity::DoStartReceivePayload(), ns3::PhyEntity::EndReceiveField(), GetTypeId(), and ns3::PhyEntity::NotifyPayloadBegin().

◆ m_phyRxPpduDropTrace

TracedCallback<Ptr<const WifiPpdu>, WifiPhyRxfailureReason> ns3::WifiPhy::m_phyRxPpduDropTrace
private

The trace source fired when the PHY layer drops a packet it has received.

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

Referenced by GetTypeId().

◆ m_phyTxBeginTrace

TracedCallback<Ptr<const Packet>, double> ns3::WifiPhy::m_phyTxBeginTrace
private

The trace source fired when a packet begins the transmission process on the medium.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyTxDropTrace

TracedCallback<Ptr<const Packet> > ns3::WifiPhy::m_phyTxDropTrace
private

The trace source fired when the PHY layer drops a packet as it tries to transmit it.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyTxEndTrace

TracedCallback<Ptr<const Packet> > ns3::WifiPhy::m_phyTxEndTrace
private

The trace source fired when a packet ends the transmission process on the medium.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_phyTxPsduBeginTrace

TracedCallback<WifiConstPsduMap, WifiTxVector, double > ns3::WifiPhy::m_phyTxPsduBeginTrace
private

The trace source fired when a PSDU map begins the transmission process on the medium.

See also
class CallBackTraceSource

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

Referenced by GetTypeId().

◆ m_pifs

Time ns3::WifiPhy::m_pifs
private

PCF Interframe Space (PIFS) duration.

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

Referenced by GetPifs(), GetTypeId(), and SetPifs().

◆ m_postReceptionErrorModel

Ptr<ErrorModel> ns3::WifiPhy::m_postReceptionErrorModel
private

Error model for receive packet events.

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

Referenced by DoDispose(), ns3::PhyEntity::GetReceptionStatus(), GetTypeId(), and SetPostReceptionErrorModel().

◆ m_powerDensityLimit

dBm_per_MHz_u ns3::WifiPhy::m_powerDensityLimit
private

the power density limit

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

Referenced by GetTypeId().

◆ m_powerRestricted

bool ns3::WifiPhy::m_powerRestricted
private

Flag whether transmit power is restricted by OBSS PD SR.

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

Referenced by DoChannelSwitch().

◆ m_preambleDetectionModel

Ptr<PreambleDetectionModel> ns3::WifiPhy::m_preambleDetectionModel
private

Preamble detection model.

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

Referenced by DoDispose(), ns3::PhyEntity::EndPreambleDetectionPeriod(), GetTypeId(), and SetPreambleDetectionModel().

◆ m_previouslyRxPpduUid

uint64_t ns3::WifiPhy::m_previouslyRxPpduUid
protected

◆ m_random

Ptr<UniformRandomVariable> ns3::WifiPhy::m_random
protected

Provides uniform random variables.

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

Referenced by WifiPhy(), DoDispose(), and ns3::PhyEntity::GetRandomValue().

◆ m_rxGain

dB_u ns3::WifiPhy::m_rxGain
private

Reception gain.

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

Referenced by GetRxGain(), and SetRxGain().

◆ m_rxMpduReferenceNumber

uint32_t ns3::WifiPhy::m_rxMpduReferenceNumber
protected

A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU.

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

◆ m_rxSensitivity

dBm_u ns3::WifiPhy::m_rxSensitivity
private

Receive sensitivity threshold.

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

Referenced by GetRxSensitivity(), and SetRxSensitivity().

◆ m_rxSpatialStreams

uint8_t ns3::WifiPhy::m_rxSpatialStreams
private

Number of supported RX spatial streams.

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

◆ m_shortPreamble

bool ns3::WifiPhy::m_shortPreamble
private

Flag if short PHY preamble is supported.

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

Referenced by GetShortPhyPreambleSupported(), and SetShortPhyPreambleSupported().

◆ m_sifs

Time ns3::WifiPhy::m_sifs
private

Short Interframe Space (SIFS) duration.

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

Referenced by GetSifs(), GetTypeId(), and SetSifs().

◆ m_signalTransmissionCb

TracedCallback<Ptr<const WifiPpdu>, const WifiTxVector&> ns3::WifiPhy::m_signalTransmissionCb
protected

Signal Transmission callback.

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

Referenced by GetTypeId(), ns3::SpectrumWifiPhy::StartTx(), and ns3::YansWifiPhy::StartTx().

◆ m_slot

Time ns3::WifiPhy::m_slot
private

Slot duration.

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

Referenced by GetSlot(), GetTypeId(), and SetSlot().

◆ m_standard

WifiStandard ns3::WifiPhy::m_standard
private

WifiStandard.

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

Referenced by ConfigureStandard(), DoChannelSwitch(), GetLatestPhyEntity(), GetStandard(), and SetOperatingChannel().

◆ m_state

◆ m_timeLastPreambleDetected

Time ns3::WifiPhy::m_timeLastPreambleDetected
private

Record the time the last preamble was detected.

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

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::StartReceivePreamble().

◆ m_txGain

dB_u ns3::WifiPhy::m_txGain
private

Transmission gain.

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

Referenced by GetTxGain(), and SetTxGain().

◆ m_txMpduReferenceNumber

uint32_t ns3::WifiPhy::m_txMpduReferenceNumber
protected

A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU.

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

◆ m_txPowerBase

dBm_u ns3::WifiPhy::m_txPowerBase
private

Minimum transmission power.

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

Referenced by GetPower(), GetTxPowerStart(), and SetTxPowerStart().

◆ m_txPowerEnd

dBm_u ns3::WifiPhy::m_txPowerEnd
private

Maximum transmission power.

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

Referenced by GetPower(), GetTxPowerEnd(), and SetTxPowerEnd().

◆ m_txPowerMaxMimo

dBm_u ns3::WifiPhy::m_txPowerMaxMimo
private

MIMO maximum transmit power due to OBSS PD SR power restriction.

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

◆ m_txPowerMaxSiso

dBm_u ns3::WifiPhy::m_txPowerMaxSiso
private

SISO maximum transmit power due to OBSS PD SR power restriction.

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

◆ m_txSpatialStreams

uint8_t ns3::WifiPhy::m_txSpatialStreams
private

Number of supported TX spatial streams.

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

Referenced by Configure80211n().

◆ m_wifiRadioEnergyModel

Ptr<WifiRadioEnergyModel> ns3::WifiPhy::m_wifiRadioEnergyModel
private

Wifi radio energy model.

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

Referenced by DoDispose(), and SetWifiRadioEnergyModel().


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