802.11 PHY layer model More...
#include "wifi-phy.h"
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(* | PhyRxDropTracedCallback) (Ptr< const Packet > packet, WifiPhyRxfailureReason reason) |
TracedCallback signature for PhyRxDrop 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 PhyRxPpduDrop trace source. | |
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. | |
virtual WifiSpectrumBandInfo | GetBand (MHz_u bandWidth, uint8_t bandIndex=0)=0 |
Get the info of a given band. | |
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< Channel > | GetChannel () 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< WifiNetDevice > | GetDevice () const |
Return the device this PHY is associated with. | |
MHz_u | GetFrequency () const |
virtual MHz_u | GetGuardBandwidth (MHz_u currentChannelWidth) const =0 |
virtual std::optional< std::reference_wrapper< const WifiTxVector > > | GetInfoIfRxingPhyHeader () const |
Time | GetLastRxEndTime () const |
Return the end time of the last received packet. | |
Time | GetLastRxStartTime () const |
Return the start time of the last received packet. | |
std::shared_ptr< PhyEntity > | GetLatestPhyEntity () 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< WifiMode > | 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). | |
std::list< WifiMode > | GetMcsList (WifiModulationClass modulation) const |
Get the list of supported MCSs for the given modulation class (i.e. | |
Ptr< MobilityModel > | GetMobility () const |
Return the mobility model this PHY is associated with. | |
std::list< WifiMode > | 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. | |
std::list< WifiMode > | GetModeList (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 WifiPhyOperatingChannel & | GetOperatingChannel () const |
Get a const reference to the operating channel. | |
WifiPhyBand | GetPhyBand () const |
Get the configured Wi-Fi band. | |
std::shared_ptr< PhyEntity > | GetPhyEntity (WifiModulationClass modulation) const |
Get the supported PHY entity corresponding to the modulation class. | |
std::shared_ptr< PhyEntity > | GetPhyEntity (WifiStandard standard) const |
Get the supported PHY entity corresponding to the wifi standard. | |
std::shared_ptr< PhyEntity > | GetPhyEntityForPpdu (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< WifiPhyStateHelper > | GetState () const |
Return the WifiPhyStateHelper of this PHY. | |
Hz_u | GetSubcarrierSpacing () const |
virtual std::optional< Time > | GetTimeToMacHdrEnd (uint16_t staId) const |
Get the remaining time to the end of the MAC header reception of the next MPDU being received from the given STA, if any. | |
virtual std::optional< Time > | GetTimeToPreambleDetectionEnd () const |
Get the remaining time to preamble detection period to elapse, if preamble detection is ongoing. | |
MHz_u | GetTxBandwidth (WifiMode mode, MHz_u maxAllowedBandWidth=MHz_u{ std::numeric_limits< double >::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_u > | GetTxMaskRejectionParams () 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 | 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=dBm_u{0}, dBm_u txPowerMaxMimo=dBm_u{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) |
![]() | |
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 final |
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< Object > | GetObject () 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< Object > | GetObject (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. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
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, std::shared_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 std::shared_ptr< const PhyEntity > | GetStaticPhyEntity (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 TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | AddPhyEntity (WifiModulationClass modulation, std::shared_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< Time > | GetDelayUntilChannelSwitch () |
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. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
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< Event > | m_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< InterferenceHelper > | m_interference |
Pointer to a helper responsible for interference computations. | |
std::map< WifiModulationClass, std::shared_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< UniformRandomVariable > | m_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< WifiPhyStateHelper > | m_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 WifiPsdu > | GetAddressedPsduInPpdu (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, std::shared_ptr< PhyEntity > > & | GetStaticPhyEntities () |
Private Attributes | |
WifiPhyBand | m_band |
WifiPhyBand. | |
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< WifiNetDevice > | m_device |
Pointer to the device. | |
bool | m_fixedPhyBand |
True to prohibit changing PHY band after initialization. | |
Ptr< FrameCaptureModel > | m_frameCaptureModel |
Frame capture model. | |
WifiModulationClass | m_maxModClassSupported |
max modulation class supported | |
MHz_u | m_maxRadioBw |
Maximum radio bandwidth. | |
Ptr< MobilityModel > | m_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 >, RxPowerWattPerChannelBand > | m_phyRxBeginTrace |
The trace source fired when a packet begins the reception process from the medium. | |
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReason > | m_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 &, Time > | m_phyRxMacHeaderEndTrace |
The trace source fired when the reception of a MAC header ends. | |
TracedCallback< WifiTxVector, Time > | m_phyRxPayloadBeginTrace |
The trace source fired when the reception of the PHY payload (PSDU) begins. | |
TracedCallback< Ptr< const WifiPpdu >, WifiPhyRxfailureReason > | m_phyRxPpduDropTrace |
The trace source fired when the PHY layer drops a packet it has received. | |
TracedCallback< Ptr< const Packet >, double > | m_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, double > | m_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< ErrorModel > | m_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< PreambleDetectionModel > | m_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< WifiRadioEnergyModel > | m_wifiRadioEnergyModel |
Wifi radio energy model. | |
Friends | |
class | PhyEntity |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
802.11 PHY layer model
ns3::WifiPhy is accessible through the following paths with Config::Set and Config::Connect:
ns3::Ptr<N3ns310TupleValueIJNS_13UintegerValueES1_NS_9EnumValueINS_11WifiPhyBandEEES1_EEE>
Time
+0ns:+9.22337e+18ns Time
-9.22337e+18ns:+9.22337e+18ns Time
-9.22337e+18ns:+9.22337e+18ns Time
-9.22337e+18ns:+9.22337e+18ns Group: Wifi
Size of this type is 896 bytes (on a 64-bit architecture).
Definition at line 61 of file wifi-phy.h.
segments identifying an operating channel
Definition at line 950 of file wifi-phy.h.
Tuple identifying a segment of an operating channel.
Definition at line 944 of file wifi-phy.h.
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.
packet | the packet being received |
channelFreq | the 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. |
txVector | the TXVECTOR that holds RX parameters |
aMpdu | the 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) |
signalNoise | signal power and noise power in dBm |
staId | the STA-ID |
Definition at line 664 of file wifi-phy.h.
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.
packet | the packet being transmitted |
channelFreqMhz | the frequency in MHz at which the packet is transmitted. |
txVector | the TXVECTOR that holds TX parameters |
aMpdu | the 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) |
staId | the STA-ID |
Definition at line 703 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxBeginTracedCallback) (Ptr< const Packet > packet, RxPowerWattPerChannelBand rxPowersW) |
TracedCallback signature for PhyRxBegin trace source.
packet | the packet being received |
rxPowersW | the receive power per channel band in Watts |
Definition at line 734 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxDropTracedCallback) (Ptr< const Packet > packet, WifiPhyRxfailureReason reason) |
TracedCallback signature for PhyRxDrop trace source.
packet | the packet being received |
reason | the reason the packet was dropped |
Definition at line 760 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxMacHeaderEndTracedCallback) (const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration) |
TracedCallback signature for end of MAC header reception events.
macHdr | the MAC header of the MPDU being received |
txVector | the TXVECTOR used to transmit the PSDU |
psduDuration | the remaining duration of the PSDU |
Definition at line 770 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration) |
TracedCallback signature for start of PSDU reception events.
txVector | the TXVECTOR decoded from the PHY header |
psduDuration | the duration of the PSDU |
Definition at line 743 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyRxPpduDropTracedCallback) (Ptr< const WifiPpdu > ppdu, WifiPhyRxfailureReason reason) |
TracedCallback signature for PhyRxPpduDrop trace source.
ppdu | the ppdu being received |
reason | the reason the ppdu was dropped |
Definition at line 751 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW) |
TracedCallback signature for Phy transmit events.
packet | the packet being transmitted |
txPowerW | the transmit power in Watts |
Definition at line 715 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::PsduTxBeginCallback) (WifiConstPsduMap psduMap, const WifiTxVector &txVector, double txPowerW) |
TracedCallback signature for PSDU transmit events.
psduMap | the PSDU map being transmitted |
txVector | the TXVECTOR holding the TX parameters |
txPowerW | the transmit power in Watts |
Definition at line 724 of file wifi-phy.h.
typedef void(* ns3::WifiPhy::SignalTransmissionCallback) (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector) |
Callback invoked when the PHY model starts to transmit a signal.
ppdu | The PPDU being transmitted |
txVector | txVector used for transmitting the PPDU |
Definition at line 1297 of file wifi-phy.h.
ns3::WifiPhy::WifiPhy | ( | ) |
Definition at line 389 of file wifi-phy.cc.
References ns3::CreateObject(), m_band, m_channelAccessRequested, m_currentEvent, m_endPhyRxEvent, m_endTxEvent, m_maxModClassSupported, m_phyId, m_pifs, m_powerRestricted, m_previouslyRxPpduUid, m_random, m_rxMpduReferenceNumber, m_rxSpatialStreams, m_sifs, m_slot, m_standard, m_state, m_timeLastPreambleDetected, m_txMpduReferenceNumber, m_txSpatialStreams, m_wifiRadioEnergyModel, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_UNKNOWN, ns3::WIFI_PHY_BAND_UNSPECIFIED, and ns3::WIFI_STANDARD_UNSPECIFIED.
Referenced by ns3::SpectrumWifiPhy::GetTypeId(), GetTypeId(), ns3::YansWifiPhy::GetTypeId(), PhyEntity, and SetOperatingChannel().
|
override |
Definition at line 415 of file wifi-phy.cc.
References NS_LOG_FUNCTION.
|
private |
Due to newly arrived signal, the current reception cannot be continued and has to be aborted.
reason | the reason the reception is aborted |
Definition at line 2228 of file wifi-phy.cc.
References AbortCurrentReception(), GetChannelWidth(), GetCurrentFrequencyRange(), m_currentEvent, m_currentPreambleEvents, m_endPhyRxEvent, m_interference, m_phyEntities, m_state, NotifyRxPpduDrop(), ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::OBSS_PD_CCA_RESET, ns3::RECEPTION_ABORTED_BY_TX, Reset(), and ns3::SIGNAL_DETECTION_ABORTED_BY_TX.
Referenced by AbortCurrentReception(), GetDelayUntilChannelSwitch(), RebuildMcsMap(), ResetCca(), Send(), and SetSleepMode().
|
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 (
modulation | the modulation class |
phyEntity | the PHY entity |
Definition at line 820 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().
|
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.
modulation | the modulation class |
phyEntity | the PHY entity |
Definition at line 811 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(), anonymous_namespace{vht-phy.cc}::ConstructorVht::ConstructorVht(), and ConvertIndicesToFrequencies().
|
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.
stream | first stream index to use |
Definition at line 2344 of file wifi-phy.cc.
References AssignStreams(), m_interference, m_random, and NS_LOG_FUNCTION.
Referenced by AssignStreams().
|
static |
txVector | the transmission parameters used for this packet |
Definition at line 1557 of file wifi-phy.cc.
References CalculatePhyPreambleAndHeaderDuration(), ns3::WifiTxVector::GetModulationClass(), and GetStaticPhyEntity().
Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), ns3::InterferenceHelper::CalculatePayloadPer(), CalculatePhyPreambleAndHeaderDuration(), CalculateTxDuration(), EmlsrUlTxopTest::CheckQosFrames(), WifiTxopTest::CheckResults(), ns3::DsssPpdu::GetTxDuration(), ns3::HePpdu::GetTxDuration(), ns3::VhtPpdu::GetTxDuration(), ns3::HePhy::GetValidPpduDuration(), EmlsrIcfSentDuringMainPhySwitchTest::RunOne(), EmlsrSwitchMainPhyBackTest::RunOne(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), ns3::DsssPpdu::SetDsssHeader(), ns3::VhtPpdu::SetVhtSigHeader(), StartTx(), BackoffGenerationTest::Transmit(), ns3::FrameExchangeManager::UpdateNav(), and ns3::HeFrameExchangeManager::UpdateNav().
double ns3::WifiPhy::CalculateSnr | ( | const WifiTxVector & | txVector, |
double | ber ) const |
txVector | the transmission vector |
ber | the probability of bit error rate |
Definition at line 755 of file wifi-phy.cc.
References m_interference.
Referenced by StartTx().
|
static |
psduMap | the PSDU(s) to transmit indexed by STA-ID |
txVector | the TXVECTOR used for the transmission of the PPDU |
band | the frequency band being used |
Definition at line 1585 of file wifi-phy.cc.
References CalculateTxDuration(), ns3::WifiTxVector::GetModulationClass(), GetStaticPhyEntity(), ns3::WifiTxVector::IsValid(), and NS_ASSERT.
|
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.
psdu | the PSDU to transmit |
txVector | the TXVECTOR used for the transmission of the PSDU |
band | the frequency band |
Definition at line 1577 of file wifi-phy.cc.
References CalculateTxDuration(), and GetWifiConstPsduMap().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band being used |
staId | the STA-ID of the recipient (only used for MU) |
Definition at line 1564 of file wifi-phy.cc.
References CalculatePhyPreambleAndHeaderDuration(), CalculateTxDuration(), GetPayloadDuration(), ns3::Time::IsStrictlyPositive(), ns3::WifiTxVector::IsValid(), ns3::NORMAL_MPDU, and NS_ASSERT.
Referenced by ns3::FrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HeFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::HtFrameExchangeManager::CalculateAcknowledgmentTime(), ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric(), ns3::FrameExchangeManager::CalculateProtectionTime(), ns3::HeFrameExchangeManager::CalculateProtectionTime(), ns3::HePhy::CalculateTxDuration(), ns3::PhyEntity::CalculateTxDuration(), CalculateTxDuration(), CalculateTxDuration(), CalculateTxDuration(), TxDurationTest::CalculateTxDurationUsingList(), EmlsrDlTxopTest::CheckApEmlNotificationFrame(), EmlsrDlTxopTest::CheckBlockAck(), EmlsrUlTxopTest::CheckBlockAck(), MultiLinkMuTxTest::CheckBlockAck(), MultiLinkTxTest::CheckBlockAck(), EmlsrUlTxopTest::CheckCtsFrames(), EmlOmnExchangeTest::CheckEmlNotification(), EmlsrDlTxopTest::CheckInitialControlFrame(), EmlsrLinkSwitchTest::CheckInitialControlFrame(), TxDurationTest::CheckMuTxDuration(), MultiLinkSetupTest::CheckQosData(), EmlsrDlTxopTest::CheckQosFrames(), EmlsrUlTxopTest::CheckQosFrames(), EmlsrDlTxopTest::CheckResults(), EmlsrUlTxopTest::CheckResults(), EmlsrDlTxopTest::CheckStaEmlNotificationFrame(), TxDurationTest::CheckTxDuration(), TestPrimary20CoveredByPpdu::CreatePpdu(), MuSigDurationTest::DoRun(), SingleLinkEmlsrTest::DoRun(), ns3::FrameExchangeManager::DoSendCtsAfterRts(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), WifiPrimaryChannelsTest::DoSetup(), ns3::FrameExchangeManager::ForwardMpduDown(), ns3::EhtFrameExchangeManager::ForwardPsduDown(), ns3::HtFrameExchangeManager::ForwardPsduDown(), ns3::EhtFrameExchangeManager::ForwardPsduMapDown(), ns3::HeFrameExchangeManager::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::DefaultEmlsrManager::GetTimeToCtsEnd(), ns3::FrameExchangeManager::GetTxDuration(), ns3::HeFrameExchangeManager::GetTxDuration(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), SpectrumWifiPhyBasicTest::MakeSignal(), WifiPhyThresholdsTest::MakeWifiSignal(), ns3::HtFrameExchangeManager::ReceiveMgtAction(), ns3::ApWifiMac::RespondToEmlOmn(), EmlsrCheckNavAndCcaLastPifsTest::RunOne(), EmlsrIcfSentDuringMainPhySwitchTest::RunOne(), EmlsrSwitchMainPhyBackTest::RunOne(), TestMultipleHeTbPreambles::RxHeTbPpdu(), TestMultiUserScheduler::SelectTxFormat(), Send(), TestAmpduReception::SendAmpduWithThreeMpdus(), ns3::HtFrameExchangeManager::SendBlockAck(), ns3::QosFrameExchangeManager::SendCfEndIfNeeded(), ns3::FrameExchangeManager::SendCtsToSelf(), TestUlMuMimoPhyTransmission::SendHeTbPpdu(), ns3::FrameExchangeManager::SendMpdu(), TestUlOfdmaPowerControl::SendMuBar(), ns3::HeFrameExchangeManager::SendMultiStaBlockAck(), ns3::HeFrameExchangeManager::SendMuRts(), ns3::FrameExchangeManager::SendNormalAck(), WifiPhyReceptionTest::SendPacket(), SpectrumWifiPhyMultipleInterfacesTest::SendPpdu(), TestUnsupportedBandwidthReception::SendPpdu(), TestWifiPhyRxTraceHelperYans::SendPpduWithOneMpdu(), TestWifiPhyRxTraceHelperYans::SendPpduWithTwoMpdus(), ns3::HtFrameExchangeManager::SendPsdu(), ns3::HeFrameExchangeManager::SendPsduMap(), ns3::FrameExchangeManager::SendRts(), TestUlOfdmaPhyTransmission< LatestPhyEntityType >::SendTbPpdu(), TestUlOfdmaPpduUid::SendTbPpdu(), WifiRetransmitTest::SetEvents(), ns3::StaWifiMac::SetPmModeAfterAssociation(), ns3::MinstrelWifiManager::SetupPhy(), ns3::RraaWifiManager::SetupPhy(), ns3::RrpaaWifiManager::SetupPhy(), StartTx(), BackoffGenerationTest::Transmit(), EmlsrDlTxopTest::Transmit(), EmlsrOperationsTestBase::Transmit(), EmlsrUlOfdmaTest::Transmit(), MultiLinkMuTxTest::Transmit(), OfdmaAckSequenceTest::Transmit(), StartSeqNoUpdateAfterAddBaTimeoutTest::Transmit(), WifiChannelSwitchingTest::Transmit(), WifiTxopTest::Transmit(), WifiTxStatsHelperTest::Transmit(), WifiUseAvailBwTest::Transmit(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), ns3::FrameExchangeManager::UpdateNav(), and ns3::HeFrameExchangeManager::UpdateNav().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard.
Definition at line 869 of file wifi-phy.cc.
References AddPhyEntity(), GetSifs(), GetSlot(), NS_LOG_FUNCTION, ns3::OFDM_SIFS_TIME_20MHZ, ns3::OFDM_SLOT_TIME_20MHZ, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.
Referenced by Configure80211n(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard.
Definition at line 954 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211n(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_VHT.
Referenced by Configure80211ax(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard.
Definition at line 962 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211ac(), Configure80211n(), m_band, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PHY_BAND_2_4GHZ.
Referenced by Configure80211be(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard.
Definition at line 883 of file wifi-phy.cc.
References AddPhyEntity(), ns3::DSSS_SIFS_TIME, ns3::DSSS_SLOT_TIME, GetSifs(), GetSlot(), NS_LOG_FUNCTION, SetPifs(), SetSifs(), SetSlot(), ns3::WIFI_MOD_CLASS_DSSS, and ns3::WIFI_MOD_CLASS_HR_DSSS.
Referenced by Configure80211g(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11be standard.
Definition at line 977 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211ax(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_EHT.
Referenced by ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard.
Definition at line 898 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211b(), NS_LOG_FUNCTION, and ns3::WIFI_MOD_CLASS_ERP_OFDM.
Referenced by Configure80211n(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard.
Definition at line 939 of file wifi-phy.cc.
References AddPhyEntity(), Configure80211a(), Configure80211g(), m_band, m_txSpatialStreams, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_HT, and ns3::WIFI_PHY_BAND_2_4GHZ.
Referenced by Configure80211ac(), Configure80211ax(), and ConfigureStandard().
|
private |
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11p standard.
Definition at line 911 of file wifi-phy.cc.
References AddPhyEntity(), GetChannelWidth(), GetSifs(), GetSlot(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::OFDM_PHY_10_MHZ, ns3::OFDM_PHY_5_MHZ, ns3::OFDM_SIFS_TIME_10MHZ, ns3::OFDM_SIFS_TIME_5MHZ, ns3::OFDM_SLOT_TIME_10MHZ, ns3::OFDM_SLOT_TIME_5MHZ, SetPifs(), SetSifs(), SetSlot(), and ns3::WIFI_MOD_CLASS_OFDM.
Referenced by ConfigureStandard().
|
private |
Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit spatial streams.
|
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.
standard | the Wi-Fi standard |
Definition at line 998 of file wifi-phy.cc.
References Configure80211a(), Configure80211ac(), Configure80211ax(), Configure80211b(), Configure80211be(), Configure80211g(), Configure80211n(), Configure80211p(), ns3::GetModulationClassForStandard(), 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 StartTx().
|
pure virtual |
This is a helper function to convert start and stop indices to start and stop frequencies.
indices | the start/stop indices to convert |
Implemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.
References AddStaticPhyEntity(), GetLatestPhyEntity(), GetPhyEntity(), GetPhyEntityForPpdu(), GetPreviouslyRxPpduUid(), GetStaticPhyEntity(), and SetPreviouslyRxPpduUid().
|
protectedvirtual |
Actually switch channel based on the stored channel settings.
Reimplemented in ns3::SpectrumWifiPhy.
Definition at line 1223 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().
|
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 446 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().
|
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 421 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().
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 2006 of file wifi-phy.cc.
References EndReceiveInterBss(), m_channelAccessRequested, m_powerRestricted, and NS_LOG_FUNCTION.
Referenced by EndReceiveInterBss(), PhyEntity, and ResetCca().
|
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.
|
private |
Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
ppdu | the PPDU to extract the PSDU from |
Definition at line 2337 of file wifi-phy.cc.
References GetAddressedPsduInPpdu(), and GetPhyEntityForPpdu().
Referenced by GetAddressedPsduInPpdu(), NotifyRxPpduDrop(), and RebuildMcsMap().
|
pure virtual |
Get the info of a given band.
bandWidth | the width of the band to be returned |
bandIndex | the index of the band to be returned |
Implemented in ExtSpectrumWifiPhy, ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.
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.
Definition at line 1379 of file wifi-phy.cc.
References GetBssMembershipSelectorList(), list, and m_phyEntities.
Referenced by GetBssMembershipSelectorList(), and StartTx().
dBm_u ns3::WifiPhy::GetCcaEdThreshold | ( | ) | const |
Return the CCA energy detection threshold.
Definition at line 543 of file wifi-phy.cc.
References m_ccaEdThreshold.
Referenced by GetTypeId().
dBm_u ns3::WifiPhy::GetCcaSensitivityThreshold | ( | ) | const |
Return the CCA sensitivity threshold.
Definition at line 556 of file wifi-phy.cc.
References m_ccaSensitivityThreshold.
Referenced by GetTypeId().
Return the Channel this WifiPhy is connected to.
Implemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.
References NotifyMonitorSniffRx(), NotifyRxBegin(), NotifyRxDrop(), NotifyRxEnd(), NotifyRxPpduDrop(), NotifyTxBegin(), NotifyTxDrop(), NotifyTxEnd(), and ns3::SU_STA_ID.
Referenced by GetTypeId().
uint8_t ns3::WifiPhy::GetChannelNumber | ( | ) | const |
Return current channel number.
Definition at line 1082 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by GetTypeId(), and StartTx().
Time ns3::WifiPhy::GetChannelSwitchDelay | ( | ) | const |
Definition at line 749 of file wifi-phy.cc.
References m_channelSwitchDelay.
Referenced by StartTx().
MHz_u ns3::WifiPhy::GetChannelWidth | ( | ) | const |
Definition at line 1088 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by AbortCurrentReception(), Configure80211p(), GetSubcarrierSpacing(), GetTxBandwidth(), GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().
|
pure virtual |
Get the frequency range of the current RF interface.
Implemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.
References GetSubcarrierSpacing().
Referenced by AbortCurrentReception(), Reset(), and StartReceivePreamble().
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).
Definition at line 2036 of file wifi-phy.cc.
References GetDefaultMode(), m_phyEntities, and NS_ASSERT_MSG.
Referenced by GetDefaultMode(), and StartTx().
|
protected |
Perform any actions necessary when user changes operating channel after initialization.
Definition at line 1182 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().
Time ns3::WifiPhy::GetDelayUntilIdle | ( | ) |
The PHY will never become WifiPhy::IDLE before the delay returned by this method but it could become really idle later.
Definition at line 2196 of file wifi-phy.cc.
References GetDelayUntilIdle(), and m_state.
Referenced by GetDelayUntilChannelSwitch(), GetDelayUntilIdle(), SetSleepMode(), and StartTx().
Ptr< WifiNetDevice > ns3::WifiPhy::GetDevice | ( | ) | const |
Return the device this PHY is associated with.
Definition at line 657 of file wifi-phy.cc.
References m_device.
Referenced by ns3::SpectrumWifiPhy::AddChannel().
MHz_u ns3::WifiPhy::GetFrequency | ( | ) | const |
Definition at line 1076 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by GetTypeId(), and Send().
currentChannelWidth | channel width of the current transmission |
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.
|
virtual |
Definition at line 1995 of file wifi-phy.cc.
References GetInfoIfRxingPhyHeader(), m_currentEvent, m_endPhyRxEvent, and NS_ASSERT_MSG.
Referenced by GetInfoIfRxingPhyHeader(), and PhyEntity.
Time ns3::WifiPhy::GetLastRxEndTime | ( | ) | const |
Return the end time of the last received packet.
Definition at line 2208 of file wifi-phy.cc.
References GetLastRxEndTime(), and m_state.
Referenced by GetLastRxEndTime(), and StartTx().
Time ns3::WifiPhy::GetLastRxStartTime | ( | ) | const |
Return the start time of the last received packet.
Definition at line 2202 of file wifi-phy.cc.
References GetLastRxStartTime(), and m_state.
Referenced by GetLastRxStartTime(), and StartTx().
std::shared_ptr< PhyEntity > ns3::WifiPhy::GetLatestPhyEntity | ( | ) | const |
Get the latest PHY entity supported by this PHY instance.
Definition at line 785 of file wifi-phy.cc.
References GetPhyEntity(), and m_standard.
Referenced by ns3::SpectrumWifiPhy::CanStartRx(), ConvertIndicesToFrequencies(), GetPhyEntityForPpdu(), NotifyCcaBusy(), and SwitchMaybeToCcaBusy().
WifiModulationClass ns3::WifiPhy::GetMaxModulationClassSupported | ( | ) | const |
Definition at line 992 of file wifi-phy.cc.
References m_maxModClassSupported.
Referenced by StartTx().
|
static |
Get the maximum PSDU size in bytes for the given modulation class.
modulation | the modulation class |
Definition at line 1595 of file wifi-phy.cc.
References GetMaxPsduSize(), and GetStaticPhyEntity().
Referenced by GetMaxPsduSize(), ns3::QosFrameExchangeManager::IsWithinSizeAndTimeLimits(), and StartTx().
uint8_t ns3::WifiPhy::GetMaxSupportedRxSpatialStreams | ( | ) | const |
Definition at line 1373 of file wifi-phy.cc.
References GetMaxSupportedRxSpatialStreams(), and m_rxSpatialStreams.
Referenced by GetMaxSupportedRxSpatialStreams().
uint8_t ns3::WifiPhy::GetMaxSupportedTxSpatialStreams | ( | ) | const |
Definition at line 1355 of file wifi-phy.cc.
References GetMaxSupportedTxSpatialStreams(), and m_txSpatialStreams.
Referenced by GetMaxSupportedTxSpatialStreams(), and Send().
WifiMode ns3::WifiPhy::GetMcs | ( | WifiModulationClass | modulation, |
uint8_t | mcs ) const |
Get the WifiMode object corresponding to the given MCS of the given modulation class.
modulation | the modulation class |
mcs | the MCS value |
Definition at line 2147 of file wifi-phy.cc.
References GetMcs(), IsMcsSupported(), m_phyEntities, and NS_ASSERT_MSG.
Referenced by GetMcs(), and StartTx().
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).
Definition at line 2112 of file wifi-phy.cc.
References GetMcsList(), list, and m_phyEntities.
Referenced by GetMcsList(), GetMcsList(), and StartTx().
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).
modulation | the modulation class |
Definition at line 2129 of file wifi-phy.cc.
References GetMcsList(), list, and m_phyEntities.
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.
Definition at line 669 of file wifi-phy.cc.
References m_mobility.
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.
Definition at line 2063 of file wifi-phy.cc.
References GetModeList(), list, and m_phyEntities.
Referenced by GetModeList(), GetModeList(), and StartTx().
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).
modulation | the modulation class |
Definition at line 2080 of file wifi-phy.cc.
References GetModeList(), list, and m_phyEntities.
uint16_t ns3::WifiPhy::GetNMcs | ( | ) | const |
Definition at line 2098 of file wifi-phy.cc.
References GetNMcs(), and m_phyEntities.
Referenced by GetNMcs(), and StartTx().
uint8_t ns3::WifiPhy::GetNTxPower | ( | ) | const |
Return the number of available transmission power levels.
Definition at line 606 of file wifi-phy.cc.
References m_nTxPower.
uint8_t ns3::WifiPhy::GetNumberOfAntennas | ( | ) | const |
Definition at line 1323 of file wifi-phy.cc.
References GetNumberOfAntennas(), and m_numberOfAntennas.
Referenced by GetNumberOfAntennas(), SetMaxSupportedRxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
const WifiPhyOperatingChannel & ns3::WifiPhy::GetOperatingChannel | ( | ) | const |
Get a const reference to the operating channel.
Definition at line 1070 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by ns3::SpectrumWifiPhy::DoChannelSwitch(), ns3::SpectrumWifiPhy::FinalizeChannelSwitch(), ns3::YansWifiPhy::FinalizeChannelSwitch(), ns3::SpectrumWifiPhy::GetRuBands(), and StartTx().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band |
mpdutype | the type of the MPDU as defined in WifiPhy::MpduType. |
incFlag | this 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. |
totalAmpduSize | the total size of the previously transmitted MPDUs for the concerned A-MPDU. If incFlag is set, this parameter will be updated. |
totalAmpduNumSymbols | the 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. |
staId | the STA-ID of the PSDU (only used for MU PPDUs) |
Definition at line 1536 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), GetPayloadDuration(), and GetStaticPhyEntity().
|
static |
size | the number of bytes in the packet to send |
txVector | the TXVECTOR used for the transmission of this packet |
band | the frequency band |
mpdutype | the type of the MPDU as defined in WifiPhy::MpduType. |
staId | the STA-ID of the PSDU (only used for MU PPDUs) |
Definition at line 1517 of file wifi-phy.cc.
References GetPayloadDuration().
Referenced by ns3::MinstrelHtWifiManager::CalculateMpduTxDuration(), CalculateTxDuration(), TxDurationTest::CheckPayloadDuration(), GetPayloadDuration(), GetPayloadDuration(), ns3::PhyEntity::ScheduleEndOfMpdus(), and StartTx().
WifiPhyBand ns3::WifiPhy::GetPhyBand | ( | ) | const |
Get the configured Wi-Fi band.
Definition at line 1058 of file wifi-phy.cc.
References m_band.
Referenced by Send(), and StartTx().
std::shared_ptr< PhyEntity > ns3::WifiPhy::GetPhyEntity | ( | WifiModulationClass | modulation | ) | const |
Get the supported PHY entity corresponding to the modulation class.
modulation | the modulation class |
Definition at line 770 of file wifi-phy.cc.
References m_phyEntities, and NS_ABORT_MSG_IF.
Referenced by ConvertIndicesToFrequencies(), GetLatestPhyEntity(), GetPhyEntity(), GetPhyEntityForPpdu(), Send(), and ns3::SpectrumWifiPhy::StartTx().
std::shared_ptr< PhyEntity > ns3::WifiPhy::GetPhyEntity | ( | WifiStandard | standard | ) | const |
Get the supported PHY entity corresponding to the wifi standard.
standard | the wifi standard |
Definition at line 779 of file wifi-phy.cc.
References ns3::GetModulationClassForStandard(), and GetPhyEntity().
std::shared_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.
ppdu | the received PPDU |
Definition at line 791 of file wifi-phy.cc.
References GetLatestPhyEntity(), GetPhyEntity(), m_phyEntities, NS_ABORT_IF, and ns3::WIFI_MOD_CLASS_HT.
Referenced by ConvertIndicesToFrequencies(), GetAddressedPsduInPpdu(), and ns3::SpectrumWifiPhy::GetRxPpduFromTxPpdu().
uint8_t ns3::WifiPhy::GetPhyId | ( | ) | const |
Get the index allocated to this PHY.
Definition at line 682 of file wifi-phy.cc.
References m_phyId.
Time ns3::WifiPhy::GetPifs | ( | ) | const |
Return the PCF Interframe Space (PIFS) for this PHY.
Definition at line 863 of file wifi-phy.cc.
References m_pifs.
Referenced by StartTx().
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).
powerLevel | the power level |
Definition at line 730 of file wifi-phy.cc.
References m_nTxPower, m_txPowerBase, m_txPowerEnd, NS_ASSERT, and NS_ASSERT_MSG.
Referenced by GetTxPowerForTransmission(), Send(), and ns3::YansWifiPhy::StartTx().
|
static |
Definition at line 1505 of file wifi-phy.cc.
References GetPreambleDetectionDuration(), and ns3::MicroSeconds().
Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), GetPreambleDetectionDuration(), TestUlOfdmaPhyTransmission< LatestPhyEntityType >::SchedulePowerMeasurementChecks(), ns3::PhyEntity::StartPreambleDetectionPeriod(), and StartTx().
uint64_t ns3::WifiPhy::GetPreviouslyRxPpduUid | ( | ) | const |
Definition at line 1941 of file wifi-phy.cc.
References GetPreviouslyRxPpduUid(), and m_previouslyRxPpduUid.
Referenced by ConvertIndicesToFrequencies(), and GetPreviouslyRxPpduUid().
uint8_t ns3::WifiPhy::GetPrimary20Index | ( | ) | const |
Definition at line 1094 of file wifi-phy.cc.
References m_operatingChannel.
Referenced by GetTypeId().
uint8_t ns3::WifiPhy::GetPrimaryChannelNumber | ( | MHz_u | primaryChannelWidth | ) | const |
Get channel number of the primary channel.
primaryChannelWidth | the width of the primary channel |
Definition at line 2362 of file wifi-phy.cc.
References GetPrimaryChannelNumber(), m_operatingChannel, and m_standard.
Referenced by GetPrimaryChannelNumber(), and GetTxMaskRejectionParams().
dB_u ns3::WifiPhy::GetRxGain | ( | ) | const |
Return the reception gain.
Definition at line 632 of file wifi-phy.cc.
References m_rxGain.
Referenced by GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().
dBm_u ns3::WifiPhy::GetRxSensitivity | ( | ) | const |
Return the receive sensitivity threshold.
Definition at line 530 of file wifi-phy.cc.
References m_rxSensitivity.
Referenced by GetTypeId(), and ns3::SpectrumWifiPhy::StartRx().
bool ns3::WifiPhy::GetShortPhyPreambleSupported | ( | ) | const |
Return whether short PHY preamble is supported.
Definition at line 645 of file wifi-phy.cc.
References m_shortPreamble.
Time ns3::WifiPhy::GetSifs | ( | ) | const |
Return the Short Interframe Space (SIFS) for this PHY.
Definition at line 839 of file wifi-phy.cc.
References m_sifs.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and StartTx().
Time ns3::WifiPhy::GetSlot | ( | ) | const |
Return the slot duration for this PHY.
Definition at line 851 of file wifi-phy.cc.
References m_slot.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and StartTx().
WifiStandard ns3::WifiPhy::GetStandard | ( | ) | const |
Get the configured Wi-Fi standard.
Definition at line 1064 of file wifi-phy.cc.
References m_standard.
Referenced by OfdmaSpectrumWifiPhy< LatestPhyEntityType >::DoInitialize(), ns3::SpectrumWifiPhy::GetRuBands(), GetSubcarrierSpacing(), ns3::SpectrumWifiPhy::StartRx(), StartTx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
static |
txVector | the transmission parameters used for this packet |
Definition at line 1511 of file wifi-phy.cc.
References GetStartOfPacketDuration(), and ns3::MicroSeconds().
Referenced by GetStartOfPacketDuration(), and StartTx().
Ptr< WifiPhyStateHelper > ns3::WifiPhy::GetState | ( | ) | const |
Return the WifiPhyStateHelper of this PHY.
Definition at line 482 of file wifi-phy.cc.
References m_state.
Referenced by PhyEntity.
|
staticprivate |
Definition at line 475 of file wifi-phy.cc.
Referenced by AddPhyEntity(), AddStaticPhyEntity(), and GetStaticPhyEntity().
|
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.
modulation | the modulation class |
Definition at line 761 of file wifi-phy.cc.
References GetStaticPhyEntities(), and NS_ABORT_MSG_IF.
Referenced by ns3::InterferenceHelper::CalculatePhyHeaderPer(), CalculatePhyPreambleAndHeaderDuration(), CalculateTxDuration(), ConvertIndicesToFrequencies(), GetMaxPsduSize(), GetPayloadDuration(), and GetWifiConstPsduMap().
Hz_u ns3::WifiPhy::GetSubcarrierSpacing | ( | ) | const |
Definition at line 2368 of file wifi-phy.cc.
References GetChannelWidth(), GetStandard(), GetSubcarrierSpacing(), NS_FATAL_ERROR, ns3::SUBCARRIER_FREQUENCY_SPACING, ns3::SUBCARRIER_FREQUENCY_SPACING_HE, 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(), GetCurrentFrequencyRange(), ns3::SpectrumWifiPhy::GetRuBands(), GetSubcarrierSpacing(), and ns3::SpectrumWifiPhy::ResetSpectrumModel().
|
virtual |
Get the remaining time to the end of the MAC header reception of the next MPDU being received from the given STA, if any.
staId | the STA-ID of the transmitter; equals SU_STA_ID for SU PPDUs |
Definition at line 1793 of file wifi-phy.cc.
References GetTimeToMacHdrEnd(), and m_phyEntities.
Referenced by GetTimeToMacHdrEnd().
|
virtual |
Get the remaining time to preamble detection period to elapse, if preamble detection is ongoing.
Definition at line 1780 of file wifi-phy.cc.
References GetTimeToPreambleDetectionEnd(), and m_phyEntities.
Referenced by GetTimeToPreambleDetectionEnd(), Reset(), and Send().
MHz_u ns3::WifiPhy::GetTxBandwidth | ( | WifiMode | mode, |
MHz_u | maxAllowedBandWidth = MHz_u{ std::numeric_limits<double>::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.
mode | the given WifiMode |
maxAllowedBandWidth | the maximum allowed TX bandwidth |
Definition at line 1112 of file wifi-phy.cc.
References GetChannelWidth(), ns3::GetMaximumChannelWidth(), ns3::WifiMode::GetModulationClass(), ns3::WIFI_MOD_CLASS_DSSS, and ns3::WIFI_MOD_CLASS_HR_DSSS.
dB_u ns3::WifiPhy::GetTxGain | ( | ) | const |
Return the transmission gain.
Definition at line 619 of file wifi-phy.cc.
References m_txGain.
Referenced by GetTxPowerForTransmission(), GetTypeId(), Send(), and ns3::YansWifiPhy::StartTx().
|
pure virtual |
This method is only relevant for SpectrumWifiPhy.
Implemented in ns3::SpectrumWifiPhy, and ns3::YansWifiPhy.
References GetPrimaryChannelNumber().
dBm_u ns3::WifiPhy::GetTxPowerEnd | ( | ) | const |
Return the maximum available transmission power level.
Definition at line 593 of file wifi-phy.cc.
References m_txPowerEnd.
Compute the transmit power for the next transmission.
The returned power will satisfy the power density constraints after addition of antenna gain.
ppdu | the PPDU to transmit |
Definition at line 2301 of file wifi-phy.cc.
References GetPower(), GetTxGain(), GetTxPowerForTransmission(), m_powerDensityLimit, m_powerRestricted, m_txPowerMaxMimo, m_txPowerMaxSiso, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::RatioToDb().
Referenced by GetTxPowerForTransmission(), Send(), and ns3::YansWifiPhy::StartTx().
dBm_u ns3::WifiPhy::GetTxPowerStart | ( | ) | const |
Return the minimum available transmission power level.
Definition at line 580 of file wifi-phy.cc.
References m_txPowerBase.
|
static |
Get the type ID.
Definition at line 61 of file wifi-phy.cc.
References ns3::Object::Object(), WifiPhy(), ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::ATTR_GET, GetCcaEdThreshold(), GetCcaSensitivityThreshold(), GetChannel(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetPrimary20Index(), GetRxGain(), GetRxSensitivity(), GetTxGain(), HasFixedPhyBand(), m_maxRadioBw, m_nTxPower, ns3::MakeAttributeContainerAccessor(), ns3::MakeAttributeContainerChecker(), ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeTupleChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), SetCcaEdThreshold(), SetCcaSensitivityThreshold(), SetFixedPhyBand(), SetOperatingChannel(), ns3::TypeId::SetParent(), SetRxGain(), SetRxSensitivity(), SetTxGain(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_PHY_BAND_6GHZ, and ns3::WIFI_PHY_BAND_UNSPECIFIED.
Referenced by PhyEntity.
|
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.
psdu | the given PSDU |
txVector | the TXVECTOR to use to send the PSDU |
Definition at line 1806 of file wifi-phy.cc.
References ns3::WifiTxVector::GetModulationClass(), GetStaticPhyEntity(), and GetWifiConstPsduMap().
Referenced by CalculateTxDuration(), GetWifiConstPsduMap(), PhyEntity, and Send().
bool ns3::WifiPhy::HasFixedPhyBand | ( | ) | const |
Definition at line 1106 of file wifi-phy.cc.
References m_fixedPhyBand.
Referenced by GetTypeId().
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.
modulation | the modulation class |
mcs | the MCS value |
Definition at line 2052 of file wifi-phy.cc.
References IsMcsSupported(), and m_phyEntities.
Referenced by GetMcs(), IsMcsSupported(), and StartTx().
bool ns3::WifiPhy::IsModeSupported | ( | WifiMode | mode | ) | const |
Check if the given WifiMode is supported by the PHY.
mode | the wifi mode to check |
Definition at line 2023 of file wifi-phy.cc.
References IsModeSupported(), and m_phyEntities.
Referenced by IsModeSupported(), and StartTx().
bool ns3::WifiPhy::IsStateCcaBusy | ( | ) | const |
Definition at line 2154 of file wifi-phy.cc.
References IsStateCcaBusy(), and m_state.
Referenced by IsStateCcaBusy(), and StartTx().
bool ns3::WifiPhy::IsStateIdle | ( | ) | const |
Definition at line 2160 of file wifi-phy.cc.
References IsStateIdle(), and m_state.
Referenced by IsStateIdle(), and StartTx().
bool ns3::WifiPhy::IsStateOff | ( | ) | const |
Definition at line 2190 of file wifi-phy.cc.
References IsStateOff(), and m_state.
Referenced by IsStateOff(), and StartTx().
bool ns3::WifiPhy::IsStateRx | ( | ) | const |
Definition at line 2166 of file wifi-phy.cc.
References IsStateRx(), and m_state.
Referenced by IsStateRx(), and StartTx().
bool ns3::WifiPhy::IsStateSleep | ( | ) | const |
Definition at line 2184 of file wifi-phy.cc.
References IsStateSleep(), and m_state.
Referenced by IsStateSleep(), and StartTx().
bool ns3::WifiPhy::IsStateSwitching | ( | ) | const |
Definition at line 2178 of file wifi-phy.cc.
References IsStateSwitching(), and m_state.
Referenced by IsStateSwitching(), and StartTx().
bool ns3::WifiPhy::IsStateTx | ( | ) | const |
Definition at line 2172 of file wifi-phy.cc.
References IsStateTx(), and m_state.
Referenced by IsStateTx(), and StartTx().
Notify PHY state helper to switch to CCA busy state,.
ppdu | the incoming PPDU or nullptr for any signal |
duration | the duration of the CCA state |
Definition at line 2221 of file wifi-phy.cc.
References GetLatestPhyEntity(), NotifyCcaBusy(), NS_LOG_FUNCTION, and ns3::WIFI_CHANLIST_PRIMARY.
Referenced by NotifyCcaBusy().
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 2016 of file wifi-phy.cc.
References m_channelAccessRequested, NotifyChannelAccessRequested(), and NS_LOG_FUNCTION.
Referenced by NotifyChannelAccessRequested().
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.
psdu | the PSDU being received |
channelFreq | the 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. |
txVector | the TXVECTOR that holds RX parameters |
signalNoise | signal power and noise power in dBm (noise power includes the noise figure) |
statusPerMpdu | reception status per MPDU |
staId | the STA-ID |
Definition at line 1686 of file wifi-phy.cc.
References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiTxVector::IsAggregation(), ns3::LAST_MPDU_IN_AGGREGATE, m_phyMonitorSniffRxTrace, m_rxMpduReferenceNumber, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NotifyMonitorSniffRx(), NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.
Referenced by GetChannel(), and NotifyMonitorSniffRx().
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.
psdu | the PSDU being received |
channelFreq | the frequency at which the packet is transmitted. |
txVector | the TXVECTOR that holds TX parameters |
staId | the STA-ID |
Definition at line 1740 of file wifi-phy.cc.
References ns3::FIRST_MPDU_IN_AGGREGATE, ns3::WifiTxVector::IsAggregation(), ns3::LAST_MPDU_IN_AGGREGATE, m_phyMonitorSniffTxTrace, m_rxMpduReferenceNumber, ns3::MIDDLE_MPDU_IN_AGGREGATE, ns3::MpduInfo::mpduRefNumber, ns3::NORMAL_MPDU, NotifyMonitorSniffTx(), NS_ASSERT_MSG, ns3::SINGLE_MPDU, and ns3::MpduInfo::type.
Referenced by NotifyMonitorSniffTx(), and Send().
void ns3::WifiPhy::NotifyRxBegin | ( | Ptr< const WifiPsdu > | psdu, |
const RxPowerWattPerChannelBand & | rxPowersW ) |
Public method used to fire a PhyRxBegin trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
rxPowersW | the receive power per channel band in Watts |
Definition at line 1643 of file wifi-phy.cc.
References m_phyRxBeginTrace, NotifyRxBegin(), and ns3::PeekPointer().
Referenced by GetChannel(), and NotifyRxBegin().
void ns3::WifiPhy::NotifyRxDrop | ( | Ptr< const WifiPsdu > | psdu, |
WifiPhyRxfailureReason | reason ) |
Public method used to fire a PhyRxDrop trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
reason | the reason the packet was dropped |
Definition at line 1667 of file wifi-phy.cc.
References m_phyRxDropTrace, NotifyRxDrop(), and ns3::PeekPointer().
Referenced by GetChannel(), NotifyRxDrop(), and NotifyRxPpduDrop().
Public method used to fire a PhyRxEnd trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
Definition at line 1655 of file wifi-phy.cc.
References m_phyRxEndTrace, NotifyRxEnd(), and ns3::PeekPointer().
Referenced by GetChannel(), and NotifyRxEnd().
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.
ppdu | the PSDU being transmitted |
reason | the reason the packet was dropped |
Definition at line 1679 of file wifi-phy.cc.
References GetAddressedPsduInPpdu(), m_phyRxPpduDropTrace, NotifyRxDrop(), and NotifyRxPpduDrop().
Referenced by AbortCurrentReception(), GetChannel(), and NotifyRxPpduDrop().
void ns3::WifiPhy::NotifyTxBegin | ( | const WifiConstPsduMap & | psdus, |
Watt_u | txPower ) |
Public method used to fire a PhyTxBegin trace.
Implemented for encapsulation purposes.
psdus | the PSDUs being transmitted (only one unless DL MU transmission) |
txPower | the transmit power |
Definition at line 1601 of file wifi-phy.cc.
References m_phyTxBeginTrace, NotifyTxBegin(), and ns3::PeekPointer().
Referenced by GetChannel(), NotifyTxBegin(), and Send().
Public method used to fire a PhyTxDrop trace.
Implemented for encapsulation purposes.
psdu | the PSDU being transmitted |
Definition at line 1631 of file wifi-phy.cc.
References m_phyTxDropTrace, NotifyTxDrop(), and ns3::PeekPointer().
Referenced by GetChannel(), NotifyTxDrop(), and Send().
void ns3::WifiPhy::NotifyTxEnd | ( | const WifiConstPsduMap & | psdus | ) |
Public method used to fire a PhyTxEnd trace.
Implemented for encapsulation purposes.
psdus | the PSDUs being transmitted (only one unless DL MU transmission) |
Definition at line 1616 of file wifi-phy.cc.
References m_phyTxEndTrace, NotifyTxEnd(), and ns3::PeekPointer().
Referenced by GetChannel(), NotifyTxEnd(), and TxDone().
|
private |
Add the given MCS to the device MCS set.
mode | the MCS to add to the device MCS set |
|
private |
Rebuild the mapping of MCS values to indices in the device MCS set.
References AbortCurrentReception(), GetAddressedPsduInPpdu(), and TxDone().
void ns3::WifiPhy::RegisterListener | ( | const std::shared_ptr< WifiPhyListener > & | listener | ) |
listener | the 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 500 of file wifi-phy.cc.
References ns3::Object::IsInitialized(), m_state, and SwitchMaybeToCcaBusy().
Referenced by PhyEntity.
|
protected |
Reset data upon end of TX or RX.
Definition at line 1954 of file wifi-phy.cc.
References GetCurrentFrequencyRange(), GetTimeToPreambleDetectionEnd(), m_currentEvent, m_currentPreambleEvents, m_endPhyRxEvent, m_endTxEvent, m_interference, m_phyEntities, ns3::Simulator::Now(), NS_LOG_FUNCTION, and Reset().
Referenced by AbortCurrentReception(), DoDispose(), OfdmaSpectrumWifiPhy< ns3::HePhy >::DoDispose(), GetDelayUntilChannelSwitch(), Reset(), SetOffMode(), SetSleepMode(), and TxDone().
void ns3::WifiPhy::ResetCca | ( | bool | powerRestricted, |
dBm_u | txPowerMaxSiso = dBm_u{0}, | ||
dBm_u | txPowerMaxMimo = dBm_u{0} ) |
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
powerRestricted | flag whether the transmit power is restricted for the next transmission |
txPowerMaxSiso | the SISO transmit power restriction for the next transmission |
txPowerMaxMimo | the MIMO transmit power restriction for the next transmission |
Definition at line 2278 of file wifi-phy.cc.
References AbortCurrentReception(), EndReceiveInterBss(), m_currentEvent, m_powerRestricted, m_txPowerMaxMimo, m_txPowerMaxSiso, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, ns3::OBSS_PD_CCA_RESET, ResetCca(), ns3::Simulator::Schedule(), and ns3::Simulator::ScheduleNow().
Referenced by ResetCca().
void ns3::WifiPhy::ResumeFromOff | ( | ) |
Resume from off mode.
Definition at line 1477 of file wifi-phy.cc.
References ns3::CCA_BUSY, ns3::IDLE, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::OFF, ResumeFromOff(), ns3::RX, ns3::SLEEP, ns3::SWITCHING, SwitchMaybeToCcaBusy(), and ns3::TX.
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall(), ResumeFromOff(), and StartTx().
void ns3::WifiPhy::ResumeFromSleep | ( | ) |
Resume from sleep mode.
Definition at line 1450 of file wifi-phy.cc.
References ns3::CCA_BUSY, ns3::IDLE, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ResumeFromSleep(), ns3::RX, ns3::SLEEP, ns3::SWITCHING, SwitchMaybeToCcaBusy(), and ns3::TX.
Referenced by ResumeFromSleep(), and StartTx().
void ns3::WifiPhy::Send | ( | const WifiConstPsduMap & | psdus, |
const WifiTxVector & | txVector ) |
psdus | the PSDUs to send |
txVector | the 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 1819 of file wifi-phy.cc.
References AbortCurrentReception(), CalculateTxDuration(), ns3::DbmToW(), GetFrequency(), GetMaxSupportedTxSpatialStreams(), ns3::WifiTxVector::GetModulationClass(), ns3::WifiTxVector::GetNss(), ns3::WifiTxVector::GetNssMax(), ns3::WifiTxVector::GetNssTotal(), GetPhyBand(), GetPhyEntity(), GetPower(), GetTimeToPreambleDetectionEnd(), GetTxGain(), GetTxPowerForTransmission(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::WifiTxVector::IsDlMuMimo(), ns3::WifiTxVector::IsMu(), ns3::WifiTxVector::IsValid(), m_band, m_channelAccessRequested, m_currentEvent, m_endTxEvent, m_phyTxPsduBeginTrace, m_powerRestricted, m_previouslyRxPpduUid, m_state, m_wifiRadioEnergyModel, NotifyMonitorSniffTx(), NotifyTxBegin(), NotifyTxDrop(), ns3::Time::NS, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::OFF, ns3::RECEPTION_ABORTED_BY_TX, ns3::Simulator::Schedule(), Send(), ns3::SIGNAL_DETECTION_ABORTED_BY_TX, StartTx(), ns3::TX, and TxDone().
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.
psdu | the PSDU to send (in a SU PPDU) |
txVector | the 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 1812 of file wifi-phy.cc.
References GetWifiConstPsduMap(), NS_LOG_FUNCTION, Send(), and Send().
Referenced by Send(), and Send().
void ns3::WifiPhy::SetCapabilitiesChangedCallback | ( | Callback< void > | callback | ) |
callback | the callback to invoke when PHY capabilities have changed. |
Definition at line 517 of file wifi-phy.cc.
References m_capabilitiesChangedCallback.
Referenced by PhyEntity.
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.
threshold | the CCA threshold |
Definition at line 536 of file wifi-phy.cc.
References m_ccaEdThreshold, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
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.
threshold | the CCA sensitivity threshold |
Definition at line 549 of file wifi-phy.cc.
References m_ccaSensitivityThreshold, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
virtual |
Sets the device this PHY is associated with.
device | the device this PHY is associated with |
Reimplemented in ns3::SpectrumWifiPhy.
Definition at line 651 of file wifi-phy.cc.
References m_device.
Referenced by ns3::SpectrumWifiPhy::SetDevice().
void ns3::WifiPhy::SetErrorRateModel | ( | const Ptr< ErrorRateModel > | model | ) |
Sets the error rate model.
model | the error rate model |
Definition at line 697 of file wifi-phy.cc.
References m_interference, NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetFixedPhyBand | ( | bool | enable | ) |
Configure whether it is prohibited to change PHY band after initialization.
enable | true to prohibit changing PHY band after initialization, false otherwise |
Definition at line 1100 of file wifi-phy.cc.
References m_fixedPhyBand.
Referenced by GetTypeId().
void ns3::WifiPhy::SetFrameCaptureModel | ( | const Ptr< FrameCaptureModel > | frameCaptureModel | ) |
Sets the frame capture model.
frameCaptureModel | the frame capture model |
Definition at line 712 of file wifi-phy.cc.
References m_frameCaptureModel.
|
virtual |
Sets the interference helper.
helper | the interference helper |
Reimplemented in ns3::YansWifiPhy.
Definition at line 688 of file wifi-phy.cc.
References ns3::DbToRatio(), m_interference, m_noiseFigure, m_numberOfAntennas, and NS_LOG_FUNCTION.
Referenced by ns3::YansWifiPhy::SetInterferenceHelper().
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.
modClass | the given modulation class |
Definition at line 985 of file wifi-phy.cc.
References m_maxModClassSupported, and NS_LOG_FUNCTION.
Referenced by StartTx().
void ns3::WifiPhy::SetMaxSupportedRxSpatialStreams | ( | uint8_t | streams | ) |
streams | the maximum number of supported RX spatial streams. |
Definition at line 1361 of file wifi-phy.cc.
References GetNumberOfAntennas(), m_capabilitiesChangedCallback, m_rxSpatialStreams, NS_ASSERT, and SetMaxSupportedRxSpatialStreams().
Referenced by SetMaxSupportedRxSpatialStreams().
void ns3::WifiPhy::SetMaxSupportedTxSpatialStreams | ( | uint8_t | streams | ) |
streams | the maximum number of supported TX spatial streams. |
Definition at line 1329 of file wifi-phy.cc.
References GetNumberOfAntennas(), m_capabilitiesChangedCallback, m_phyEntities, m_txSpatialStreams, NS_ASSERT, SetMaxSupportedTxSpatialStreams(), and ns3::WIFI_MOD_CLASS_HT.
Referenced by SetMaxSupportedTxSpatialStreams().
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.
mobility | the mobility model this PHY is associated with |
Definition at line 663 of file wifi-phy.cc.
References m_mobility.
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.
n | the number of available levels |
Definition at line 599 of file wifi-phy.cc.
References m_nTxPower, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetNumberOfAntennas | ( | uint8_t | antennas | ) |
antennas | the number of antennas on this node. |
Definition at line 1311 of file wifi-phy.cc.
References m_interference, m_numberOfAntennas, NS_ASSERT_MSG, NS_LOG_FUNCTION, and SetNumberOfAntennas().
Referenced by SetNumberOfAntennas().
void ns3::WifiPhy::SetOffMode | ( | ) |
Put in off mode.
Definition at line 1440 of file wifi-phy.cc.
References m_channelAccessRequested, m_powerRestricted, m_state, NS_LOG_FUNCTION, Reset(), and SetOffMode().
Referenced by ns3::WifiRadioEnergyModelHelper::DoInstall(), SetOffMode(), and StartTx().
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.
channelSegments | the segments identifying the operating channel |
Definition at line 1145 of file wifi-phy.cc.
References WifiPhy(), DoChannelSwitch(), GetDelayUntilChannelSwitch(), ns3::Object::IsInitialized(), m_channelSettings, m_standard, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SetOperatingChannel(), and ns3::WIFI_STANDARD_UNSPECIFIED.
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.
tuple | the segment identifying the operating channel |
Definition at line 1139 of file wifi-phy.cc.
References SetOperatingChannel().
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.
channel | the given operating channel |
Definition at line 1124 of file wifi-phy.cc.
References NS_LOG_FUNCTION, and SetOperatingChannel().
Referenced by ConfigureStandard(), GetTypeId(), SetOperatingChannel(), SetOperatingChannel(), and SetOperatingChannel().
void ns3::WifiPhy::SetPhyId | ( | uint8_t | phyId | ) |
Set the index allocated to this PHY.
phyId | the ID allocated to this PHY |
Definition at line 675 of file wifi-phy.cc.
References m_phyId, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetPifs | ( | Time | pifs | ) |
Set the PCF Interframe Space (PIFS) for this PHY.
pifs | the PIFS duration |
Definition at line 857 of file wifi-phy.cc.
References m_pifs.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and StartTx().
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.
em | Pointer to the ErrorModel. |
Definition at line 705 of file wifi-phy.cc.
References m_postReceptionErrorModel, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetPreambleDetectionModel | ( | const Ptr< PreambleDetectionModel > | preambleDetectionModel | ) |
Sets the preamble detection model.
preambleDetectionModel | the preamble detection model |
Definition at line 718 of file wifi-phy.cc.
References m_preambleDetectionModel.
void ns3::WifiPhy::SetPreviouslyRxPpduUid | ( | uint64_t | uid | ) |
Set the UID of the previously received PPDU.
uid | the value for the UID of the previously received PPDU |
Definition at line 1947 of file wifi-phy.cc.
References m_previouslyRxPpduUid, m_standard, NS_ASSERT, SetPreviouslyRxPpduUid(), and ns3::WIFI_STANDARD_80211be.
Referenced by ConvertIndicesToFrequencies(), and SetPreviouslyRxPpduUid().
void ns3::WifiPhy::SetReceiveErrorCallback | ( | RxErrorCallback | callback | ) |
callback | the callback to invoke upon erroneous packet reception. |
Definition at line 494 of file wifi-phy.cc.
References m_state.
Referenced by PhyEntity.
void ns3::WifiPhy::SetReceiveOkCallback | ( | RxOkCallback | callback | ) |
callback | the callback to invoke upon successful packet reception. |
Definition at line 488 of file wifi-phy.cc.
References m_state.
Referenced by WifiPrimaryChannelsTest::DoRun(), and PhyEntity.
void ns3::WifiPhy::SetRxGain | ( | dB_u | gain | ) |
Sets the reception gain.
gain | the reception gain |
Definition at line 625 of file wifi-phy.cc.
References m_rxGain, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetRxNoiseFigure | ( | dB_u | noiseFigure | ) |
Sets the RX loss in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
noiseFigure | noise figure |
Definition at line 562 of file wifi-phy.cc.
References ns3::DbToRatio(), m_interference, m_noiseFigure, and NS_LOG_FUNCTION.
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.
threshold | the receive sensitivity threshold |
Definition at line 523 of file wifi-phy.cc.
References m_rxSensitivity, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetShortPhyPreambleSupported | ( | bool | preamble | ) |
Enable or disable short PHY preamble.
preamble | sets whether short PHY preamble is supported or not |
Definition at line 638 of file wifi-phy.cc.
References m_shortPreamble, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetSifs | ( | Time | sifs | ) |
Set the Short Interframe Space (SIFS) for this PHY.
sifs | the SIFS duration |
Definition at line 833 of file wifi-phy.cc.
References m_sifs.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and StartTx().
void ns3::WifiPhy::SetSleepMode | ( | bool | forceSleepWhileInRx = false | ) |
Put in sleep mode.
forceSleepWhileInRx | force setting sleep mode if state is RX |
Definition at line 1394 of file wifi-phy.cc.
References AbortCurrentReception(), ns3::CCA_BUSY, GetDelayUntilIdle(), ns3::IDLE, m_channelAccessRequested, m_powerRestricted, m_state, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, Reset(), ns3::RX, ns3::Simulator::Schedule(), SetSleepMode(), ns3::SLEEP, ns3::SLEEPING, ns3::SWITCHING, and ns3::TX.
Referenced by SetSleepMode(), and StartTx().
void ns3::WifiPhy::SetSlot | ( | Time | slot | ) |
Set the slot duration for this PHY.
slot | the slot duration |
Definition at line 845 of file wifi-phy.cc.
References m_slot.
Referenced by Configure80211a(), Configure80211b(), Configure80211p(), and StartTx().
void ns3::WifiPhy::SetTxGain | ( | dB_u | gain | ) |
Sets the transmission gain.
gain | the transmission gain |
Definition at line 612 of file wifi-phy.cc.
References m_txGain, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::WifiPhy::SetTxPowerEnd | ( | dBm_u | end | ) |
Sets the maximum available transmission power level.
end | the maximum transmission power level |
Definition at line 586 of file wifi-phy.cc.
References m_txPowerEnd, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetTxPowerStart | ( | dBm_u | start | ) |
Sets the minimum available transmission power level.
start | the minimum transmission power level |
Definition at line 573 of file wifi-phy.cc.
References m_txPowerBase, and NS_LOG_FUNCTION.
void ns3::WifiPhy::SetWifiRadioEnergyModel | ( | const Ptr< WifiRadioEnergyModel > | wifiRadioEnergyModel | ) |
Sets the wifi radio energy model.
wifiRadioEnergyModel | the wifi radio energy model |
Definition at line 724 of file wifi-phy.cc.
References m_wifiRadioEnergyModel.
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).
ppdu | the arriving PPDU |
rxPowersW | the receive power in W per band |
rxDuration | the duration of the PPDU |
Definition at line 1972 of file wifi-phy.cc.
References GetCurrentFrequencyRange(), m_interference, m_maxModClassSupported, m_phyEntities, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, StartReceivePreamble(), SwitchMaybeToCcaBusy(), and ns3::WIFI_MOD_CLASS_UNKNOWN.
Referenced by PhyEntity, StartReceivePreamble(), and ns3::SpectrumWifiPhy::StartRx().
ppdu | the PPDU to send |
Implemented in ns3::SpectrumWifiPhy, ns3::YansWifiPhy, OfdmaSpectrumWifiPhy< LatestPhyEntityType >, and OfdmaSpectrumWifiPhy< ns3::HePhy >.
References CalculatePhyPreambleAndHeaderDuration(), CalculateSnr(), CalculateTxDuration(), ConfigureStandard(), GetBssMembershipSelectorList(), GetChannelNumber(), GetChannelSwitchDelay(), GetDefaultMode(), GetDelayUntilIdle(), GetLastRxEndTime(), GetLastRxStartTime(), GetMaxModulationClassSupported(), GetMaxPsduSize(), GetMcs(), GetMcsList(), GetModeList(), GetNMcs(), GetOperatingChannel(), GetPayloadDuration(), GetPhyBand(), GetPifs(), GetPreambleDetectionDuration(), GetSifs(), GetSlot(), GetStandard(), GetStartOfPacketDuration(), IsMcsSupported(), IsModeSupported(), IsStateCcaBusy(), IsStateIdle(), IsStateOff(), IsStateRx(), IsStateSleep(), IsStateSwitching(), IsStateTx(), ns3::NORMAL_MPDU, ResumeFromOff(), ResumeFromSleep(), SetMaxModulationClassSupported(), SetOffMode(), SetPifs(), SetSifs(), SetSleepMode(), SetSlot(), and ns3::SU_STA_ID.
Referenced by Send().
Check if PHY state should move to CCA busy state based on current state of interference tracker.
ppdu | the incoming PPDU or nullptr for any signal |
Definition at line 2214 of file wifi-phy.cc.
References GetLatestPhyEntity(), NS_LOG_FUNCTION, and SwitchMaybeToCcaBusy().
Referenced by ns3::SpectrumWifiPhy::FinalizeChannelSwitch(), RegisterListener(), ResumeFromOff(), ResumeFromSleep(), StartReceivePreamble(), ns3::SpectrumWifiPhy::StartRx(), SwitchMaybeToCcaBusy(), and TxDone().
|
private |
Callback function when a transmission is completed.
psdus | the PSDUs that have been sent |
Definition at line 1931 of file wifi-phy.cc.
References NotifyTxEnd(), NS_LOG_FUNCTION, Reset(), SwitchMaybeToCcaBusy(), and TxDone().
Referenced by RebuildMcsMap(), Send(), and TxDone().
void ns3::WifiPhy::UnregisterListener | ( | const std::shared_ptr< WifiPhyListener > & | listener | ) |
listener | the listener to be unregistered |
Remove the input listener from the list of objects to be notified of PHY-level events.
Definition at line 511 of file wifi-phy.cc.
References m_state.
Referenced by PhyEntity.
|
friend |
Definition at line 64 of file wifi-phy.h.
References WifiPhy(), EndReceiveInterBss(), GetInfoIfRxingPhyHeader(), GetState(), GetTypeId(), GetWifiConstPsduMap(), PhyEntity, RegisterListener(), SetCapabilitiesChangedCallback(), SetReceiveErrorCallback(), SetReceiveOkCallback(), StartReceivePreamble(), and UnregisterListener().
Referenced by PhyEntity.
|
private |
Definition at line 1615 of file wifi-phy.h.
Referenced by WifiPhy(), Configure80211ax(), Configure80211n(), DoChannelSwitch(), GetPhyBand(), and Send().
|
private |
Callback when PHY capabilities changed.
Definition at line 1663 of file wifi-phy.h.
Referenced by SetCapabilitiesChangedCallback(), SetMaxSupportedRxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
|
private |
Clear channel assessment (CCA) energy detection (ED) threshold.
Definition at line 1625 of file wifi-phy.h.
Referenced by GetCcaEdThreshold(), and SetCcaEdThreshold().
|
private |
Clear channel assessment (CCA) modulation and coding rate sensitivity threshold.
Definition at line 1626 of file wifi-phy.h.
Referenced by GetCcaSensitivityThreshold(), and SetCcaSensitivityThreshold().
|
private |
Flag if channels access has been requested (used for OBSS_PD SR)
Definition at line 1639 of file wifi-phy.h.
Referenced by WifiPhy(), DoChannelSwitch(), EndReceiveInterBss(), NotifyChannelAccessRequested(), Send(), SetOffMode(), and SetSleepMode().
|
private |
Store operating channel settings until initialization.
Definition at line 1616 of file wifi-phy.h.
Referenced by ConfigureStandard(), DoChannelSwitch(), and SetOperatingChannel().
|
private |
Time required to switch between channel.
Definition at line 1649 of file wifi-phy.h.
Referenced by GetChannelSwitchDelay().
Hold the current event.
Definition at line 1365 of file wifi-phy.h.
Referenced by WifiPhy(), AbortCurrentReception(), MuMimoSpectrumWifiPhy::GetCurrentEvent(), OfdmaSpectrumWifiPhy< LatestPhyEntityType >::GetCurrentEvent(), GetInfoIfRxingPhyHeader(), Reset(), ResetCca(), and Send().
|
protected |
store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is being received
Definition at line 1367 of file wifi-phy.h.
Referenced by AbortCurrentReception(), OfdmaSpectrumWifiPhy< LatestPhyEntityType >::GetCurrentPreambleEvents(), and Reset().
|
private |
Pointer to the device.
Definition at line 1653 of file wifi-phy.h.
Referenced by DoDispose(), DoInitialize(), GetDevice(), and SetDevice().
|
protected |
the end of PHY receive event
Definition at line 1362 of file wifi-phy.h.
Referenced by WifiPhy(), AbortCurrentReception(), GetInfoIfRxingPhyHeader(), and Reset().
|
protected |
the end of transmit event
Definition at line 1363 of file wifi-phy.h.
|
private |
True to prohibit changing PHY band after initialization.
Definition at line 1618 of file wifi-phy.h.
Referenced by DoChannelSwitch(), HasFixedPhyBand(), and SetFixedPhyBand().
|
private |
Frame capture model.
Definition at line 1656 of file wifi-phy.h.
Referenced by DoDispose(), and SetFrameCaptureModel().
|
protected |
Pointer to a helper responsible for interference computations.
Definition at line 1352 of file wifi-phy.h.
Referenced by AbortCurrentReception(), AssignStreams(), CalculateSnr(), DoDispose(), OfdmaSpectrumWifiPhy< LatestPhyEntityType >::GetEnergyDuration(), Reset(), SetErrorRateModel(), SetInterferenceHelper(), ns3::YansWifiPhy::SetInterferenceHelper(), SetNumberOfAntennas(), SetRxNoiseFigure(), StartReceivePreamble(), ns3::SpectrumWifiPhy::StartRx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
private |
max modulation class supported
Definition at line 1614 of file wifi-phy.h.
Referenced by WifiPhy(), ConfigureStandard(), GetMaxModulationClassSupported(), SetMaxModulationClassSupported(), and StartReceivePreamble().
|
private |
|
private |
Pointer to the mobility model.
Definition at line 1654 of file wifi-phy.h.
Referenced by DoDispose(), DoInitialize(), GetMobility(), and SetMobility().
|
private |
The noise figure.
Definition at line 1647 of file wifi-phy.h.
Referenced by SetInterferenceHelper(), and SetRxNoiseFigure().
|
private |
whether the PHY is capable of notifying MAC header RX end
Definition at line 1661 of file wifi-phy.h.
|
private |
Number of available transmission power levels.
Definition at line 1633 of file wifi-phy.h.
Referenced by GetNTxPower(), GetPower(), GetTypeId(), and SetNTxPower().
|
private |
Number of transmitters.
Definition at line 1643 of file wifi-phy.h.
Referenced by GetNumberOfAntennas(), SetInterferenceHelper(), and SetNumberOfAntennas().
|
private |
Operating channel.
Definition at line 1617 of file wifi-phy.h.
Referenced by ConfigureStandard(), GetChannelNumber(), GetChannelWidth(), GetFrequency(), GetOperatingChannel(), GetPrimary20Index(), and GetPrimaryChannelNumber().
|
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 1390 of file wifi-phy.h.
Referenced by AbortCurrentReception(), AddPhyEntity(), ConfigureStandard(), DoDispose(), MuMimoSpectrumWifiPhy::DoInitialize(), MuRtsCtsSpectrumWifiPhy::DoInitialize(), OfdmaSpectrumWifiPhy< LatestPhyEntityType >::DoInitialize(), GetBssMembershipSelectorList(), GetDefaultMode(), GetMcs(), GetMcsList(), GetMcsList(), GetModeList(), GetModeList(), GetNMcs(), GetPhyEntity(), GetPhyEntityForPpdu(), GetTimeToMacHdrEnd(), GetTimeToPreambleDetectionEnd(), IsMcsSupported(), IsModeSupported(), Reset(), SetMaxSupportedTxSpatialStreams(), and StartReceivePreamble().
|
protected |
the index of the PHY in the vector of PHYs held by the WifiNetDevice
Definition at line 1349 of file wifi-phy.h.
Referenced by WifiPhy(), GetPhyId(), and SetPhyId().
|
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()
Definition at line 1583 of file wifi-phy.h.
Referenced by NotifyMonitorSniffRx().
|
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()
Definition at line 1602 of file wifi-phy.h.
Referenced by NotifyMonitorSniffTx().
|
private |
The trace source fired when a packet begins the reception process from the medium.
Definition at line 1516 of file wifi-phy.h.
Referenced by NotifyRxBegin().
|
private |
The trace source fired when the PHY layer drops a packet it has received.
Definition at line 1558 of file wifi-phy.h.
Referenced by NotifyRxDrop().
|
private |
The trace source fired when a packet ends the reception process from the medium.
Definition at line 1551 of file wifi-phy.h.
Referenced by NotifyRxEnd().
|
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.
Definition at line 1543 of file wifi-phy.h.
|
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.
Definition at line 1532 of file wifi-phy.h.
|
private |
The trace source fired when the PHY layer drops a packet it has received.
Definition at line 1563 of file wifi-phy.h.
Referenced by NotifyRxPpduDrop().
|
private |
The trace source fired when a packet begins the transmission process on the medium.
Definition at line 1485 of file wifi-phy.h.
Referenced by NotifyTxBegin().
|
private |
The trace source fired when the PHY layer drops a packet as it tries to transmit it.
Definition at line 1508 of file wifi-phy.h.
Referenced by NotifyTxDrop().
|
private |
The trace source fired when a packet ends the transmission process on the medium.
Definition at line 1500 of file wifi-phy.h.
Referenced by NotifyTxEnd().
|
private |
The trace source fired when a PSDU map begins the transmission process on the medium.
Definition at line 1492 of file wifi-phy.h.
Referenced by Send().
|
private |
PCF Interframe Space (PIFS) duration.
Definition at line 1622 of file wifi-phy.h.
|
private |
Error model for receive packet events.
Definition at line 1659 of file wifi-phy.h.
Referenced by DoDispose(), and SetPostReceptionErrorModel().
|
private |
the power density limit
Definition at line 1634 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission().
|
private |
Flag whether transmit power is restricted by OBSS PD SR.
Definition at line 1636 of file wifi-phy.h.
Referenced by WifiPhy(), DoChannelSwitch(), EndReceiveInterBss(), GetTxPowerForTransmission(), ResetCca(), Send(), SetOffMode(), and SetSleepMode().
|
private |
Preamble detection model.
Definition at line 1657 of file wifi-phy.h.
Referenced by DoDispose(), and SetPreambleDetectionModel().
|
protected |
UID of the previously received PPDU, reset to UINT64_MAX upon transmission.
Definition at line 1370 of file wifi-phy.h.
Referenced by WifiPhy(), GetPreviouslyRxPpduUid(), Send(), MuMimoSpectrumWifiPhy::SetPpduUid(), MuRtsCtsSpectrumWifiPhy::SetPpduUid(), OfdmaSpectrumWifiPhy< LatestPhyEntityType >::SetPpduUid(), SetPreviouslyRxPpduUid(), MuMimoSpectrumWifiPhy::SetTriggerFrameUid(), and OfdmaSpectrumWifiPhy< LatestPhyEntityType >::SetTriggerFrameUid().
|
protected |
Provides uniform random variables.
Definition at line 1354 of file wifi-phy.h.
Referenced by WifiPhy(), AssignStreams(), and DoDispose().
|
private |
Reception gain.
Definition at line 1630 of file wifi-phy.h.
Referenced by GetRxGain(), and SetRxGain().
|
protected |
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU.
Definition at line 1359 of file wifi-phy.h.
Referenced by WifiPhy(), NotifyMonitorSniffRx(), and NotifyMonitorSniffTx().
|
private |
Receive sensitivity threshold.
Definition at line 1624 of file wifi-phy.h.
Referenced by GetRxSensitivity(), and SetRxSensitivity().
|
private |
Number of supported RX spatial streams.
Definition at line 1645 of file wifi-phy.h.
Referenced by WifiPhy(), GetMaxSupportedRxSpatialStreams(), and SetMaxSupportedRxSpatialStreams().
|
private |
Flag if short PHY preamble is supported.
Definition at line 1642 of file wifi-phy.h.
Referenced by GetShortPhyPreambleSupported(), and SetShortPhyPreambleSupported().
|
private |
Short Interframe Space (SIFS) duration.
Definition at line 1620 of file wifi-phy.h.
|
protected |
Signal Transmission callback.
Definition at line 1393 of file wifi-phy.h.
Referenced by ns3::SpectrumWifiPhy::StartTx(), and ns3::YansWifiPhy::StartTx().
|
private |
Slot duration.
Definition at line 1621 of file wifi-phy.h.
|
private |
Definition at line 1613 of file wifi-phy.h.
Referenced by WifiPhy(), ConfigureStandard(), DoChannelSwitch(), GetLatestPhyEntity(), GetPrimaryChannelNumber(), GetStandard(), SetOperatingChannel(), and SetPreviouslyRxPpduUid().
|
protected |
Pointer to WifiPhyStateHelper.
Definition at line 1355 of file wifi-phy.h.
Referenced by WifiPhy(), AbortCurrentReception(), DoDispose(), GetDelayUntilChannelSwitch(), GetDelayUntilIdle(), GetLastRxEndTime(), GetLastRxStartTime(), GetState(), IsStateCcaBusy(), IsStateIdle(), IsStateOff(), IsStateRx(), IsStateSleep(), IsStateSwitching(), IsStateTx(), RegisterListener(), ResumeFromOff(), ResumeFromSleep(), Send(), SetOffMode(), SetReceiveErrorCallback(), SetReceiveOkCallback(), SetSleepMode(), and UnregisterListener().
|
private |
Record the time the last preamble was detected.
Definition at line 1660 of file wifi-phy.h.
Referenced by WifiPhy().
|
private |
Transmission gain.
Definition at line 1629 of file wifi-phy.h.
Referenced by GetTxGain(), and SetTxGain().
|
protected |
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU.
Definition at line 1357 of file wifi-phy.h.
Referenced by WifiPhy().
|
private |
Minimum transmission power.
Definition at line 1631 of file wifi-phy.h.
Referenced by GetPower(), GetTxPowerStart(), and SetTxPowerStart().
|
private |
Maximum transmission power.
Definition at line 1632 of file wifi-phy.h.
Referenced by GetPower(), GetTxPowerEnd(), and SetTxPowerEnd().
|
private |
MIMO maximum transmit power due to OBSS PD SR power restriction.
Definition at line 1638 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission(), and ResetCca().
|
private |
SISO maximum transmit power due to OBSS PD SR power restriction.
Definition at line 1637 of file wifi-phy.h.
Referenced by GetTxPowerForTransmission(), and ResetCca().
|
private |
Number of supported TX spatial streams.
Definition at line 1644 of file wifi-phy.h.
Referenced by WifiPhy(), Configure80211n(), GetMaxSupportedTxSpatialStreams(), and SetMaxSupportedTxSpatialStreams().
|
private |
Wifi radio energy model.
Definition at line 1658 of file wifi-phy.h.
Referenced by WifiPhy(), DoDispose(), Send(), and SetWifiRadioEnergyModel().