A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::YansWifiPhy Class Reference

802.11 PHY layer model More...

#include "yans-wifi-phy.h"

+ Inheritance diagram for ns3::YansWifiPhy:
+ Collaboration diagram for ns3::YansWifiPhy:

Public Member Functions

 YansWifiPhy ()
 
 ~YansWifiPhy () override
 
WifiSpectrumBandFrequencies ConvertIndicesToFrequencies (const WifiSpectrumBandIndices &indices) const override
 This is a helper function to convert start and stop indices to start and stop frequencies.
 
WifiSpectrumBandInfo GetBand (uint16_t bandWidth, uint8_t bandIndex=0) override
 Get the info of a given band.
 
Ptr< ChannelGetChannel () const override
 Return the Channel this WifiPhy is connected to.
 
FrequencyRange GetCurrentFrequencyRange () const override
 Get the frequency range of the current RF interface.
 
uint16_t GetGuardBandwidth (uint16_t currentChannelWidth) const override
 
std::tuple< double, double, doubleGetTxMaskRejectionParams () const override
 
void SetChannel (const Ptr< YansWifiChannel > channel)
 Set the YansWifiChannel this YansWifiPhy is to be connected to.
 
void SetInterferenceHelper (const Ptr< InterferenceHelper > helper) override
 Sets the interference helper.
 
void StartTx (Ptr< const WifiPpdu > ppdu) override
 
- Public Member Functions inherited from ns3::WifiPhy
 WifiPhy ()
 
 ~WifiPhy () override
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
 
double CalculateSnr (const WifiTxVector &txVector, double ber) const
 
virtual void ConfigureStandard (WifiStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard.
 
virtual WifiSpectrumBandFrequencies ConvertIndicesToFrequencies (const WifiSpectrumBandIndices &indices) const =0
 This is a helper function to convert start and stop indices to start and stop frequencies.
 
void EndReceiveInterBss ()
 For HE receptions only, check and possibly modify the transmit power restriction state at the end of PPDU reception.
 
Time GetAckTxTime () const
 Return the estimated Ack TX time for this PHY.
 
virtual WifiSpectrumBandInfo GetBand (uint16_t bandWidth, uint8_t bandIndex=0)=0
 Get the info of a given band.
 
Time GetBlockAckTxTime () const
 Return the estimated BlockAck TX time for this PHY.
 
std::list< uint8_t > GetBssMembershipSelectorList () const
 The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception modes that this WifiPhy(-derived class) can support - a set of WifiMode objects which we call the BssMembershipSelectorSet, and which is stored inside HT PHY (and above) instances.
 
double GetCcaEdThreshold () const
 Return the CCA energy detection threshold (dBm).
 
double GetCcaSensitivityThreshold () const
 Return the CCA sensitivity threshold (dBm).
 
virtual Ptr< ChannelGetChannel () const =0
 Return the Channel this WifiPhy is connected to.
 
uint8_t GetChannelNumber () const
 Return current channel number.
 
Time GetChannelSwitchDelay () const
 
uint16_t GetChannelWidth () const
 
virtual FrequencyRange GetCurrentFrequencyRange () const =0
 Get the frequency range of the current RF interface.
 
WifiMode GetDefaultMode () const
 Get the default WifiMode supported by the PHY.
 
Time GetDelayUntilIdle ()
 
Ptr< WifiNetDeviceGetDevice () const
 Return the device this PHY is associated with.
 
uint16_t GetFrequency () const
 
virtual uint16_t GetGuardBandwidth (uint16_t currentChannelWidth) const =0
 
Time GetLastRxEndTime () const
 Return the end time of the last received packet.
 
Time GetLastRxStartTime () const
 Return the start time of the last received packet.
 
Ptr< PhyEntityGetLatestPhyEntity () const
 Get the latest PHY entity supported by this PHY instance.
 
uint8_t GetMaxSupportedRxSpatialStreams () const
 
uint8_t GetMaxSupportedTxSpatialStreams () const
 
WifiMode GetMcs (WifiModulationClass modulation, uint8_t mcs) const
 Get the WifiMode object corresponding to the given MCS of the given modulation class.
 
std::list< WifiModeGetMcsList () const
 The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception MCS indices that this WifiPhy(-derived class) can support - a set of MCS indices which is stored by each HT PHY (and above).
 
std::list< WifiModeGetMcsList (WifiModulationClass modulation) const
 Get the list of supported MCSs for the given modulation class (i.e.
 
Ptr< MobilityModelGetMobility () const
 Return the mobility model this PHY is associated with.
 
std::list< WifiModeGetModeList () const
 The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set of transmission/reception (non-MCS) modes that this WifiPhy(-derived class) can support - a set of modes which is stored by each non-HT PHY.
 
std::list< WifiModeGetModeList (WifiModulationClass modulation) const
 Get the list of supported (non-MCS) modes for the given modulation class (i.e.
 
uint16_t GetNMcs () const
 
uint8_t GetNTxPower () const
 Return the number of available transmission power levels.
 
uint8_t GetNumberOfAntennas () const
 
const WifiPhyOperatingChannelGetOperatingChannel () const
 Get a const reference to the operating channel.
 
WifiPhyBand GetPhyBand () const
 Get the configured Wi-Fi band.
 
Ptr< PhyEntityGetPhyEntity (WifiModulationClass modulation) const
 Get the supported PHY entity corresponding to the modulation class.
 
Ptr< PhyEntityGetPhyEntity (WifiStandard standard) const
 Get the supported PHY entity corresponding to the wifi standard.
 
Ptr< PhyEntityGetPhyEntityForPpdu (const Ptr< const WifiPpdu > ppdu) const
 Get the supported PHY entity to use for a received PPDU.
 
Time GetPifs () const
 Return the PCF Interframe Space (PIFS) for this PHY.
 
double GetPowerDbm (uint8_t power) const
 Get the power of the given power level in dBm.
 
uint64_t GetPreviouslyRxPpduUid () const
 
uint8_t GetPrimary20Index () const
 
uint8_t GetPrimaryChannelNumber (uint16_t primaryChannelWidth) const
 Get channel number of the primary channel.
 
double GetRxGain () const
 Return the reception gain (dB).
 
double GetRxSensitivity () const
 Return the receive sensitivity threshold (dBm).
 
bool GetShortPhyPreambleSupported () const
 Return whether short PHY preamble is supported.
 
Time GetSifs () const
 Return the Short Interframe Space (SIFS) for this PHY.
 
Time GetSlot () const
 Return the slot duration for this PHY.
 
WifiStandard GetStandard () const
 Get the configured Wi-Fi standard.
 
Ptr< WifiPhyStateHelperGetState () const
 Return the WifiPhyStateHelper of this PHY.
 
uint32_t GetSubcarrierSpacing () const
 
uint16_t GetTxBandwidth (WifiMode mode, uint16_t maxAllowedBandWidth=std::numeric_limits< uint16_t >::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.
 
double GetTxGain () const
 Return the transmission gain (dB).
 
virtual std::tuple< double, double, doubleGetTxMaskRejectionParams () const =0
 
double GetTxPowerEnd () const
 Return the maximum available transmission power level (dBm).
 
double GetTxPowerForTransmission (Ptr< const WifiPpdu > ppdu) const
 Compute the transmit power for the next transmission.
 
double GetTxPowerStart () const
 Return the minimum available transmission power level (dBm).
 
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, uint16_t channelFreqMhz, WifiTxVector txVector, SignalNoiseDbm signalNoise, 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, uint16_t channelFreqMhz, 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 NotifyTxBegin (WifiConstPsduMap psdus, double txPowerW)
 Public method used to fire a PhyTxBegin trace.
 
void NotifyTxDrop (Ptr< const WifiPsdu > psdu)
 Public method used to fire a PhyTxDrop trace.
 
void NotifyTxEnd (WifiConstPsduMap psdus)
 Public method used to fire a PhyTxEnd trace.
 
void RegisterListener (WifiPhyListener *listener)
 
void ResetCca (bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0)
 Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
 
void ResumeFromOff ()
 Resume from off mode.
 
void ResumeFromSleep ()
 Resume from sleep mode.
 
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 Send (WifiConstPsduMap psdus, const WifiTxVector &txVector)
 
void SetCapabilitiesChangedCallback (Callback< void > callback)
 
void SetCcaEdThreshold (double threshold)
 Sets the CCA energy detection threshold (dBm).
 
void SetCcaSensitivityThreshold (double threshold)
 Sets the CCA sensitivity threshold (dBm).
 
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 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 ChannelTuple &channelTuple)
 If the standard for this object has not been set yet, store the given channel settings.
 
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 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 SetReceiveErrorCallback (RxErrorCallback callback)
 
void SetReceiveOkCallback (RxOkCallback callback)
 
void SetRxGain (double gain)
 Sets the reception gain (dB).
 
void SetRxNoiseFigure (double noiseFigureDb)
 Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
 
void SetRxSensitivity (double threshold)
 Sets the receive sensitivity threshold (dBm).
 
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 ()
 Put in sleep mode.
 
void SetSlot (Time slot)
 Set the slot duration for this PHY.
 
void SetTxGain (double gain)
 Sets the transmission gain (dB).
 
void SetTxPowerEnd (double end)
 Sets the maximum available transmission power level (dBm).
 
void SetTxPowerStart (double start)
 Sets the minimum available transmission power level (dBm).
 
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 (WifiPhyListener *listener)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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 TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::WifiPhy
static void AddStaticPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
 Add the PHY entity to the map of implemented PHY entities for the given modulation class.
 
static Time CalculatePhyPreambleAndHeaderDuration (const WifiTxVector &txVector)
 
static Time CalculateTxDuration (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 Time CalculateTxDuration (WifiConstPsduMap psduMap, const WifiTxVector &txVector, WifiPhyBand band)
 
static uint32_t GetMaxPsduSize (WifiModulationClass modulation)
 Get the maximum PSDU size in bytes for the given modulation class.
 
static Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId)
 
static Time GetPayloadDuration (uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype=NORMAL_MPDU, uint16_t staId=SU_STA_ID)
 
static Time GetPreambleDetectionDuration ()
 
static Time GetStartOfPacketDuration (const WifiTxVector &txVector)
 
static const Ptr< const PhyEntityGetStaticPhyEntity (WifiModulationClass modulation)
 Get the implemented PHY entity corresponding to the modulation class.
 
static TypeId GetTypeId ()
 Get the type ID.
 
static WifiConstPsduMap GetWifiConstPsduMap (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 Get a WifiConstPsduMap from a PSDU and the TXVECTOR to use to send the PSDU.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::WifiPhy
void AddPhyEntity (WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
 Add the PHY entity to the map of supported PHY entities for the given modulation class for the WifiPhy instance.
 
virtual void DoChannelSwitch ()
 Actually switch channel based on the stored channel settings.
 
void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
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)
 Check if PHY state should move to CCA busy state based on current state of interference tracker.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Attributes

Ptr< YansWifiChannelm_channel
 YansWifiChannel that this YansWifiPhy is connected to.
 

Additional Inherited Members

- Public Types inherited from ns3::WifiPhy
using ChannelTuple = std::tuple< uint8_t, uint16_t, int, uint8_t >
 Tuple identifying 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(* PhyRxPayloadBeginTracedCallback) (WifiTxVector txVector, Time psduDuration)
 TracedCallback signature for start of PSDU reception events.
 
typedef void(* PhyTxBeginTracedCallback) (Ptr< const Packet > packet, double txPowerW)
 TracedCallback signature for Phy transmit events.
 
typedef void(* PsduTxBeginCallback) (WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
 TracedCallback signature for PSDU transmit events.
 
- Protected Attributes inherited from ns3::WifiPhy
Ptr< Eventm_currentEvent
 Hold the current event.
 
std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > m_currentPreambleEvents
 store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is being received
 
EventId m_endPhyRxEvent
 the end of PHY receive event
 
EventId m_endTxEvent
 the end of transmit event
 
Ptr< InterferenceHelperm_interference
 Pointer to a helper responsible for interference computations.
 
std::map< WifiModulationClass, Ptr< PhyEntity > > m_phyEntities
 This map holds the supported PHY entities.
 
uint64_t m_previouslyRxPpduUid
 UID of the previously received PPDU, reset to UINT64_MAX upon transmission.
 
Ptr< UniformRandomVariablem_random
 Provides uniform random variables.
 
uint32_t m_rxMpduReferenceNumber
 A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU.
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper.
 
uint32_t m_txMpduReferenceNumber
 A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU.
 

Detailed Description

802.11 PHY layer model

This PHY implements a model of 802.11a. The model implemented here is based on the model described in "Yet Another Network Simulator" published in WNS2 2006; an author-prepared version of this paper is at: https://hal.inria.fr/file/index/docid/78318/filename/yans-rr.pdf

This PHY model depends on a channel loss and delay model as provided by the ns3::PropagationLossModel and ns3::PropagationDelayModel classes, both of which are members of the ns3::YansWifiChannel class.

Config Paths

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

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy"
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Phys/[i]/$ns3::YansWifiPhy"

No Attributes are defined for this type.

Attributes defined in parent class ns3::WifiPhy

  • Antennas: The number of antennas on the device.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: constructwriteread
  • CcaEdThreshold: The energy of all received signals should be higher than this threshold (dBm) in the primary channel to allow the PHY layer to declare CCA BUSY state.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -62
    • Flags: constructwriteread
  • CcaSensitivity: The energy of a received wifi signal should be higher than this threshold (dBm) in the primary channel to allow the PHY layer to declare CCA BUSY state.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -82
    • Flags: constructwriteread
  • Channel: The channel attached to this PHY
  • ChannelNumber: The channel number of the current operating channel.
  • ChannelSettings: Tuple {channel number, channel width (MHz), PHY band, primary20 index} describing the settings of the operating channel. The primary20 index is the index of the primary 20 MHz channel within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency) and is only valid if the width of the operating channel is a multiple of 20 MHz. If the standard for this object has not been set yet, the value of this attribute is saved and will be used to set the operating channel when the standard is configured. If the PHY band is left unspecified, the default band for the configured standard is used. If the channel width and the channel number are both 0, the default channel width for the configured standard and band are used. If the channel number is 0, the default channel number for the configured standard, band and channel width is used.Note that the channel width can be left unspecified (0) if the channel number uniquely identify a frequency channel for the given standard and band.
    • Set with class: ns3::TupleValue
    • Initial value: {0, 0, BAND_UNSPECIFIED, 0}
    • Flags: constructwrite
  • ChannelSwitchDelay: Delay between two short frames transmitted on different frequencies.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+9.22337e+18ns
    • Initial value: +250000ns
    • Flags: constructwriteread
  • ChannelWidth: The width in MHz of the current operating channel (5, 10, 20, 22, 40, 80 or 160).
  • FixedPhyBand: If set to true, changing PHY band is prohibited after initialization.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
  • FrameCaptureModel: Ptr to an object that implements the frame capture model
  • Frequency: The center frequency (MHz) of the current operating channel.
  • InterferenceHelper: Ptr to an object that implements the interference helper
  • MaxSupportedRxSpatialStreams: The maximum number of supported RX spatial streams.This parameter is only valuable for 802.11n/ac/ax STAs and APs.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: constructwriteread
  • MaxSupportedTxSpatialStreams: The maximum number of supported TX spatial streams.This parameter is only valuable for 802.11n/ac/ax STAs and APs.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:8
    • Initial value: 1
    • Flags: constructwriteread
  • Pifs: The duration of the PCF Interframe Space. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
  • PostReceptionErrorModel: An optional packet error model can be added to the receive packet process after any propagation-based (SNR-based) error models have been applied. Typically this is used to force specific packet drops, for testing purposes.
  • PowerDensityLimit: The mean equivalent isotropically radiated power densitylimit (in dBm/MHz) set by regulators.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 100
    • Flags: constructwriteread
  • PreambleDetectionModel: Ptr to an object that implements the preamble detection model
  • Primary20MHzIndex: The index of the primary 20 MHz channel within the current operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).
  • RxGain: Reception gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: constructwriteread
  • RxNoiseFigure: Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0 (usually 290 K)".
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 7
    • Flags: constructwrite
  • RxSensitivity: The energy of a received signal should be higher than this threshold (dBm) for the PHY to detect the signal. This threshold refers to a width of 20 MHz and will be scaled to match the width of the received signal.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: -101
    • Flags: constructwriteread
  • ShortPlcpPreambleSupported: Whether or not short PHY preamble is supported.This parameter is only valuable for 802.11b STAs and APs.Note: 802.11g APs and STAs always support short PHY preamble.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
  • Sifs: The duration of the Short Interframe Space. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
  • Slot: The duration of a slot. NOTE that the default value is overwritten by the value defined by the standard; if you want to set this attribute, you have to do it after that the PHY object is initialized.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
  • State: The state of the PHY layer.
  • TxGain: Transmission gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: constructwriteread
  • TxPowerEnd: Maximum available transmission level (dBm).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 16.0206
    • Flags: constructwriteread
  • TxPowerLevels: Number of transmission power levels available between TxPowerStart and TxPowerEnd included.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 1
    • Flags: constructwriteread
  • TxPowerStart: Minimum available transmission level (dBm).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 16.0206
    • Flags: constructwriteread

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::WifiPhy

  • MonitorSnifferRx: Trace source simulating a wifi device in monitor mode sniffing all received frames
    Callback signature: ns3::WifiPhy::MonitorSnifferRxTracedCallback
  • MonitorSnifferTx: Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted
    Callback signature: ns3::WifiPhy::MonitorSnifferTxTracedCallback
  • PhyRxBegin: Trace source indicating a packet has begun being received from the channel medium by the device
    Callback signature: ns3::WifiPhy::PhyRxBeginTracedCallback
  • PhyRxDrop: Trace source indicating a packet has been dropped by the device during reception
    Callback signature: ns3::Packet::TracedCallback
  • PhyRxEnd: Trace source indicating a packet has been completely received from the channel medium by the device
    Callback signature: ns3::Packet::TracedCallback
  • PhyRxPayloadBegin: Trace source indicating the reception of the payload of a PPDU has begun
    Callback signature: ns3::WifiPhy::PhyRxPayloadBeginTracedCallback
  • PhyTxBegin: Trace source indicating a packet has begun transmitting over the channel medium
    Callback signature: ns3::WifiPhy::PhyTxBeginTracedCallback
  • PhyTxDrop: Trace source indicating a packet has been dropped by the device during transmission
    Callback signature: ns3::Packet::TracedCallback
  • PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel.
    Callback signature: ns3::Packet::TracedCallback
  • PhyTxPsduBegin: Trace source indicating a PSDU has begun transmitting over the channel medium
    Callback signature: ns3::WifiPhy::PsduTxBeginCallback

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

Definition at line 47 of file yans-wifi-phy.h.

Constructor & Destructor Documentation

◆ YansWifiPhy()

ns3::YansWifiPhy::YansWifiPhy ( )

Definition at line 46 of file yans-wifi-phy.cc.

References NS_LOG_FUNCTION.

◆ ~YansWifiPhy()

ns3::YansWifiPhy::~YansWifiPhy ( )
override

Definition at line 59 of file yans-wifi-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ ConvertIndicesToFrequencies()

WifiSpectrumBandFrequencies ns3::YansWifiPhy::ConvertIndicesToFrequencies ( const WifiSpectrumBandIndices indices) const
overridevirtual

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

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

Implements ns3::WifiPhy.

Definition at line 122 of file yans-wifi-phy.cc.

◆ DoDispose()

void ns3::YansWifiPhy::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

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

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

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

Reimplemented from ns3::WifiPhy.

Definition at line 65 of file yans-wifi-phy.cc.

References ns3::WifiPhy::DoDispose(), m_channel, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetBand()

WifiSpectrumBandInfo ns3::YansWifiPhy::GetBand ( uint16_t  bandWidth,
uint8_t  bandIndex = 0 
)
overridevirtual

Get the info of a given band.

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

Implements ns3::WifiPhy.

Definition at line 110 of file yans-wifi-phy.cc.

◆ GetChannel()

Ptr< Channel > ns3::YansWifiPhy::GetChannel ( ) const
overridevirtual

Return the Channel this WifiPhy is connected to.

Returns
the Channel this WifiPhy is connected to

Implements ns3::WifiPhy.

Definition at line 73 of file yans-wifi-phy.cc.

References m_channel.

◆ GetCurrentFrequencyRange()

FrequencyRange ns3::YansWifiPhy::GetCurrentFrequencyRange ( ) const
overridevirtual

Get the frequency range of the current RF interface.

Returns
the frequency range of the current RF interface

Implements ns3::WifiPhy.

Definition at line 116 of file yans-wifi-phy.cc.

References ns3::WHOLE_WIFI_SPECTRUM.

◆ GetGuardBandwidth()

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

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.

Implements ns3::WifiPhy.

Definition at line 96 of file yans-wifi-phy.cc.

References NS_ABORT_MSG.

◆ GetTxMaskRejectionParams()

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

This method is only relevant for SpectrumWifiPhy.

Implements ns3::WifiPhy.

Definition at line 103 of file yans-wifi-phy.cc.

References NS_ABORT_MSG.

◆ GetTypeId()

TypeId ns3::YansWifiPhy::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 37 of file yans-wifi-phy.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ SetChannel()

void ns3::YansWifiPhy::SetChannel ( const Ptr< YansWifiChannel channel)

Set the YansWifiChannel this YansWifiPhy is to be connected to.

Parameters
channelthe YansWifiChannel this YansWifiPhy is to be connected to

Definition at line 79 of file yans-wifi-phy.cc.

References m_channel, and NS_LOG_FUNCTION.

Referenced by Bug2831TestCase::DoRun().

+ Here is the caller graph for this function:

◆ SetInterferenceHelper()

void ns3::YansWifiPhy::SetInterferenceHelper ( const Ptr< InterferenceHelper helper)
overridevirtual

Sets the interference helper.

Parameters
helperthe interference helper

Reimplemented from ns3::WifiPhy.

Definition at line 52 of file yans-wifi-phy.cc.

References ns3::WifiPhy::m_interference, and ns3::WifiPhy::SetInterferenceHelper().

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), Bug2831TestCase::DoRun(), and HeAggregationTest::DoRunSubTest().

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

◆ StartTx()

void ns3::YansWifiPhy::StartTx ( Ptr< const WifiPpdu ppdu)
overridevirtual
Parameters
ppduthe PPDU to send

Implements ns3::WifiPhy.

Definition at line 87 of file yans-wifi-phy.cc.

References ns3::WifiPhy::GetPowerDbm(), ns3::WifiPhy::GetTxGain(), ns3::WifiPhy::GetTxPowerForTransmission(), m_channel, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_channel

Ptr<YansWifiChannel> ns3::YansWifiPhy::m_channel
private

YansWifiChannel that this YansWifiPhy is connected to.

Definition at line 80 of file yans-wifi-phy.h.

Referenced by DoDispose(), GetChannel(), SetChannel(), and StartTx().


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