A Discrete-Event Network Simulator
API
ns3::SpectrumWifiPhy Class Reference

802.11 PHY layer modelThis PHY implements a spectrum-aware enhancement of the 802.11 SpectrumWifiPhy model. More...

#include "spectrum-wifi-phy.h"

+ Inheritance diagram for ns3::SpectrumWifiPhy:
+ Collaboration diagram for ns3::SpectrumWifiPhy:

Public Types

typedef void(* SignalArrivalCallback) (bool signalType, uint32_t senderNodeId, double rxPower, Time duration)
 Callback invoked when the Phy model starts to process a signal. More...
 
- Public Types inherited from ns3::WifiPhy
typedef std::pair< uint8_t, WifiPhyStandardChannelNumberStandardPair
 A pair of a ChannelNumber and WifiPhyStandard. More...
 
typedef void(* EndOfHePreambleCallback) (HePreambleParameters params)
 TracedCallback signature for end of HE-SIG-A events. More...
 
typedef std::pair< uint16_t, uint16_t > FrequencyWidthPair
 A pair of a center Frequency and a ChannelWidth. More...
 
typedef void(* MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
 TracedCallback signature for monitor mode receive events. More...
 
typedef void(* MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
 TracedCallback signature for monitor mode transmit events. More...
 
typedef void(* PsduTxBeginCallback) (Ptr< const WifiPsdu > psdu, WifiTxVector txVector, double txPowerW)
 TracedCallback signature for PSDU transmit events. More...
 

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

Private Member Functions

Ptr< SpectrumValueGetTxPowerSpectralDensity (uint16_t centerFrequency, uint16_t channelWidth, double txPowerW, WifiModulationClass modulationClass) const
 
void ResetSpectrumModel (void)
 Perform run-time spectrum model change. More...
 

Private Attributes

Ptr< AntennaModelm_antenna
 antenna model More...
 
Ptr< SpectrumChannelm_channel
 SpectrumChannel that this SpectrumWifiPhy is connected to. More...
 
bool m_disableWifiReception
 forces this Phy to fail to sync on any signal More...
 
Ptr< const SpectrumModelm_rxSpectrumModel
 receive spectrum model More...
 
TracedCallback< bool, uint32_t, double, Timem_signalCb
 Signal callback. More...
 
Ptr< WifiSpectrumPhyInterfacem_wifiSpectrumPhyInterface
 Spectrum phy interface. More...
 

Additional Inherited Members

- Protected Attributes inherited from ns3::WifiPhy
EventId m_endPlcpRxEvent
 the end of PLCP receive event More...
 
EventId m_endPreambleDetectionEvent
 the end of preamble detection event More...
 
EventId m_endRxEvent
 the end of receive event More...
 
InterferenceHelper m_interference
 Pointer to InterferenceHelper. More...
 
Ptr< UniformRandomVariablem_random
 Provides uniform random variables. More...
 
uint32_t m_rxMpduReferenceNumber
 A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU. More...
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper. More...
 
uint32_t m_txMpduReferenceNumber
 A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU. More...
 

Detailed Description

802.11 PHY layer model

This PHY implements a spectrum-aware enhancement of the 802.11 SpectrumWifiPhy model.


This PHY model depends on a channel loss and delay model as provided by the ns3::SpectrumPropagationLossModel and ns3::PropagationDelayModel classes.

Config Paths

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

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

Attributes

  • DisableWifiReception: Prevent Wi-Fi frame sync from ever happening
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

Attributes defined in parent class ns3::WifiPhy

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

TraceSources

TraceSources defined in parent class ns3::WifiPhy

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

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

Definition at line 51 of file spectrum-wifi-phy.h.

Member Typedef Documentation

◆ SignalArrivalCallback

typedef void(* ns3::SpectrumWifiPhy::SignalArrivalCallback) (bool signalType, uint32_t senderNodeId, double rxPower, Time duration)

Callback invoked when the Phy model starts to process a signal.

Parameters
signalTypeWhether signal is WiFi (true) or foreign (false)
senderNodeIdNode Id of the sender of the signal
rxPowerreceived signal power (dBm)
durationSignal duration

Definition at line 151 of file spectrum-wifi-phy.h.

Constructor & Destructor Documentation

◆ SpectrumWifiPhy()

ns3::SpectrumWifiPhy::SpectrumWifiPhy ( )

Definition at line 63 of file spectrum-wifi-phy.cc.

References NS_LOG_FUNCTION.

◆ ~SpectrumWifiPhy()

ns3::SpectrumWifiPhy::~SpectrumWifiPhy ( )
virtual

Definition at line 68 of file spectrum-wifi-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ ConfigureStandard()

void ns3::SpectrumWifiPhy::ConfigureStandard ( WifiPhyStandard  standard)
virtual

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

Parameters
standardthe Wi-Fi standard

Reimplemented from ns3::WifiPhy.

Definition at line 182 of file spectrum-wifi-phy.cc.

References ns3::WifiPhy::ConfigureStandard(), ns3::Object::IsInitialized(), NS_LOG_FUNCTION, and ResetSpectrumModel().

Referenced by SpectrumWifiPhyBasicTest::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), WifiPhyThresholdsTest::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), and TestAmpduReception::DoSetup().

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

◆ CreateWifiSpectrumPhyInterface()

void ns3::SpectrumWifiPhy::CreateWifiSpectrumPhyInterface ( Ptr< NetDevice device)

Method to encapsulate the creation of the WifiSpectrumPhyInterface object (used to bind the WifiSpectrumPhy to a SpectrumChannel) and to link it to this SpectrumWifiPhy instance.

Parameters
devicepointer to the NetDevice object including this new object

Definition at line 262 of file spectrum-wifi-phy.cc.

References m_wifiSpectrumPhyInterface, and NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::SpectrumWifiPhy::DoDispose ( void  )
protectedvirtual

Destructor implementation.

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

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

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

Reimplemented from ns3::WifiPhy.

Definition at line 74 of file spectrum-wifi-phy.cc.

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

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::SpectrumWifiPhy::DoInitialize ( void  )
protectedvirtual

Initialize() implementation.

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

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

Reimplemented from ns3::WifiPhy.

Definition at line 83 of file spectrum-wifi-phy.cc.

References ns3::WifiPhy::DoInitialize(), m_channel, m_wifiSpectrumPhyInterface, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetBandBandwidth()

◆ GetCenterFrequencyForChannelWidth()

uint16_t ns3::SpectrumWifiPhy::GetCenterFrequencyForChannelWidth ( WifiTxVector  txVector) const

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

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

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

Definition at line 301 of file spectrum-wifi-phy.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiPhy::GetChannelWidth(), ns3::WifiPhy::GetFrequency(), and NS_LOG_FUNCTION.

Referenced by StartTx().

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

◆ GetChannel()

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

Return the Channel this WifiPhy is connected to.

Returns
the Channel this WifiPhy is connected to

Implements ns3::WifiPhy.

Definition at line 124 of file spectrum-wifi-phy.cc.

References m_channel.

◆ GetGuardBandwidth()

uint16_t ns3::SpectrumWifiPhy::GetGuardBandwidth ( uint16_t  currentChannelWidth) const
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).

Definition at line 373 of file spectrum-wifi-phy.cc.

Referenced by GetRxSpectrumModel(), GetTxPowerSpectralDensity(), ResetSpectrumModel(), and StartRx().

+ Here is the caller graph for this function:

◆ GetRxAntenna()

Ptr< AntennaModel > ns3::SpectrumWifiPhy::GetRxAntenna ( void  ) const

Get the antenna model used for reception.

Returns
the AntennaModel used for reception

Definition at line 249 of file spectrum-wifi-phy.cc.

References m_antenna.

Referenced by ns3::WifiSpectrumPhyInterface::GetRxAntenna().

+ Here is the caller graph for this function:

◆ GetRxSpectrumModel()

Ptr< const SpectrumModel > ns3::SpectrumWifiPhy::GetRxSpectrumModel ( void  ) const
Returns
returns the SpectrumModel that this SpectrumPhy expects to be used for all SpectrumValues that are passed to StartRx. If 0 is returned, it means that any model will be accepted.

Definition at line 99 of file spectrum-wifi-phy.cc.

References GetBandBandwidth(), ns3::WifiPhy::GetChannelWidth(), ns3::WifiPhy::GetFrequency(), GetGuardBandwidth(), ns3::WifiSpectrumValueHelper::GetSpectrumModel(), m_rxSpectrumModel, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::WifiSpectrumPhyInterface::GetRxSpectrumModel().

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

◆ GetTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::SpectrumWifiPhy::GetTxPowerSpectralDensity ( uint16_t  centerFrequency,
uint16_t  channelWidth,
double  txPowerW,
WifiModulationClass  modulationClass 
) const
private
Parameters
centerFrequencycenter frequency (MHz)
channelWidthchannel width (MHz) of the channel for the current transmission
txPowerWpower in W to spread across the bands
modulationClassthe modulation class
Returns
Ptr to SpectrumValue

This is a helper function to create the right Tx PSD corresponding to the standard in use.

Definition at line 271 of file spectrum-wifi-phy.cc.

References ns3::WifiSpectrumValueHelper::CreateDsssTxPowerSpectralDensity(), ns3::WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity(), ns3::WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity(), ns3::WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity(), GetGuardBandwidth(), NS_ABORT_MSG_IF, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::WIFI_MOD_CLASS_DSSS, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by StartTx().

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

◆ GetTypeId()

TypeId ns3::SpectrumWifiPhy::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 45 of file spectrum-wifi-phy.cc.

References m_disableWifiReception, m_signalCb, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ ResetSpectrumModel()

void ns3::SpectrumWifiPhy::ResetSpectrumModel ( void  )
private

◆ SetAntenna()

void ns3::SpectrumWifiPhy::SetAntenna ( const Ptr< AntennaModel antenna)
Parameters
antennaan AntennaModel to include in the transmitted SpectrumSignalParameters (in case any objects downstream of the SpectrumWifiPhy wish to adjust signal properties based on the transmitted antenna model. This antenna is also used when the underlying WifiSpectrumPhyInterface::GetRxAntenna() method is called.

Note: this method may be split into separate SetTx and SetRx methods in the future if the modelling need for this arises

Definition at line 255 of file spectrum-wifi-phy.cc.

References m_antenna, and NS_LOG_FUNCTION.

◆ SetChannel()

void ns3::SpectrumWifiPhy::SetChannel ( const Ptr< SpectrumChannel channel)

Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.

Parameters
channelthe SpectrumChannel this SpectrumWifiPhy is to be connected to

Definition at line 130 of file spectrum-wifi-phy.cc.

References third::channel, and m_channel.

◆ SetChannelNumber()

void ns3::SpectrumWifiPhy::SetChannelNumber ( uint8_t  id)
virtual

Set channel number.

Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)

where Starting channel frequency is standard-dependent, as defined in (Section 18.3.8.4.2 "Channel numbering"; IEEE Std 802.11-2012). This method may fail to take action if the Phy model determines that the channel number cannot be switched for some reason (e.g. sleep state)

Parameters
idthe channel number

Reimplemented from ns3::WifiPhy.

Definition at line 149 of file spectrum-wifi-phy.cc.

References ns3::Object::IsInitialized(), NS_LOG_FUNCTION, ResetSpectrumModel(), and ns3::WifiPhy::SetChannelNumber().

Referenced by SpectrumWifiPhyBasicTest::DoSetup(), TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup(), WifiPhyThresholdsTest::DoSetup(), TestThresholdPreambleDetectionWithFrameCapture::DoSetup(), TestSimpleFrameCaptureModel::DoSetup(), TestPhyHeadersReception::DoSetup(), and TestAmpduReception::DoSetup().

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

◆ SetChannelWidth()

void ns3::SpectrumWifiPhy::SetChannelWidth ( uint16_t  channelwidth)
virtual
Parameters
channelwidthchannel width

Reimplemented from ns3::WifiPhy.

Definition at line 171 of file spectrum-wifi-phy.cc.

References ns3::Object::IsInitialized(), NS_LOG_FUNCTION, ResetSpectrumModel(), and ns3::WifiPhy::SetChannelWidth().

+ Here is the call graph for this function:

◆ SetFrequency()

void ns3::SpectrumWifiPhy::SetFrequency ( uint16_t  freq)
virtual

◆ StartRx()

◆ StartTx()

Member Data Documentation

◆ m_antenna

Ptr<AntennaModel> ns3::SpectrumWifiPhy::m_antenna
private

antenna model

Definition at line 193 of file spectrum-wifi-phy.h.

Referenced by GetRxAntenna(), SetAntenna(), and StartTx().

◆ m_channel

Ptr<SpectrumChannel> ns3::SpectrumWifiPhy::m_channel
private

SpectrumChannel that this SpectrumWifiPhy is connected to.

Definition at line 190 of file spectrum-wifi-phy.h.

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

◆ m_disableWifiReception

bool ns3::SpectrumWifiPhy::m_disableWifiReception
private

forces this Phy to fail to sync on any signal

Definition at line 195 of file spectrum-wifi-phy.h.

Referenced by GetTypeId(), and StartRx().

◆ m_rxSpectrumModel

Ptr<const SpectrumModel> ns3::SpectrumWifiPhy::m_rxSpectrumModel
mutableprivate

receive spectrum model

Definition at line 194 of file spectrum-wifi-phy.h.

Referenced by GetRxSpectrumModel(), and ResetSpectrumModel().

◆ m_signalCb

TracedCallback<bool, uint32_t, double, Time> ns3::SpectrumWifiPhy::m_signalCb
private

Signal callback.

Definition at line 196 of file spectrum-wifi-phy.h.

Referenced by GetTypeId(), and StartRx().

◆ m_wifiSpectrumPhyInterface

Ptr<WifiSpectrumPhyInterface> ns3::SpectrumWifiPhy::m_wifiSpectrumPhyInterface
private

Spectrum phy interface.

Definition at line 192 of file spectrum-wifi-phy.h.

Referenced by CreateWifiSpectrumPhyInterface(), DoDispose(), DoInitialize(), ResetSpectrumModel(), and StartTx().


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