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

Abstract class for PHY entities. More...

#include "phy-entity.h"

+ Inheritance diagram for ns3::PhyEntity:
+ Collaboration diagram for ns3::PhyEntity:

Classes

struct  PhyFieldRxStatus
 Status of the reception of the PPDU field. More...
 
struct  SnrPer
 A struct for both SNR and PER. More...
 

Public Types

typedef std::pair< std::pair< Time, Time >, WifiModePhyHeaderChunkInfo
 A pair containing information on the PHY header chunk, namely the start and stop times of the chunk and the WifiMode used. More...
 
typedef std::map< WifiPpduField, PhyHeaderChunkInfoPhyHeaderSections
 A map of PhyHeaderChunkInfo elements per PPDU field. More...
 
enum  PhyRxFailureAction { DROP = 0 , ABORT , IGNORE }
 Action to perform in case of RX failure. More...
 

Public Member Functions

virtual ~PhyEntity ()
 Destructor for PHY entity. More...
 
std::list< WifiMode >::const_iterator begin (void) const
 Return a const iterator to the first WifiMode. More...
 
virtual Ptr< WifiPpduBuildPpdu (const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration)
 Build amendment-specific PPDU. More...
 
Time CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector) const
 
virtual Time CalculateTxDuration (WifiConstPsduMap psduMap, const WifiTxVector &txVector, WifiPhyBand band) const
 
virtual void CancelAllEvents (void)
 Cancel and clear all running events. More...
 
void CancelRunningEndPreambleDetectionEvents (bool clear=false)
 Cancel and eventually clear all end preamble detection events. More...
 
std::list< WifiMode >::const_iterator end (void) const
 Return a const iterator to past-the-last WifiMode. More...
 
void EndReceiveField (WifiPpduField field, Ptr< Event > event)
 End receiving a given field. More...
 
void EndReceivePayload (Ptr< Event > event)
 The last symbol of the PPDU has arrived. More...
 
virtual Ptr< const WifiPsduGetAddressedPsduInPpdu (Ptr< const WifiPpdu > ppdu) const
 Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU). More...
 
virtual double GetCcaThreshold (const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType) const
 Return the CCA threshold in dBm for a given channel type. More...
 
virtual Time GetDuration (WifiPpduField field, const WifiTxVector &txVector) const
 Get the duration of the PPDU field (or group of fields) used by this entity for the given transmission parameters. More...
 
Time GetDurationUpToField (WifiPpduField field, const WifiTxVector &txVector) const
 Get the duration of the PPDU up to (but excluding) the given field. More...
 
virtual uint32_t GetMaxPsduSize (void) const =0
 Get the maximum PSDU size in bytes. More...
 
virtual WifiMode GetMcs (uint8_t index) const
 Get the WifiMode corresponding to the given MCS index. More...
 
WifiPpduField GetNextField (WifiPpduField currentField, WifiPreamble preamble) const
 Return the field following the provided one. More...
 
virtual uint8_t GetNumModes (void) const
 
virtual Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const =0
 
PhyHeaderSections GetPhyHeaderSections (const WifiTxVector &txVector, Time ppduStart) const
 Return a map of PHY header chunk information per PPDU field. More...
 
Time GetRemainingDurationAfterField (Ptr< const WifiPpdu > ppdu, WifiPpduField field) const
 Get the remaining duration of the PPDU after the end of the given field. More...
 
virtual WifiMode GetSigMode (WifiPpduField field, const WifiTxVector &txVector) const
 Get the WifiMode for the SIG field specified by the PPDU field. More...
 
virtual uint16_t GetStaId (const Ptr< const WifiPpdu > ppdu) const
 Return the STA ID that has been assigned to the station this PHY belongs to. More...
 
virtual WifiConstPsduMap GetWifiConstPsduMap (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) const
 Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU. More...
 
virtual bool HandlesMcsModes (void) const
 Check if the WifiModes handled by this PHY are MCSs. More...
 
virtual bool IsMcsSupported (uint8_t index) const
 Check if the WifiMode corresponding to the given MCS index is supported. More...
 
virtual bool IsModeSupported (WifiMode mode) const
 Check if the WifiMode is supported. More...
 
bool NoEndPreambleDetectionEvents (void) const
 
virtual void NotifyCcaBusy (const Ptr< const WifiPpdu > ppdu, Time duration, WifiChannelListType channelType)
 Notify PHY state helper to switch to CCA busy state,. More...
 
void ResetReceive (Ptr< Event > event)
 Reset PHY at the end of the PPDU under reception after it has failed the PHY header. More...
 
void SetOwner (Ptr< WifiPhy > wifiPhy)
 Set the WifiPhy owning this PHY entity. More...
 
void StartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field. More...
 
virtual void StartReceivePreamble (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW, Time rxDuration)
 Start receiving the PHY preamble of a PPDU (i.e. More...
 
virtual void StartTx (Ptr< const WifiPpdu > ppdu)
 This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actions. More...
 
virtual void SwitchMaybeToCcaBusy (const Ptr< const WifiPpdu > ppdu)
 Check if PHY state should move to CCA busy state based on current state of interference tracker. More...
 
void Transmit (Time txDuration, Ptr< const WifiPpdu > ppdu, std::string type)
 This function prepares most of the WifiSpectrumSignalParameters parameters and invokes SpectrumWifiPhy's Transmit method. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< PhyEntity >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Protected Types

using CcaIndication = std::optional< std::pair< Time, WifiChannelListType > >
 CCA end time and its corresponding channel list type (can be std::nullopt if IDLE) More...
 
typedef std::pair< WifiCodeRate, uint16_t > CodeRateConstellationSizePair
 A pair to hold modulation information: code rate and constellation size. More...
 
typedef std::map< std::string, CodeRateConstellationSizePairModulationLookupTable
 A modulation lookup table using unique name of modulation as key. More...
 
typedef std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
 A map of PPDU field elements per preamble type. More...
 
typedef std::pair< uint64_t, uint16_t > UidStaIdPair
 A pair of a UID and STA_ID. More...
 

Protected Member Functions

void AbortCurrentReception (WifiPhyRxfailureReason reason)
 Abort the current reception. More...
 
void AddPreambleEvent (Ptr< Event > event)
 Add an entry to the map of current preamble events (stored in WifiPhy). More...
 
Ptr< EventCreateInterferenceEvent (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector, Time duration, RxPowerWattPerChannelBand &rxPower, bool isStartOfdmaRxing=false)
 Create an event using WifiPhy's InterferenceHelper class. More...
 
virtual void DoAbortCurrentReception (WifiPhyRxfailureReason reason)
 Perform amendment-specific actions before aborting the current reception. More...
 
virtual PhyFieldRxStatus DoEndReceiveField (WifiPpduField field, Ptr< Event > event)
 End receiving a given field, perform amendment-specific actions, and provide the status of the reception. More...
 
virtual void DoEndReceivePayload (Ptr< const WifiPpdu > ppdu)
 Perform amendment-specific actions at the end of the reception of the payload. More...
 
virtual PhyFieldRxStatus DoEndReceivePreamble (Ptr< Event > event)
 End receiving the preamble, perform amendment-specific actions, and provide the status of the reception. More...
 
virtual Ptr< EventDoGetEvent (Ptr< const WifiPpdu > ppdu, RxPowerWattPerChannelBand &rxPowersW)
 Get the event corresponding to the incoming PPDU. More...
 
virtual void DoResetReceive (Ptr< Event > event)
 Perform amendment-specific actions before resetting PHY at the end of the PPDU under reception after it has failed the PHY header. More...
 
virtual bool DoStartReceiveField (WifiPpduField field, Ptr< Event > event)
 Start receiving a given field, perform amendment-specific actions, and signify if it is supported. More...
 
virtual Time DoStartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e. More...
 
void DropPreambleEvent (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason, Time endRx)
 Drop the PPDU and the corresponding preamble detection event, but keep CCA busy state after the completion of the currently processed event. More...
 
void EndOfMpdu (Ptr< Event > event, Ptr< const WifiPsdu > psdu, size_t mpduIndex, Time relativeStart, Time mpduDuration)
 The last symbol of an MPDU in an A-MPDU has arrived. More...
 
void EndPreambleDetectionPeriod (Ptr< Event > event)
 End the preamble detection period. More...
 
void ErasePreambleEvent (Ptr< const WifiPpdu > ppdu, Time rxDuration)
 Erase the event corresponding to the PPDU from the list of preamble events, but consider it as noise after the completion of the current event. More...
 
virtual CcaIndication GetCcaIndication (const Ptr< const WifiPpdu > ppdu)
 Get CCA end time and its corresponding channel list type when a new signal has been received by the PHY. More...
 
uint16_t GetCenterFrequencyForChannelWidth (const WifiTxVector &txVector) const
 Get the center frequency of the channel corresponding the current TxVector rather than that of the supported channel width. More...
 
virtual std::pair< uint16_t, WifiSpectrumBandGetChannelWidthAndBand (const WifiTxVector &txVector, uint16_t staId) const
 Get the channel width and band to use (will be overloaded by child classes). More...
 
Ptr< const EventGetCurrentEvent (void) const
 Get the pointer to the current event (stored in WifiPhy). More...
 
const std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > & GetCurrentPreambleEvents (void) const
 Get the map of current preamble events (stored in WifiPhy). More...
 
Time GetDelayUntilCcaEnd (double thresholdDbm, WifiSpectrumBand band)
 Return the delay until CCA busy is ended for a given sensitivity threshold (in dBm) and a given band. More...
 
uint16_t GetGuardBandwidth (uint16_t currentChannelWidth) const
 
virtual uint16_t GetMeasurementChannelWidth (const Ptr< const WifiPpdu > ppdu) const =0
 Return the channel width used to measure the RSSI. More...
 
SnrPer GetPhyHeaderSnrPer (WifiPpduField field, Ptr< Event > event) const
 Obtain the SNR and PER of the PPDU field from the WifiPhy's InterferenceHelper class. More...
 
virtual const PpduFormatsGetPpduFormats (void) const =0
 Return the PPDU formats of the PHY. More...
 
WifiSpectrumBand GetPrimaryBand (uint16_t bandWidth) const
 If the operating channel width is a multiple of 20 MHz, return the start band index and the stop band index for the primary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width). More...
 
double GetRandomValue (void) const
 Obtain a random value from the WifiPhy's generator. More...
 
std::pair< bool, SignalNoiseDbmGetReceptionStatus (Ptr< const WifiPsdu > psdu, Ptr< Event > event, uint16_t staId, Time relativeMpduStart, Time mpduDuration)
 Get the reception status for the provided MPDU and notify. More...
 
virtual uint16_t GetRxChannelWidth (const WifiTxVector &txVector) const
 Return the channel width used in the reception spectrum model. More...
 
double GetRxPowerWForPpdu (Ptr< Event > event) const
 Obtain the received power (W) for a given band. More...
 
WifiSpectrumBand GetSecondaryBand (uint16_t bandWidth) const
 If the channel bonding is used, return the start band index and the stop band index for the secondary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width). More...
 
std::tuple< double, double, doubleGetTxMaskRejectionParams (void) const
 
virtual Ptr< SpectrumValueGetTxPowerSpectralDensity (double txPowerW, Ptr< const WifiPpdu > ppdu) const =0
 
virtual bool IsConfigSupported (Ptr< const WifiPpdu > ppdu) const
 Checks if the signaled configuration (excluding bandwidth) is supported by the PHY. More...
 
void NotifyInterferenceRxEndAndClear (bool reset)
 Notify WifiPhy's InterferenceHelper of the end of the reception, clear maps and end of MPDU event, and eventually reset WifiPhy. More...
 
void NotifyPayloadBegin (const WifiTxVector &txVector, const Time &payloadDuration)
 Fire the trace indicating that the PHY is starting to receive the payload of a PPDU. More...
 
virtual uint64_t ObtainNextUid (const WifiTxVector &txVector)
 Obtain the next UID for the PPDU to transmit. More...
 
virtual void RxPayloadFailed (Ptr< const WifiPsdu > psdu, double snr, const WifiTxVector &txVector)
 Perform amendment-specific actions when the payload is unsuccessfully received. More...
 
virtual void RxPayloadSucceeded (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, uint16_t staId, const std::vector< bool > &statusPerMpdu)
 Perform amendment-specific actions when the payload is successfully received. More...
 
void ScheduleEndOfMpdus (Ptr< Event > event)
 Schedule end of MPDUs events. More...
 
void StartPreambleDetectionPeriod (Ptr< Event > event)
 Start the preamble detection period. More...
 
void StartReceivePayload (Ptr< Event > event)
 Start receiving the PSDU (i.e. More...
 
void UpdateInterferenceEvent (Ptr< Event > event, const RxPowerWattPerChannelBand &rxPower)
 Update an event in WifiPhy's InterferenceHelper class. More...
 

Protected Attributes

std::vector< EventIdm_endOfMpduEvents
 the end of MPDU events (only used for A-MPDUs) More...
 
std::vector< EventIdm_endPreambleDetectionEvents
 the end of preamble detection events More...
 
std::vector< EventIdm_endRxPayloadEvents
 the end of receive events (only one unless UL MU reception) More...
 
std::list< WifiModem_modeList
 the list of supported modes More...
 
std::map< UidStaIdPair, SignalNoiseDbmm_signalNoiseMap
 Map of the latest signal power and noise power in dBm (noise power includes the noise figure) More...
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper of the WifiPhy (to make it reachable for child classes) More...
 
std::map< UidStaIdPair, std::vector< bool > > m_statusPerMpduMap
 Map of the current reception status per MPDU that is filled in as long as MPDUs are being processed by the PHY in case of an A-MPDU. More...
 
Ptr< WifiPhym_wifiPhy
 Pointer to the owning WifiPhy. More...
 

Static Protected Attributes

static uint64_t m_globalPpduUid = 0
 Global counter of the PPDU UID. More...
 

Detailed Description

Abstract class for PHY entities.

This class enables to have a unique set of APIs to be used by each PHY entity, corresponding to the different amendments of the IEEE 802.11 standard.

Definition at line 95 of file phy-entity.h.

Member Typedef Documentation

◆ CcaIndication

using ns3::PhyEntity::CcaIndication = std::optional<std::pair<Time, WifiChannelListType> >
protected

CCA end time and its corresponding channel list type (can be std::nullopt if IDLE)

Definition at line 870 of file phy-entity.h.

◆ CodeRateConstellationSizePair

typedef std::pair<WifiCodeRate, uint16_t> ns3::PhyEntity::CodeRateConstellationSizePair
protected

A pair to hold modulation information: code rate and constellation size.

Definition at line 492 of file phy-entity.h.

◆ ModulationLookupTable

typedef std::map<std::string, CodeRateConstellationSizePair> ns3::PhyEntity::ModulationLookupTable
protected

A modulation lookup table using unique name of modulation as key.

Definition at line 497 of file phy-entity.h.

◆ PhyHeaderChunkInfo

typedef std::pair<std::pair<Time , Time >, WifiMode> ns3::PhyEntity::PhyHeaderChunkInfo

A pair containing information on the PHY header chunk, namely the start and stop times of the chunk and the WifiMode used.

Definition at line 298 of file phy-entity.h.

◆ PhyHeaderSections

A map of PhyHeaderChunkInfo elements per PPDU field.

See also
PhyHeaderChunkInfo

Definition at line 303 of file phy-entity.h.

◆ PpduFormats

typedef std::map<WifiPreamble, std::vector<WifiPpduField> > ns3::PhyEntity::PpduFormats
protected

A map of PPDU field elements per preamble type.

This corresponds to the different PPDU formats introduced by each amendment.

Definition at line 487 of file phy-entity.h.

◆ UidStaIdPair

typedef std::pair<uint64_t , uint16_t > ns3::PhyEntity::UidStaIdPair
protected

A pair of a UID and STA_ID.

Definition at line 894 of file phy-entity.h.

Member Enumeration Documentation

◆ PhyRxFailureAction

Action to perform in case of RX failure.

Enumerator
DROP 

drop PPDU and set CCA_BUSY

ABORT 

abort reception of PPDU

IGNORE 

ignore the reception

Definition at line 102 of file phy-entity.h.

Constructor & Destructor Documentation

◆ ~PhyEntity()

ns3::PhyEntity::~PhyEntity ( )
virtual

Destructor for PHY entity.

Definition at line 75 of file phy-entity.cc.

References CancelAllEvents(), m_modeList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ AbortCurrentReception()

void ns3::PhyEntity::AbortCurrentReception ( WifiPhyRxfailureReason  reason)
protected

Abort the current reception.

Parameters
reasonthe reason the reception is aborted

Definition at line 976 of file phy-entity.cc.

References ns3::WifiPhy::AbortCurrentReception(), DoAbortCurrentReception(), m_wifiPhy, and NS_LOG_FUNCTION.

Referenced by EndReceiveField(), and StartReceivePreamble().

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

◆ AddPreambleEvent()

void ns3::PhyEntity::AddPreambleEvent ( Ptr< Event event)
protected

Add an entry to the map of current preamble events (stored in WifiPhy).

Wrapper used by child classes.

Parameters
eventthe event holding incoming PPDU's information

Definition at line 750 of file phy-entity.cc.

References ns3::WifiPhy::m_currentPreambleEvents, m_wifiPhy, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

◆ begin()

std::list< WifiMode >::const_iterator ns3::PhyEntity::begin ( void  ) const

Return a const iterator to the first WifiMode.

Returns
a const iterator to the first WifiMode.

Definition at line 130 of file phy-entity.cc.

References m_modeList.

◆ BuildPpdu()

Ptr< WifiPpdu > ns3::PhyEntity::BuildPpdu ( const WifiConstPsduMap psdus,
const WifiTxVector txVector,
Time  ppduDuration 
)
virtual

Build amendment-specific PPDU.

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

Reimplemented in ns3::EhtPhy, ns3::HePhy, ns3::HtPhy, ns3::DsssPhy, ns3::ErpOfdmPhy, ns3::OfdmPhy, and ns3::VhtPhy.

Definition at line 230 of file phy-entity.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelCenterFrequency(), m_wifiPhy, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CalculatePhyPreambleAndHeaderDuration()

Time ns3::PhyEntity::CalculatePhyPreambleAndHeaderDuration ( const WifiTxVector txVector) const
Parameters
txVectorthe transmission parameters
Returns
the total duration of the PHY preamble and PHY header.

Definition at line 188 of file phy-entity.cc.

References GetDuration(), ns3::MicroSeconds(), ns3::WIFI_PPDU_FIELD_DATA, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by DoStartReceivePayload(), ns3::HePhy::DoStartReceivePayload(), EndReceivePayload(), GetDurationUpToField(), ScheduleEndOfMpdus(), and ns3::HePhy::StartReceiveOfdmaPayload().

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

◆ CalculateTxDuration()

Time ns3::PhyEntity::CalculateTxDuration ( WifiConstPsduMap  psduMap,
const WifiTxVector txVector,
WifiPhyBand  band 
) const
virtual
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

Reimplemented in ns3::HePhy.

Definition at line 1173 of file phy-entity.cc.

References ns3::WifiPhy::CalculateTxDuration(), and NS_ASSERT.

+ Here is the call graph for this function:

◆ CancelAllEvents()

void ns3::PhyEntity::CancelAllEvents ( void  )
virtual

Cancel and clear all running events.

Reimplemented in ns3::HePhy.

Definition at line 932 of file phy-entity.cc.

References m_endOfMpduEvents, m_endPreambleDetectionEvents, m_endRxPayloadEvents, and NS_LOG_FUNCTION.

Referenced by ~PhyEntity(), and ns3::HePhy::CancelAllEvents().

+ Here is the caller graph for this function:

◆ CancelRunningEndPreambleDetectionEvents()

void ns3::PhyEntity::CancelRunningEndPreambleDetectionEvents ( bool  clear = false)

Cancel and eventually clear all end preamble detection events.

Parameters
clearwhether to clear the end preamble detection events' list

Definition at line 959 of file phy-entity.cc.

References m_endPreambleDetectionEvents, and NS_LOG_FUNCTION.

◆ CreateInterferenceEvent()

Ptr< Event > ns3::PhyEntity::CreateInterferenceEvent ( Ptr< const WifiPpdu ppdu,
const WifiTxVector txVector,
Time  duration,
RxPowerWattPerChannelBand rxPower,
bool  isStartOfdmaRxing = false 
)
protected

Create an event using WifiPhy's InterferenceHelper class.

Wrapper used by child classes.

Add the PPDU-related signal to interference helper.

Parameters
ppduthe PPDU
txVectorthe TXVECTOR
durationthe PPDU duration
rxPowerreceived power per band (W)
isStartOfdmaRxingflag whether the event corresponds to the start of the OFDMA payload reception (only used for UL-OFDMA) //TODO simplify this once WifiPpdu is subclassed by adding an attribute
Returns
Event

Definition at line 770 of file phy-entity.cc.

References ns3::WifiPhy::m_interference, and m_wifiPhy.

Referenced by DoGetEvent(), ns3::HePhy::DoGetEvent(), and ns3::HePhy::StartReceivePreamble().

+ Here is the caller graph for this function:

◆ DoAbortCurrentReception()

void ns3::PhyEntity::DoAbortCurrentReception ( WifiPhyRxfailureReason  reason)
protectedvirtual

Perform amendment-specific actions before aborting the current reception.

Parameters
reasonthe reason the reception is aborted

Reimplemented in ns3::HePhy.

Definition at line 984 of file phy-entity.cc.

References ns3::WifiPhy::m_currentEvent, m_endOfMpduEvents, m_wifiPhy, and NS_LOG_FUNCTION.

Referenced by AbortCurrentReception(), and ns3::HePhy::DoAbortCurrentReception().

+ Here is the caller graph for this function:

◆ DoEndReceiveField()

PhyEntity::PhyFieldRxStatus ns3::PhyEntity::DoEndReceiveField ( WifiPpduField  field,
Ptr< Event event 
)
protectedvirtual

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

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

Reimplemented in ns3::EhtPhy, ns3::HtPhy, ns3::DsssPhy, ns3::OfdmPhy, and ns3::VhtPhy.

Definition at line 353 of file phy-entity.cc.

References DoEndReceivePreamble(), NS_ASSERT, NS_LOG_FUNCTION, ns3::WIFI_PPDU_FIELD_DATA, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by ns3::DsssPhy::DoEndReceiveField(), ns3::OfdmPhy::DoEndReceiveField(), and EndReceiveField().

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

◆ DoEndReceivePayload()

void ns3::PhyEntity::DoEndReceivePayload ( Ptr< const WifiPpdu ppdu)
protectedvirtual

Perform amendment-specific actions at the end of the reception of the payload.

Parameters
ppduthe incoming PPDU

Reimplemented in ns3::HePhy.

Definition at line 691 of file phy-entity.cc.

References ns3::WifiPhy::GetLastRxEndTime(), ns3::WifiPhy::m_currentEvent, ns3::WifiPhy::m_currentPreambleEvents, m_endRxPayloadEvents, m_wifiPhy, NotifyInterferenceRxEndAndClear(), ns3::Simulator::Now(), NS_ASSERT, and NS_LOG_FUNCTION.

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

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

◆ DoEndReceivePreamble()

PhyEntity::PhyFieldRxStatus ns3::PhyEntity::DoEndReceivePreamble ( Ptr< Event event)
protectedvirtual

End receiving the preamble, perform amendment-specific actions, and provide the status of the reception.

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

Definition at line 799 of file phy-entity.cc.

References ns3::WifiPhy::m_currentPreambleEvents, m_wifiPhy, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by DoEndReceiveField().

+ Here is the caller graph for this function:

◆ DoGetEvent()

Ptr< Event > ns3::PhyEntity::DoGetEvent ( Ptr< const WifiPpdu ppdu,
RxPowerWattPerChannelBand rxPowersW 
)
protectedvirtual

Get the event corresponding to the incoming PPDU.

We store all incoming preamble events, perform amendment-specific actions, and a decision is made at the end of the preamble detection window.

Parameters
ppduthe incoming PPDU
rxPowersWthe receive power in W per band
Returns
the event holding the incoming PPDU's information

Reimplemented in ns3::HePhy.

Definition at line 758 of file phy-entity.cc.

References CreateInterferenceEvent(), ns3::WifiPhy::m_currentPreambleEvents, m_wifiPhy, and NS_ASSERT.

Referenced by ns3::HePhy::DoGetEvent(), and StartReceivePreamble().

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

◆ DoResetReceive()

void ns3::PhyEntity::DoResetReceive ( Ptr< Event event)
protectedvirtual

Perform amendment-specific actions before resetting PHY at the end of the PPDU under reception after it has failed the PHY header.

Parameters
eventthe event holding incoming PPDU's information

Reimplemented in ns3::HePhy.

Definition at line 1012 of file phy-entity.cc.

References ns3::Simulator::Now(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ResetReceive().

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

◆ DoStartReceiveField()

bool ns3::PhyEntity::DoStartReceiveField ( WifiPpduField  field,
Ptr< Event event 
)
protectedvirtual

Start receiving a given field, perform amendment-specific actions, and signify if it is supported.

Parameters
fieldthe starting PPDU field
eventthe event holding incoming PPDU's information
Returns
true if the field is supported, false otherwise

Definition at line 335 of file phy-entity.cc.

References GetPpduFormats(), NS_ASSERT, NS_LOG_FUNCTION, ns3::WIFI_PPDU_FIELD_DATA, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by StartReceiveField().

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

◆ DoStartReceivePayload()

Time ns3::PhyEntity::DoStartReceivePayload ( Ptr< Event event)
protectedvirtual

Start receiving the PSDU (i.e.

the first symbol of the PSDU has arrived) and perform amendment-specific actions.

Parameters
eventthe event holding incoming PPDU's information
Returns
the payload duration

Reimplemented in ns3::HePhy.

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

References CalculatePhyPreambleAndHeaderDuration(), EndReceivePayload(), GetStaId(), m_endRxPayloadEvents, ns3::WifiPhy::m_phyRxPayloadBeginTrace, m_signalNoiseMap, m_statusPerMpduMap, m_wifiPhy, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and ScheduleEndOfMpdus().

Referenced by ns3::HePhy::DoStartReceivePayload(), and StartReceivePayload().

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

◆ DropPreambleEvent()

void ns3::PhyEntity::DropPreambleEvent ( Ptr< const WifiPpdu ppdu,
WifiPhyRxfailureReason  reason,
Time  endRx 
)
protected

Drop the PPDU and the corresponding preamble detection event, but keep CCA busy state after the completion of the currently processed event.

Parameters
ppduthe incoming PPDU
reasonthe reason the PPDU is dropped
endRxthe end of the incoming PPDU's reception

Definition at line 485 of file phy-entity.cc.

References GetAddressedPsduInPpdu(), ns3::WifiPhy::IsStateOff(), ns3::WifiPhy::IsStateSleep(), ns3::WifiPhy::m_currentPreambleEvents, m_state, m_wifiPhy, ns3::WifiPhy::NotifyRxDrop(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::WifiPhy::SwitchMaybeToCcaBusy().

Referenced by EndPreambleDetectionPeriod(), and StartReceivePreamble().

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

◆ end()

std::list< WifiMode >::const_iterator ns3::PhyEntity::end ( void  ) const

Return a const iterator to past-the-last WifiMode.

Returns
a const iterator to past-the-last WifiMode.

Definition at line 136 of file phy-entity.cc.

References m_modeList.

Referenced by grid.TimelinesRenderer::draw_events(), and grid.TimelinesRenderer::draw_ranges().

+ Here is the caller graph for this function:

◆ EndOfMpdu()

void ns3::PhyEntity::EndOfMpdu ( Ptr< Event event,
Ptr< const WifiPsdu psdu,
size_t  mpduIndex,
Time  relativeStart,
Time  mpduDuration 
)
protected

The last symbol of an MPDU in an A-MPDU has arrived.

Parameters
eventthe event holding incoming PPDU's information
psduthe arriving MPDU formatted as a PSDU containing a normal MPDU
mpduIndexthe index of the MPDU within the A-MPDU
relativeStartthe relative start time of the MPDU within the A-MPDU.
mpduDurationthe duration of the MPDU

Definition at line 603 of file phy-entity.cc.

References ns3::Time::As(), ns3::Copy(), GetAddressedPsduInPpdu(), GetReceptionStatus(), GetStaId(), m_signalNoiseMap, m_state, m_statusPerMpduMap, ns3::Time::NS, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::RxSignalInfo::rssi, and ns3::RxSignalInfo::snr.

Referenced by ScheduleEndOfMpdus().

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

◆ EndPreambleDetectionPeriod()

◆ EndReceiveField()

void ns3::PhyEntity::EndReceiveField ( WifiPpduField  field,
Ptr< Event event 
)

End receiving a given field.

This method will call the DoEndReceiveField to obtain the outcome of the reception. In case of success, reception of the next field is triggered. In case of failure, the indications in the returned

See also
PhyFieldRxStatus are performed.
Parameters
fieldthe ending PPDU field
eventthe event holding incoming PPDU's information

Definition at line 282 of file phy-entity.cc.

References ABORT, AbortCurrentReception(), ns3::PhyEntity::PhyFieldRxStatus::actionIfFailure, DoEndReceiveField(), DROP, ns3::FILTERED, GetAddressedPsduInPpdu(), GetNextField(), ns3::WifiTxVector::GetPreambleType(), GetRemainingDurationAfterField(), IGNORE, ns3::EventId::IsExpired(), ns3::PhyEntity::PhyFieldRxStatus::isSuccess, ns3::WifiPhy::m_endPhyRxEvent, m_endRxPayloadEvents, ns3::WifiPhy::m_phyRxPayloadBeginTrace, m_state, m_wifiPhy, ns3::NanoSeconds(), ns3::WifiPhy::NotifyCcaBusy(), ns3::WifiPhy::NotifyRxDrop(), ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::PhyEntity::PhyFieldRxStatus::reason, ResetReceive(), ns3::Simulator::Schedule(), StartReceiveField(), and ns3::WifiPhy::SwitchMaybeToCcaBusy().

Referenced by EndPreambleDetectionPeriod(), and StartReceiveField().

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

◆ EndReceivePayload()

◆ ErasePreambleEvent()

void ns3::PhyEntity::ErasePreambleEvent ( Ptr< const WifiPpdu ppdu,
Time  rxDuration 
)
protected

Erase the event corresponding to the PPDU from the list of preamble events, but consider it as noise after the completion of the current event.

Parameters
ppduthe incoming PPDU
rxDurationthe duration of the PPDU

Definition at line 502 of file phy-entity.cc.

References ns3::WifiPhy::m_currentPreambleEvents, m_state, m_wifiPhy, NS_LOG_FUNCTION, ns3::WifiPhy::Reset(), and ns3::WifiPhy::SwitchMaybeToCcaBusy().

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

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

◆ GetAddressedPsduInPpdu()

Ptr< const WifiPsdu > ns3::PhyEntity::GetAddressedPsduInPpdu ( Ptr< const WifiPpdu ppdu) const
virtual

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

Reimplemented in ns3::HePhy.

Definition at line 205 of file phy-entity.cc.

Referenced by DropPreambleEvent(), EndOfMpdu(), EndPreambleDetectionPeriod(), EndReceiveField(), EndReceivePayload(), ns3::HePhy::GetAddressedPsduInPpdu(), and ScheduleEndOfMpdus().

+ Here is the caller graph for this function:

◆ GetCcaIndication()

PhyEntity::CcaIndication ns3::PhyEntity::GetCcaIndication ( const Ptr< const WifiPpdu ppdu)
protectedvirtual

Get CCA end time and its corresponding channel list type when a new signal has been received by the PHY.

Parameters
ppduthe incoming PPDU or nullptr for any signal
Returns
CCA end time and its corresponding channel list type when a new signal has been received by the PHY, or std::nullopt if all channel list types are IDLE.

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

Definition at line 1092 of file phy-entity.cc.

References GetCcaThreshold(), GetDelayUntilCcaEnd(), GetMeasurementChannelWidth(), GetPrimaryBand(), ns3::Time::IsStrictlyPositive(), NS_LOG_FUNCTION, and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by ns3::HtPhy::GetCcaIndication(), and SwitchMaybeToCcaBusy().

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

◆ GetCcaThreshold()

double ns3::PhyEntity::GetCcaThreshold ( const Ptr< const WifiPpdu ppdu,
WifiChannelListType  channelType 
) const
virtual

Return the CCA threshold in dBm for a given channel type.

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

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

Reimplemented in ns3::HePhy, ns3::OfdmPhy, and ns3::VhtPhy.

Definition at line 1060 of file phy-entity.cc.

References ns3::WifiPhy::GetCcaEdThreshold(), ns3::WifiPhy::GetCcaSensitivityThreshold(), and m_wifiPhy.

Referenced by GetCcaIndication(), and ns3::OfdmPhy::GetCcaThreshold().

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

◆ GetCenterFrequencyForChannelWidth()

uint16_t ns3::PhyEntity::GetCenterFrequencyForChannelWidth ( const WifiTxVector txVector) const
protected

Get the center frequency of the channel corresponding the current TxVector rather than that of the supported channel width.

Consider that this "primary channel" is on the lower part for the time being.

Parameters
txVectorthe TXVECTOR that has the channel width that is to be used
Returns
the center frequency in MHz corresponding to the channel width to be used

Definition at line 1121 of file phy-entity.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelCenterFrequency(), m_wifiPhy, and NS_LOG_FUNCTION.

Referenced by ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), ns3::HePhy::GetTxPowerSpectralDensity(), ns3::HtPhy::GetTxPowerSpectralDensity(), ns3::DsssPhy::GetTxPowerSpectralDensity(), ns3::OfdmPhy::GetTxPowerSpectralDensity(), and Transmit().

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

◆ GetChannelWidthAndBand()

std::pair< uint16_t, WifiSpectrumBand > ns3::PhyEntity::GetChannelWidthAndBand ( const WifiTxVector txVector,
uint16_t  staId 
) const
protectedvirtual

Get the channel width and band to use (will be overloaded by child classes).

Parameters
txVectorthe transmission parameters
staIdthe station ID of the PSDU
Returns
a pair of channel width (MHz) and band

Reimplemented in ns3::HePhy.

Definition at line 737 of file phy-entity.cc.

References GetPrimaryBand(), and GetRxChannelWidth().

Referenced by EndReceivePayload(), ns3::HePhy::GetChannelWidthAndBand(), and GetReceptionStatus().

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

◆ GetCurrentEvent()

Ptr< const Event > ns3::PhyEntity::GetCurrentEvent ( void  ) const
protected

Get the pointer to the current event (stored in WifiPhy).

Wrapper used by child classes.

Returns
the pointer to the current event

Definition at line 1031 of file phy-entity.cc.

References ns3::WifiPhy::m_currentEvent, and m_wifiPhy.

Referenced by ns3::HePhy::DoGetEvent(), ns3::HePhy::StartReceiveOfdmaPayload(), and ns3::HePhy::StartReceivePreamble().

+ Here is the caller graph for this function:

◆ GetCurrentPreambleEvents()

const std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > & ns3::PhyEntity::GetCurrentPreambleEvents ( void  ) const
protected

Get the map of current preamble events (stored in WifiPhy).

Wrapper used by child classes.

Returns
the reference to the map of current preamble events

Definition at line 744 of file phy-entity.cc.

References ns3::WifiPhy::m_currentPreambleEvents, and m_wifiPhy.

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

+ Here is the caller graph for this function:

◆ GetDelayUntilCcaEnd()

Time ns3::PhyEntity::GetDelayUntilCcaEnd ( double  thresholdDbm,
WifiSpectrumBand  band 
)
protected

Return the delay until CCA busy is ended for a given sensitivity threshold (in dBm) and a given band.

Parameters
thresholdDbmthe CCA sensitivity threshold in dBm
bandidentify the requested band
Returns
the delay until CCA busy is ended

Definition at line 1066 of file phy-entity.cc.

References ns3::DbmToW(), ns3::WifiPhy::m_interference, and m_wifiPhy.

Referenced by GetCcaIndication(), ns3::HtPhy::GetCcaIndication(), ns3::VhtPhy::GetCcaIndication(), and ns3::HePhy::GetPer20MHzDurations().

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

◆ GetDuration()

Time ns3::PhyEntity::GetDuration ( WifiPpduField  field,
const WifiTxVector txVector 
) const
virtual

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

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

Reimplemented in ns3::EhtPhy, ns3::HtPhy, ns3::DsssPhy, ns3::OfdmPhy, and ns3::VhtPhy.

Definition at line 178 of file phy-entity.cc.

References ns3::MicroSeconds(), NS_FATAL_ERROR, and ns3::WIFI_PPDU_FIELD_EHT_SIG.

Referenced by CalculatePhyPreambleAndHeaderDuration(), EndPreambleDetectionPeriod(), ns3::HtPhy::GetDuration(), ns3::DsssPhy::GetDuration(), ns3::OfdmPhy::GetDuration(), GetPhyHeaderSections(), GetRemainingDurationAfterField(), and StartReceiveField().

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

◆ GetDurationUpToField()

Time ns3::PhyEntity::GetDurationUpToField ( WifiPpduField  field,
const WifiTxVector txVector 
) const

Get the duration of the PPDU up to (but excluding) the given field.

Parameters
fieldthe considered PPDU field
txVectorthe transmission parameters
Returns
the duration from the beginning of the PPDU up to the field

Definition at line 239 of file phy-entity.cc.

References CalculatePhyPreambleAndHeaderDuration(), GetPhyHeaderSections(), ns3::NanoSeconds(), NS_ASSERT, and ns3::WIFI_PPDU_FIELD_DATA.

Referenced by GetRemainingDurationAfterField().

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

◆ GetGuardBandwidth()

uint16_t ns3::PhyEntity::GetGuardBandwidth ( uint16_t  currentChannelWidth) const
protected
Parameters
currentChannelWidthchannel width of the current transmission (MHz)
Returns
the width of the guard band (MHz)

Wrapper method used by child classes for PSD generation. Note that this method is necessary for testing UL OFDMA.

Definition at line 1161 of file phy-entity.cc.

References ns3::WifiPhy::GetGuardBandwidth(), and m_wifiPhy.

Referenced by ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), ns3::HePhy::GetRuBandForTx(), ns3::HePhy::GetTxPowerSpectralDensity(), ns3::HtPhy::GetTxPowerSpectralDensity(), ns3::DsssPhy::GetTxPowerSpectralDensity(), and ns3::OfdmPhy::GetTxPowerSpectralDensity().

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

◆ GetMaxPsduSize()

virtual uint32_t ns3::PhyEntity::GetMaxPsduSize ( void  ) const
pure virtual

Get the maximum PSDU size in bytes.

Returns
the maximum PSDU size in bytes

Implemented in ns3::HePhy, ns3::HtPhy, ns3::DsssPhy, ns3::ErpOfdmPhy, ns3::OfdmPhy, and ns3::VhtPhy.

◆ GetMcs()

WifiMode ns3::PhyEntity::GetMcs ( uint8_t  index) const
virtual

Get the WifiMode corresponding to the given MCS index.

Parameters
indexthe index of the MCS
Returns
the WifiMode corresponding to the MCS index

This method should be used only for HtPhy and child classes.

Reimplemented in ns3::HtPhy.

Definition at line 110 of file phy-entity.cc.

References NS_ABORT_MSG.

◆ GetMeasurementChannelWidth()

virtual uint16_t ns3::PhyEntity::GetMeasurementChannelWidth ( const Ptr< const WifiPpdu ppdu) const
protectedpure virtual

Return the channel width used to measure the RSSI.

Parameters
ppduthe PPDU that is being received
Returns
the channel width (in MHz) used for RSSI measurement

Implemented in ns3::HePhy, ns3::DsssPhy, and ns3::OfdmPhy.

Referenced by EndPreambleDetectionPeriod(), GetCcaIndication(), GetPhyHeaderSnrPer(), and GetRxPowerWForPpdu().

+ Here is the caller graph for this function:

◆ GetNextField()

WifiPpduField ns3::PhyEntity::GetNextField ( WifiPpduField  currentField,
WifiPreamble  preamble 
) const

Return the field following the provided one.

Parameters
currentFieldthe considered PPDU field
preamblethe preamble indicating the PPDU format
Returns
the PPDU field following the reference one

Definition at line 149 of file phy-entity.cc.

References GetPpduFormats(), NS_FATAL_ERROR, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by EndReceiveField(), and GetPhyHeaderSections().

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

◆ GetNumModes()

uint8_t ns3::PhyEntity::GetNumModes ( void  ) const
virtual
Returns
the number of WifiModes supported by this entity

Definition at line 104 of file phy-entity.cc.

References m_modeList.

◆ GetPayloadDuration()

virtual Time ns3::PhyEntity::GetPayloadDuration ( uint32_t  size,
const WifiTxVector txVector,
WifiPhyBand  band,
MpduType  mpdutype,
bool  incFlag,
uint32_t totalAmpduSize,
double totalAmpduNumSymbols,
uint16_t  staId 
) const
pure virtual
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

Implemented in ns3::HtPhy, ns3::DsssPhy, and ns3::OfdmPhy.

◆ GetPhyHeaderSections()

PhyEntity::PhyHeaderSections ns3::PhyEntity::GetPhyHeaderSections ( const WifiTxVector txVector,
Time  ppduStart 
) const

Return a map of PHY header chunk information per PPDU field.

This map will contain the PPDU fields that are actually present based on the txVector information.

Parameters
txVectorthe transmission parameters
ppduStartthe time at which the PPDU started
Returns
the list of preamble sections
See also
PhyHeaderSections

Definition at line 211 of file phy-entity.cc.

References GetDuration(), GetNextField(), ns3::WifiTxVector::GetPreambleType(), GetSigMode(), visualizer.core::start(), ns3::WIFI_PPDU_FIELD_DATA, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by GetDurationUpToField().

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

◆ GetPhyHeaderSnrPer()

PhyEntity::SnrPer ns3::PhyEntity::GetPhyHeaderSnrPer ( WifiPpduField  field,
Ptr< Event event 
) const
protected

Obtain the SNR and PER of the PPDU field from the WifiPhy's InterferenceHelper class.

Wrapper used by child classes.

Parameters
fieldthe PPDU field
eventthe event holding incoming PPDU's information
Returns
the SNR and PER

Definition at line 253 of file phy-entity.cc.

References GetMeasurementChannelWidth(), GetPrimaryBand(), ns3::WifiPhy::m_interference, and m_wifiPhy.

Referenced by ns3::DsssPhy::EndReceiveHeader(), ns3::OfdmPhy::EndReceiveHeader(), ns3::HtPhy::EndReceiveHtSig(), and ns3::VhtPhy::EndReceiveSig().

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

◆ GetPpduFormats()

virtual const PpduFormats & ns3::PhyEntity::GetPpduFormats ( void  ) const
protectedpure virtual

Return the PPDU formats of the PHY.

Returns
the PPDU formats of the PHY

Implemented in ns3::EhtPhy, ns3::HePhy, ns3::HtPhy, ns3::DsssPhy, ns3::OfdmPhy, and ns3::VhtPhy.

Referenced by DoStartReceiveField(), and GetNextField().

+ Here is the caller graph for this function:

◆ GetPrimaryBand()

WifiSpectrumBand ns3::PhyEntity::GetPrimaryBand ( uint16_t  bandWidth) const
protected

If the operating channel width is a multiple of 20 MHz, return the start band index and the stop band index for the primary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width).

Otherwise, this call is equivalent to GetBand with bandIndex equal to zero.

Parameters
bandWidththe width of the band to be returned (MHz)
Returns
a pair of start and stop indexes that defines the band

Definition at line 1037 of file phy-entity.cc.

References ns3::WifiPhy::GetBand(), ns3::WifiPhy::GetChannelWidth(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex(), ns3::WifiPhy::m_operatingChannel, and m_wifiPhy.

Referenced by EndPreambleDetectionPeriod(), GetCcaIndication(), ns3::HtPhy::GetCcaIndication(), ns3::VhtPhy::GetCcaIndication(), GetChannelWidthAndBand(), GetPhyHeaderSnrPer(), and GetRxPowerWForPpdu().

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

◆ GetRandomValue()

double ns3::PhyEntity::GetRandomValue ( void  ) const
protected

Obtain a random value from the WifiPhy's generator.

Wrapper used by child classes.

Returns
a uniform random value

Definition at line 1019 of file phy-entity.cc.

References ns3::UniformRandomVariable::GetValue(), ns3::WifiPhy::m_random, and m_wifiPhy.

Referenced by ns3::DsssPhy::EndReceiveHeader(), ns3::OfdmPhy::EndReceiveHeader(), ns3::HtPhy::EndReceiveHtSig(), ns3::VhtPhy::EndReceiveSig(), and GetReceptionStatus().

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

◆ GetReceptionStatus()

std::pair< bool, SignalNoiseDbm > ns3::PhyEntity::GetReceptionStatus ( Ptr< const WifiPsdu psdu,
Ptr< Event event,
uint16_t  staId,
Time  relativeMpduStart,
Time  mpduDuration 
)
protected

Get the reception status for the provided MPDU and notify.

Parameters
psduthe arriving MPDU formatted as a PSDU
eventthe event holding incoming PPDU's information
staIdthe station ID of the PSDU (only used for MU)
relativeMpduStartthe relative start time of the MPDU within the A-MPDU. 0 for normal MPDUs
mpduDurationthe duration of the MPDU
Returns
information on MPDU reception: status, signal power (dBm), and noise power (in dBm)

Definition at line 703 of file phy-entity.cc.

References ns3::Time::As(), ns3::Packet::Copy(), GetChannelWidthAndBand(), ns3::WifiMode::GetDataRate(), ns3::WifiPsdu::GetPacket(), GetRandomValue(), ns3::WifiPsdu::GetSize(), ns3::WifiPhy::m_interference, ns3::WifiPhy::m_postReceptionErrorModel, m_wifiPhy, ns3::SignalNoiseDbm::noise, ns3::Time::NS, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::PhyEntity::SnrPer::per, ns3::RatioToDb(), ns3::SignalNoiseDbm::signal, ns3::PhyEntity::SnrPer::snr, and ns3::WToDbm().

Referenced by EndOfMpdu().

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

◆ GetRemainingDurationAfterField()

Time ns3::PhyEntity::GetRemainingDurationAfterField ( Ptr< const WifiPpdu ppdu,
WifiPpduField  field 
) const

Get the remaining duration of the PPDU after the end of the given field.

Parameters
fieldthe considered PPDU field
ppduthe received PPDU
Returns
the remaining duration of the PPDU after the end of to the field

Definition at line 328 of file phy-entity.cc.

References GetDuration(), and GetDurationUpToField().

Referenced by EndReceiveField().

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

◆ GetRxChannelWidth()

uint16_t ns3::PhyEntity::GetRxChannelWidth ( const WifiTxVector txVector) const
protectedvirtual

Return the channel width used in the reception spectrum model.

Parameters
txVectorthe TXVECTOR of the PPDU that is being received
Returns
the channel width (in MHz) used for RxSpectrumModel

Reimplemented in ns3::DsssPhy.

Definition at line 1054 of file phy-entity.cc.

References ns3::WifiPhy::GetChannelWidth(), ns3::WifiTxVector::GetChannelWidth(), m_wifiPhy, and min.

Referenced by ns3::OfdmPhy::GetCcaThreshold(), GetChannelWidthAndBand(), ns3::OfdmPhy::GetMeasurementChannelWidth(), and ns3::DsssPhy::GetRxChannelWidth().

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

◆ GetRxPowerWForPpdu()

double ns3::PhyEntity::GetRxPowerWForPpdu ( Ptr< Event event) const
protected

Obtain the received power (W) for a given band.

Wrapper used by child classes.

Parameters
eventthe event holding incoming PPDU's information
Returns
the received power (W) for the event over a given band

Definition at line 1025 of file phy-entity.cc.

References GetMeasurementChannelWidth(), and GetPrimaryBand().

Referenced by ns3::HePhy::ProcessSigA(), and StartPreambleDetectionPeriod().

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

◆ GetSecondaryBand()

WifiSpectrumBand ns3::PhyEntity::GetSecondaryBand ( uint16_t  bandWidth) const
protected

If the channel bonding is used, return the start band index and the stop band index for the secondary channel of the given bandwidth (which must be a multiple of 20 MHz and not exceed the operating channel width).

Parameters
bandWidththe width of the band to be returned (MHz)
Returns
a pair of start and stop indexes that defines the band

Definition at line 1047 of file phy-entity.cc.

References ns3::WifiPhy::GetBand(), ns3::WifiPhy::GetChannelWidth(), ns3::WifiPhyOperatingChannel::GetSecondaryChannelIndex(), ns3::WifiPhy::m_operatingChannel, m_wifiPhy, and NS_ASSERT.

Referenced by ns3::HtPhy::GetCcaIndication(), and ns3::VhtPhy::GetCcaIndication().

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

◆ GetSigMode()

WifiMode ns3::PhyEntity::GetSigMode ( WifiPpduField  field,
const WifiTxVector txVector 
) const
virtual

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

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

Reimplemented in ns3::EhtPhy, ns3::HePhy, ns3::HtPhy, ns3::DsssPhy, ns3::OfdmPhy, and ns3::VhtPhy.

Definition at line 142 of file phy-entity.cc.

References NS_FATAL_ERROR.

Referenced by GetPhyHeaderSections(), ns3::HtPhy::GetSigMode(), ns3::DsssPhy::GetSigMode(), and ns3::OfdmPhy::GetSigMode().

+ Here is the caller graph for this function:

◆ GetStaId()

uint16_t ns3::PhyEntity::GetStaId ( const Ptr< const WifiPpdu ppdu) const
virtual

Return the STA ID that has been assigned to the station this PHY belongs to.

This is typically called for MU PPDUs, in order to pick the correct PSDU.

Parameters
ppduthe PPDU for which the STA ID is requested
Returns
the STA ID

Reimplemented in ns3::HePhy, and OfdmaTestHePhy.

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

References SU_STA_ID.

Referenced by DoStartReceivePayload(), EndOfMpdu(), EndReceivePayload(), ns3::HePhy::GetStaId(), and ScheduleEndOfMpdus().

+ Here is the caller graph for this function:

◆ GetTxMaskRejectionParams()

std::tuple< double, double, double > ns3::PhyEntity::GetTxMaskRejectionParams ( void  ) const
protected
Returns
a tuple containing the minimum rejection (in dBr) for the inner band, the minimum rejection (in dBr) for the outer band, and the maximum rejection (in dBr) for the outer band for the transmit spectrum mask.

Wrapper method used by child classes for PSD generation.

Definition at line 1167 of file phy-entity.cc.

References ns3::WifiPhy::GetTxMaskRejectionParams(), and m_wifiPhy.

Referenced by ns3::HePhy::GetTxPowerSpectralDensity(), ns3::HtPhy::GetTxPowerSpectralDensity(), and ns3::OfdmPhy::GetTxPowerSpectralDensity().

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

◆ GetTxPowerSpectralDensity()

virtual Ptr< SpectrumValue > ns3::PhyEntity::GetTxPowerSpectralDensity ( double  txPowerW,
Ptr< const WifiPpdu ppdu 
) const
protectedpure virtual
Parameters
txPowerWpower in W to spread across the bands
ppduthe PPDU that will be transmitted
Returns
Pointer to SpectrumValue

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

Implemented in ns3::HePhy, ns3::HtPhy, ns3::DsssPhy, and ns3::OfdmPhy.

Referenced by Transmit().

+ Here is the caller graph for this function:

◆ GetWifiConstPsduMap()

WifiConstPsduMap ns3::PhyEntity::GetWifiConstPsduMap ( Ptr< const WifiPsdu psdu,
const WifiTxVector txVector 
) const
virtual

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

Reimplemented in ns3::HePhy.

Definition at line 199 of file phy-entity.cc.

References SU_STA_ID.

◆ HandlesMcsModes()

bool ns3::PhyEntity::HandlesMcsModes ( void  ) const
virtual

Check if the WifiModes handled by this PHY are MCSs.

Returns
true if the handled WifiModes are MCSs, false if they are non-MCS modes

Reimplemented in ns3::HtPhy.

Definition at line 124 of file phy-entity.cc.

◆ IsConfigSupported()

bool ns3::PhyEntity::IsConfigSupported ( Ptr< const WifiPpdu ppdu) const
protectedvirtual

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

Parameters
ppduthe received PPDU
Returns
true if supported, false otherwise

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

Definition at line 920 of file phy-entity.cc.

References IsModeSupported(), and NS_LOG_DEBUG.

Referenced by ns3::DsssPhy::EndReceiveHeader(), and ns3::OfdmPhy::IsAllConfigSupported().

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

◆ IsMcsSupported()

bool ns3::PhyEntity::IsMcsSupported ( uint8_t  index) const
virtual

Check if the WifiMode corresponding to the given MCS index is supported.

Parameters
indexthe index of the MCS
Returns
true if the WifiMode corresponding to the MCS index is supported, false otherwise

Will return false for non-MCS modes.

Reimplemented in ns3::HtPhy.

Definition at line 117 of file phy-entity.cc.

References NS_ABORT_MSG.

◆ IsModeSupported()

bool ns3::PhyEntity::IsModeSupported ( WifiMode  mode) const
virtual

Check if the WifiMode is supported.

Parameters
modethe WifiMode to check
Returns
true if the WifiMode is supported, false otherwise

Definition at line 91 of file phy-entity.cc.

References m_modeList.

Referenced by IsConfigSupported(), ns3::HePhy::IsConfigSupported(), and ns3::HtPhy::IsConfigSupported().

+ Here is the caller graph for this function:

◆ NoEndPreambleDetectionEvents()

bool ns3::PhyEntity::NoEndPreambleDetectionEvents ( void  ) const
Returns
true if there is no end preamble detection event running, false otherwise

Definition at line 953 of file phy-entity.cc.

References m_endPreambleDetectionEvents.

◆ NotifyCcaBusy()

void ns3::PhyEntity::NotifyCcaBusy ( const Ptr< const WifiPpdu ppdu,
Time  duration,
WifiChannelListType  channelType 
)
virtual

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
channelTypethe channel type for which the CCA busy state is reported.

Reimplemented in ns3::HePhy.

Definition at line 1106 of file phy-entity.cc.

References ns3::Time::As(), m_state, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Time::S.

+ Here is the call graph for this function:

◆ NotifyInterferenceRxEndAndClear()

void ns3::PhyEntity::NotifyInterferenceRxEndAndClear ( bool  reset)
protected

Notify WifiPhy's InterferenceHelper of the end of the reception, clear maps and end of MPDU event, and eventually reset WifiPhy.

Parameters
resetwhether to reset WifiPhy

Definition at line 782 of file phy-entity.cc.

References m_endOfMpduEvents, ns3::WifiPhy::m_interference, m_signalNoiseMap, m_statusPerMpduMap, m_wifiPhy, ns3::Simulator::Now(), NS_ASSERT, and ns3::WifiPhy::Reset().

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

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

◆ NotifyPayloadBegin()

void ns3::PhyEntity::NotifyPayloadBegin ( const WifiTxVector txVector,
const Time payloadDuration 
)
protected

Fire the trace indicating that the PHY is starting to receive the payload of a PPDU.

Parameters
txVectorthe TXVECTOR used to transmit the PPDU
payloadDurationthe TX duration of the PPDU payload

Definition at line 1129 of file phy-entity.cc.

References ns3::WifiPhy::m_phyRxPayloadBeginTrace, and m_wifiPhy.

Referenced by ns3::HePhy::DoStartReceivePayload(), and ns3::HePhy::StartReceiveOfdmaPayload().

+ Here is the caller graph for this function:

◆ ObtainNextUid()

uint64_t ns3::PhyEntity::ObtainNextUid ( const WifiTxVector txVector)
protectedvirtual

Obtain the next UID for the PPDU to transmit.

Note that the global UID counter could be incremented.

Parameters
txVectorthe transmission parameters
Returns
the UID to use for the PPDU to transmit

Reimplemented in ns3::HePhy.

Definition at line 1114 of file phy-entity.cc.

References m_globalPpduUid, and NS_LOG_FUNCTION.

Referenced by ns3::HtPhy::BuildPpdu(), ns3::DsssPhy::BuildPpdu(), ns3::ErpOfdmPhy::BuildPpdu(), ns3::OfdmPhy::BuildPpdu(), and ns3::VhtPhy::BuildPpdu().

+ Here is the caller graph for this function:

◆ ResetReceive()

void ns3::PhyEntity::ResetReceive ( Ptr< Event event)

Reset PHY at the end of the PPDU under reception after it has failed the PHY header.

Parameters
eventthe event holding incoming PPDU's information

Definition at line 998 of file phy-entity.cc.

References DoResetReceive(), ns3::WifiPhy::IsStateRx(), ns3::WifiPhy::m_currentEvent, ns3::WifiPhy::m_currentPreambleEvents, m_endRxPayloadEvents, ns3::WifiPhy::m_interference, m_wifiPhy, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::WifiPhy::SwitchMaybeToCcaBusy().

Referenced by ns3::HePhy::DoStartReceivePayload(), and EndReceiveField().

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

◆ RxPayloadFailed()

void ns3::PhyEntity::RxPayloadFailed ( Ptr< const WifiPsdu psdu,
double  snr,
const WifiTxVector txVector 
)
protectedvirtual

Perform amendment-specific actions when the payload is unsuccessfully received.

Parameters
psduthe PSDU that we failed to received
snrthe SNR of the received PSDU in linear scale
txVectorTXVECTOR of the PSDU

Reimplemented in ns3::HePhy.

Definition at line 683 of file phy-entity.cc.

References ns3::Copy(), m_state, and NS_LOG_FUNCTION.

Referenced by EndReceivePayload().

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

◆ RxPayloadSucceeded()

void ns3::PhyEntity::RxPayloadSucceeded ( Ptr< const WifiPsdu psdu,
RxSignalInfo  rxSignalInfo,
const WifiTxVector txVector,
uint16_t  staId,
const std::vector< bool > &  statusPerMpdu 
)
protectedvirtual

Perform amendment-specific actions when the payload is successfully received.

Parameters
psduthe successfully received PSDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorTXVECTOR of the PSDU
staIdthe station ID of the PSDU (only used for MU)
statusPerMpdureception status per MPDU

Reimplemented in ns3::HePhy.

Definition at line 673 of file phy-entity.cc.

References ns3::Copy(), m_state, and NS_LOG_FUNCTION.

Referenced by EndReceivePayload().

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

◆ ScheduleEndOfMpdus()

◆ SetOwner()

void ns3::PhyEntity::SetOwner ( Ptr< WifiPhy wifiPhy)

Set the WifiPhy owning this PHY entity.

Parameters
wifiPhythe WifiPhy owning this PHY entity

Definition at line 83 of file phy-entity.cc.

References m_state, ns3::WifiPhy::m_state, m_wifiPhy, and NS_LOG_FUNCTION.

Referenced by OfdmaSpectrumWifiPhy::OfdmaSpectrumWifiPhy().

+ Here is the caller graph for this function:

◆ StartPreambleDetectionPeriod()

void ns3::PhyEntity::StartPreambleDetectionPeriod ( Ptr< Event event)
protected

Start the preamble detection period.

Parameters
eventthe event holding incoming PPDU's information

Definition at line 807 of file phy-entity.cc.

References EndPreambleDetectionPeriod(), ns3::WifiPhy::GetPreambleDetectionDuration(), GetRxPowerWForPpdu(), m_endPreambleDetectionEvents, ns3::WifiPhy::m_interference, m_wifiPhy, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and ns3::WToDbm().

Referenced by StartReceivePreamble().

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

◆ StartReceiveField()

void ns3::PhyEntity::StartReceiveField ( WifiPpduField  field,
Ptr< Event event 
)

Start receiving a given field.

This method will call the DoStartReceiveField. EndReceiveField is also scheduled after the duration of the field (except for the special case of preambles

See also
DoStartReceivePreamble). The PHY is kept in CCA busy during the reception of the field (except for data field which should be in RX).
Parameters
fieldthe starting PPDU field
eventthe event holding incoming PPDU's information

Definition at line 261 of file phy-entity.cc.

References DoStartReceiveField(), EndReceiveField(), GetDuration(), ns3::EventId::IsExpired(), ns3::WifiPhy::m_endPhyRxEvent, m_wifiPhy, ns3::WifiPhy::NotifyCcaBusy(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), StartReceivePayload(), ns3::WIFI_PPDU_FIELD_DATA, and ns3::WIFI_PPDU_FIELD_PREAMBLE.

Referenced by EndReceiveField().

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

◆ StartReceivePayload()

void ns3::PhyEntity::StartReceivePayload ( Ptr< Event event)
protected

Start receiving the PSDU (i.e.

the first symbol of the PSDU has arrived).

Parameters
eventthe event holding incoming PPDU's information

Definition at line 529 of file phy-entity.cc.

References DoStartReceivePayload(), ns3::EventId::IsExpired(), ns3::WifiPhy::m_endPhyRxEvent, m_state, m_wifiPhy, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by StartReceiveField().

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

◆ StartReceivePreamble()

void ns3::PhyEntity::StartReceivePreamble ( Ptr< const WifiPpdu ppdu,
RxPowerWattPerChannelBand rxPowersW,
Time  rxDuration 
)
virtual

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

the first bit of the preamble has arrived).

This method triggers the start of the preamble detection period (

See also
StartPreambleDetectionPeriod) if the PHY can process the PPDU.
Parameters
ppduthe arriving PPDU
rxPowersWthe receive power in W per band
rxDurationthe duration of the PPDU

Reimplemented in ns3::HePhy.

Definition at line 365 of file phy-entity.cc.

References AbortCurrentReception(), ns3::BUSY_DECODING_PREAMBLE, CCA_BUSY, ns3::CHANNEL_SWITCHING, DoGetEvent(), DropPreambleEvent(), ns3::FRAME_CAPTURE_PACKET_SWITCH, IDLE, ns3::WifiPhy::m_currentEvent, ns3::WifiPhy::m_currentPreambleEvents, ns3::WifiPhy::m_frameCaptureModel, m_state, ns3::WifiPhy::m_timeLastPreambleDetected, m_wifiPhy, ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, OFF, ns3::POWERED_OFF, RX, ns3::RXING, SLEEP, ns3::SLEEPING, StartPreambleDetectionPeriod(), SWITCHING, ns3::WifiPhy::SwitchMaybeToCcaBusy(), ns3::TRUNCATED_TX, TX, and ns3::TXING.

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

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

◆ StartTx()

void ns3::PhyEntity::StartTx ( Ptr< const WifiPpdu ppdu)
virtual

This function is called by SpectrumWifiPhy to send the PPDU while performing amendment-specific actions.

See also
SpectrumWifiPhy::StartTx
Parameters
ppduthe PPDU to send

Reimplemented in ns3::HePhy.

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

References NS_LOG_FUNCTION, and Transmit().

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

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

◆ SwitchMaybeToCcaBusy()

void ns3::PhyEntity::SwitchMaybeToCcaBusy ( const Ptr< const WifiPpdu ppdu)
virtual

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

Reimplemented in ns3::HePhy.

Definition at line 1072 of file phy-entity.cc.

References GetCcaIndication(), m_state, NS_LOG_DEBUG, ns3::Time::S, and SwitchMaybeToCcaBusy().

Referenced by SwitchMaybeToCcaBusy().

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

◆ Transmit()

void ns3::PhyEntity::Transmit ( Time  txDuration,
Ptr< const WifiPpdu ppdu,
std::string  type 
)

This function prepares most of the WifiSpectrumSignalParameters parameters and invokes SpectrumWifiPhy's Transmit method.

See also
SpectrumWifiPhy::Transmit
Parameters
txDurationthe duration of the transmission
ppduthe PPDU to send
typethe type of transmission (for logging)

Definition at line 1142 of file phy-entity.cc.

References ns3::DbmToW(), GetCenterFrequencyForChannelWidth(), ns3::WifiPhy::GetChannelNumber(), ns3::SpectrumValue::GetSpectrumModel(), ns3::WifiPhy::GetTxGain(), ns3::WifiPhy::GetTxPowerForTransmission(), GetTxPowerSpectralDensity(), ns3::SpectrumModel::GetUid(), ns3::Integral(), m_wifiPhy, ns3::Time::MS, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, trim-trailing-whitespace::type, and ns3::WToDbm().

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

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

◆ UpdateInterferenceEvent()

void ns3::PhyEntity::UpdateInterferenceEvent ( Ptr< Event event,
const RxPowerWattPerChannelBand rxPower 
)
protected

Update an event in WifiPhy's InterferenceHelper class.

Wrapper used by child classes.

Update event to scale its received power (W) per band.

Parameters
eventthe event to be updated
rxPowerthe received power (W) per band to be added to the current event

Definition at line 776 of file phy-entity.cc.

References ns3::WifiPhy::m_interference, and m_wifiPhy.

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_endOfMpduEvents

std::vector<EventId> ns3::PhyEntity::m_endOfMpduEvents
protected

the end of MPDU events (only used for A-MPDUs)

Definition at line 887 of file phy-entity.h.

Referenced by CancelAllEvents(), DoAbortCurrentReception(), ns3::HePhy::DoAbortCurrentReception(), NotifyInterferenceRxEndAndClear(), and ScheduleEndOfMpdus().

◆ m_endPreambleDetectionEvents

std::vector<EventId> ns3::PhyEntity::m_endPreambleDetectionEvents
protected

the end of preamble detection events

Definition at line 886 of file phy-entity.h.

Referenced by CancelAllEvents(), CancelRunningEndPreambleDetectionEvents(), NoEndPreambleDetectionEvents(), and StartPreambleDetectionPeriod().

◆ m_endRxPayloadEvents

std::vector<EventId> ns3::PhyEntity::m_endRxPayloadEvents
protected

◆ m_globalPpduUid

uint64_t ns3::PhyEntity::m_globalPpduUid = 0
staticprotected

Global counter of the PPDU UID.

Definition at line 899 of file phy-entity.h.

Referenced by ObtainNextUid(), ns3::HePhy::ObtainNextUid(), and OfdmaTestHePhy::SetGlobalPpduUid().

◆ m_modeList

◆ m_signalNoiseMap

std::map<UidStaIdPair, SignalNoiseDbm> ns3::PhyEntity::m_signalNoiseMap
protected

Map of the latest signal power and noise power in dBm (noise power includes the noise figure)

Definition at line 897 of file phy-entity.h.

Referenced by DoStartReceivePayload(), ns3::HePhy::DoStartReceivePayload(), EndOfMpdu(), EndReceivePayload(), NotifyInterferenceRxEndAndClear(), and ns3::HePhy::StartReceiveOfdmaPayload().

◆ m_state

◆ m_statusPerMpduMap

std::map<UidStaIdPair, std::vector<bool> > ns3::PhyEntity::m_statusPerMpduMap
protected

Map of the current reception status per MPDU that is filled in as long as MPDUs are being processed by the PHY in case of an A-MPDU.

Definition at line 896 of file phy-entity.h.

Referenced by DoStartReceivePayload(), ns3::HePhy::DoStartReceivePayload(), EndOfMpdu(), EndReceivePayload(), NotifyInterferenceRxEndAndClear(), and ns3::HePhy::StartReceiveOfdmaPayload().

◆ m_wifiPhy

Ptr<WifiPhy> ns3::PhyEntity::m_wifiPhy
protected

Pointer to the owning WifiPhy.

Definition at line 881 of file phy-entity.h.

Referenced by AbortCurrentReception(), AddPreambleEvent(), BuildPpdu(), ns3::EhtPhy::BuildPpdu(), ns3::HePhy::BuildPpdu(), ns3::HtPhy::BuildPpdu(), ns3::DsssPhy::BuildPpdu(), ns3::ErpOfdmPhy::BuildPpdu(), ns3::OfdmPhy::BuildPpdu(), ns3::VhtPhy::BuildPpdu(), CreateInterferenceEvent(), DoAbortCurrentReception(), DoEndReceivePayload(), ns3::HePhy::DoEndReceivePayload(), DoEndReceivePreamble(), DoGetEvent(), ns3::HePhy::DoGetEvent(), DoStartReceivePayload(), ns3::HePhy::DoStartReceivePayload(), DropPreambleEvent(), EndPreambleDetectionPeriod(), EndReceiveField(), EndReceivePayload(), ErasePreambleEvent(), ns3::HePhy::GetBssColor(), ns3::HtPhy::GetCcaIndication(), ns3::VhtPhy::GetCcaIndication(), GetCcaThreshold(), ns3::OfdmPhy::GetCcaThreshold(), ns3::VhtPhy::GetCcaThreshold(), GetCenterFrequencyForChannelWidth(), ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), GetCurrentEvent(), GetCurrentPreambleEvents(), GetDelayUntilCcaEnd(), GetGuardBandwidth(), ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetPer20MHzDurations(), GetPhyHeaderSnrPer(), GetPrimaryBand(), GetRandomValue(), GetReceptionStatus(), ns3::HePhy::GetRuBandForRx(), ns3::HePhy::GetRuBandForTx(), GetRxChannelWidth(), ns3::DsssPhy::GetRxChannelWidth(), GetSecondaryBand(), ns3::HePhy::GetStaId(), GetTxMaskRejectionParams(), ns3::OfdmPhy::IsChannelWidthSupported(), ns3::HePhy::IsConfigSupported(), ns3::HtPhy::IsConfigSupported(), NotifyInterferenceRxEndAndClear(), NotifyPayloadBegin(), ns3::HePhy::ObtainNextUid(), ResetReceive(), ScheduleEndOfMpdus(), SetOwner(), StartPreambleDetectionPeriod(), StartReceiveField(), StartReceivePayload(), StartReceivePreamble(), Transmit(), and UpdateInterferenceEvent().


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