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

802.11 PHY layer modelThis PHY implements a model of 802.11a. More...

#include "yans-wifi-phy.h"

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

Public Member Functions

 YansWifiPhy ()
 
virtual ~YansWifiPhy ()
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual double CalculateSnr (WifiMode txMode, double ber) const
 
virtual void ConfigureStandard (enum WifiPhyStandard standard)
 Configure the PHY-level parameters for different Wi-Fi standard. More...
 
virtual uint32_t GetBssMembershipSelector (uint32_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 GetCcaMode1Threshold (void) const
 Return the CCA threshold (dBm). More...
 
virtual Ptr< WifiChannelGetChannel (void) const
 Return the WifiChannel this WifiPhy is connected to. More...
 
double GetChannelFrequencyMhz () const
 Return current center channel frequency in MHz. More...
 
uint16_t GetChannelNumber (void) const
 Return the current channel number. More...
 
Time GetChannelSwitchDelay (void) const
 
virtual uint32_t GetChannelWidth (void) const
 Return channel width. More...
 
virtual Time GetDelayUntilIdle (void)
 
Ptr< NetDeviceGetDevice (void) const
 Return the device this PHY is associated with. More...
 
double GetEdThreshold (void) const
 Return the energy detection threshold (dBm). More...
 
Ptr< ErrorRateModelGetErrorRateModel (void) const
 Return the error rate model this PHY is using. More...
 
virtual uint32_t GetFrequency (void) const
 
virtual bool GetGreenfield (void) const
 Return whether Greenfield is supported. More...
 
virtual bool GetGuardInterval (void) const
 Return whether guard interval is being used. More...
 
virtual Time GetLastRxStartTime (void) const
 Return the start time of the last received packet. More...
 
virtual bool GetLdpc (void) const
 Return if LDPC is supported. More...
 
virtual 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...
 
virtual WifiModeList GetMembershipSelectorModes (uint32_t selector)
 The WifiPhy::GetMembershipSelectorModes() 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...
 
Ptr< MobilityModelGetMobility (void)
 Return the mobility model this PHY is associated with. More...
 
virtual WifiMode GetMode (uint32_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...
 
virtual uint32_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...
 
virtual uint8_t GetNMcs (void) const
 
virtual uint32_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...
 
virtual uint32_t GetNTxPower (void) const
 Return the number of available transmission power levels. More...
 
virtual uint32_t GetNumberOfReceiveAntennas (void) const
 
virtual uint32_t GetNumberOfTransmitAntennas (void) const
 
double GetRxGain (void) const
 Return the reception gain (dB). More...
 
double GetRxNoiseFigure (void) const
 Return the RX noise figure (dBm). More...
 
virtual Time GetStateDuration (void)
 
virtual bool GetStbc (void) const
 Return whether STBC is supported. More...
 
double GetTxGain (void) const
 Return the transmission gain (dB). More...
 
virtual double GetTxPowerEnd (void) const
 Return the maximum available transmission power level (dBm). More...
 
virtual double GetTxPowerStart (void) const
 Return the minimum available transmission power level (dBm). More...
 
virtual bool IsMcsSupported (WifiMode mcs)
 
virtual bool IsModeSupported (WifiMode mode) const
 Check if the given WifiMode is supported by the PHY. More...
 
virtual bool IsStateBusy (void)
 
virtual bool IsStateCcaBusy (void)
 
virtual bool IsStateIdle (void)
 
virtual bool IsStateRx (void)
 
virtual bool IsStateSleep (void)
 
virtual bool IsStateSwitching (void)
 
virtual bool IsStateTx (void)
 
virtual void RegisterListener (WifiPhyListener *listener)
 
virtual void ResumeFromSleep (void)
 Resume from sleep mode. More...
 
virtual void SendPacket (Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble, uint8_t packetType, uint32_t mpduReferenceNumber)
 
void SetCcaMode1Threshold (double threshold)
 Sets the CCA threshold (dBm). More...
 
void SetChannel (Ptr< YansWifiChannel > channel)
 Set the YansWifiChannel this YansWifiPhy is to be connected to. More...
 
void SetChannelNumber (uint16_t id)
 Set the current channel number. More...
 
virtual void SetChannelWidth (uint32_t channelwidth)
 Set channel width. More...
 
void SetDevice (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 (Ptr< ErrorRateModel > rate)
 Sets the error rate model. More...
 
virtual void SetFrequency (uint32_t freq)
 
virtual void SetGreenfield (bool greenfield)
 Enable or disable Greenfield support. More...
 
virtual void SetGuardInterval (bool guardInterval)
 Enable or disable short/long guard interval. More...
 
virtual void SetLdpc (bool ldpc)
 Enable or disable LDPC. More...
 
void SetMobility (Ptr< MobilityModel > mobility)
 assign a mobility model to this device More...
 
void SetNTxPower (uint32_t n)
 Sets the number of transmission power levels available between the minimum level and the maximum level. More...
 
virtual void SetNumberOfReceiveAntennas (uint32_t rx)
 
virtual void SetNumberOfTransmitAntennas (uint32_t tx)
 
virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback)
 
virtual void SetReceiveOkCallback (WifiPhy::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...
 
virtual void SetSleepMode (void)
 Put in sleep mode. More...
 
virtual void SetStbc (bool stbc)
 Enable or disable STBC. 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 StartReceivePacket (Ptr< Packet > packet, WifiTxVector txVector, WifiPreamble preamble, struct mpduInfo aMpdu, Ptr< InterferenceHelper::Event > event)
 Starting receiving the payload of a packet (i.e. More...
 
void StartReceivePreambleAndHeader (Ptr< Packet > packet, double rxPowerDbm, WifiTxVector txVector, WifiPreamble preamble, struct mpduInfo aMpdu, Time rxDuration)
 Starting receiving the plcp of a packet (i.e. More...
 
virtual void UnregisterListener (WifiPhyListener *listener)
 
- Public Member Functions inherited from ns3::WifiPhy
 WifiPhy ()
 
virtual ~WifiPhy ()
 
Time CalculatePlcpPreambleAndHeaderDuration (WifiTxVector txVector, enum WifiPreamble preamble)
 
Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag)
 
Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag)
 
void NotifyMonitorSniffRx (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
 Public method used to fire a MonitorSniffer trace for a wifi packet being received. More...
 
void NotifyMonitorSniffTx (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu)
 Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. More...
 
void NotifyRxBegin (Ptr< const Packet > packet)
 Public method used to fire a PhyRxBegin trace. More...
 
void NotifyRxDrop (Ptr< const Packet > packet)
 Public method used to fire a PhyRxDrop trace. More...
 
void NotifyRxEnd (Ptr< const Packet > packet)
 Public method used to fire a PhyRxEnd trace. More...
 
void NotifyTxBegin (Ptr< const Packet > packet)
 Public method used to fire a PhyTxBegin trace. More...
 
void NotifyTxDrop (Ptr< const Packet > packet)
 Public method used to fire a PhyTxDrop trace. More...
 
void NotifyTxEnd (Ptr< const Packet > packet)
 Public method used to fire a PhyTxEnd trace. More...
 
- 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
 Implement the GetInstanceTypeId method defined in ObjectBase. 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...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 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. 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)
 
- Static Public Member Functions inherited from ns3::WifiPhy
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 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 (WifiMode payloadMode)
 
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 GetPlcpHeaderDuration (WifiTxVector txVector, WifiPreamble preamble)
 
static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txVector)
 
static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble)
 
static Time GetPlcpHtTrainingSymbolDuration (WifiPreamble preamble, WifiTxVector txVector)
 
static Time GetPlcpPreambleDuration (WifiTxVector txVector, WifiPreamble preamble)
 
static Time GetPlcpVhtSigA1Duration (WifiPreamble preamble)
 
static Time GetPlcpVhtSigA2Duration (WifiPreamble preamble)
 
static Time GetPlcpVhtSigBDuration (WifiPreamble preamble)
 
static TypeId GetTypeId (void)
 
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 (WifiMode payloadMode)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

void Configure80211_10Mhz (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10MHz channel spacing. More...
 
void Configure80211_5Mhz ()
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5MHz channel spacing. More...
 
void Configure80211a (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11a standard. More...
 
void Configure80211ac (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11ac standard. More...
 
void Configure80211b (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11b standard. More...
 
void Configure80211g (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11g standard. More...
 
void Configure80211n (void)
 Configure YansWifiPhy with appropriate channel frequency and supported rates for 802.11n standard. More...
 
void ConfigureHolland (void)
 
double DbmToW (double dbm) const
 Convert from dBm to Watts. More...
 
double DbToRatio (double db) const
 Convert from dB to ratio. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
void EndReceive (Ptr< Packet > packet, enum WifiPreamble preamble, struct mpduInfo aMpdu, Ptr< InterferenceHelper::Event > event)
 The last bit of the packet has arrived. More...
 
double GetEdThresholdW (void) const
 Return the energy detection threshold. More...
 
double GetPowerDbm (uint8_t power) const
 Get the power of the given power level in dBm. More...
 
double RatioToDb (double ratio) const
 Convert from ratio to dB. More...
 
double WToDbm (double w) const
 Convert from Watts to dBm. More...
 

Private Attributes

std::vector< uint32_t > m_bssMembershipSelectorSet
 
double m_ccaMode1ThresholdW
 Clear channel assessment (CCA) threshold in watts. More...
 
Ptr< YansWifiChannelm_channel
 YansWifiChannel that this YansWifiPhy is connected to. More...
 
uint16_t m_channelNumber
 Operating channel number. More...
 
double m_channelStartingFrequency
 Standard-dependent center frequency of 0-th channel in MHz. More...
 
Time m_channelSwitchDelay
 Time required to switch between channel. More...
 
uint32_t m_channelWidth
 Channel width. More...
 
Ptr< NetDevicem_device
 Pointer to the device. More...
 
WifiModeList m_deviceMcsSet
 
WifiModeList m_deviceRateSet
 This vector holds the set of transmission modes that this WifiPhy(-derived class) can support. More...
 
double m_edThresholdW
 Energy detection threshold in watts. More...
 
EventId m_endPlcpRxEvent
 
EventId m_endRxEvent
 
bool m_greenfield
 Flag if GreenField format is supported. More...
 
bool m_guardInterval
 Flag if short guard interval is used. More...
 
bool m_initialized
 Flag for runtime initialization. More...
 
InterferenceHelper m_interference
 Pointer to InterferenceHelper. More...
 
bool m_ldpc
 Flag if LDPC is used. More...
 
Ptr< MobilityModelm_mobility
 Pointer to the mobility model. More...
 
uint16_t m_mpdusNum
 carries the number of expected mpdus that are part of an A-MPDU More...
 
uint32_t m_nTxPower
 Number of available transmission power levels. More...
 
uint32_t m_numberOfReceivers
 Number of receivers. More...
 
uint32_t m_numberOfTransmitters
 Number of transmitters. More...
 
bool m_plcpSuccess
 Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received. More...
 
Ptr< UniformRandomVariablem_random
 Provides uniform random variables. More...
 
double m_rxGainDb
 Reception gain (dB) More...
 
Ptr< WifiPhyStateHelperm_state
 Pointer to WifiPhyStateHelper. More...
 
bool m_stbc
 Flag if STBC is used. More...
 
double m_txGainDb
 Transmission gain (dB) More...
 
double m_txPowerBaseDbm
 Minimum transmission power (dBm) More...
 
double m_txPowerEndDbm
 Maximum transmission power (dBm) More...
 

Additional Inherited Members

- Public Types inherited from ns3::WifiPhy
typedef void(* MonitorSnifferRxCallback) (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
 TracedCallback signature for monitor mode receive events. More...
 
typedef void(* MonitorSnifferTxCallback) (const Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu)
 TracedCallback signature for monitor mode transmit events. More...
 
typedef Callback< void, Ptr< const Packet >, double > RxErrorCallback
 arg1: packet received unsuccessfully arg2: snr of packet More...
 
typedef Callback< void, Ptr< Packet >, double, WifiTxVector, enum WifiPreambleRxOkCallback
 arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preamble used for packet. More...
 
enum  State {
  IDLE, CCA_BUSY, TX, RX,
  SWITCHING, SLEEP
}
 The state of the PHY layer. 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...
 

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", (http://cutebugs.net/files/wns2-yans.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::WaveNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy"

Attributes

  • 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: -96
    • Flags: construct write read
  • CcaMode1Threshold: The energy of a received signal should be higher than this threshold (dbm) 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: -99
    • Flags: construct write read
  • TxGain: Transmission gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: construct write read
  • RxGain: Reception gain (dB).
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: construct write read
  • TxPowerLevels: Number of transmission power levels available between TxPowerStart and TxPowerEnd included.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • 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 read
  • 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
  • ChannelNumber: Channel center frequency = Channel starting frequency + 5 MHz * nch.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 1
    • Flags: construct write read
  • Frequency: The operating frequency.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 2407
    • Flags: construct write read
  • Transmitters: The number of transmitters.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 1
    • Flags: construct write read
  • Receivers: The number of receivers.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 1
    • Flags: construct write read
  • ShortGuardEnabled: Whether or not short guard interval is enabled.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • LdpcEnabled: Whether or not LDPC is enabled.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • STBCEnabled: Whether or not STBC is enabled.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • GreenfieldEnabled: Whether or not Greenfield is enabled.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • ChannelWidth: Whether 5MHz, 10MHz, 20MHz, 22MHz, 40MHz, 80 MHz or 160 MHz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 20
    • Flags: construct write read

No TraceSources are defined for this type.

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
  • PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) 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

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

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

Constructor & Destructor Documentation

ns3::YansWifiPhy::YansWifiPhy ( )

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

References m_random, m_state, and NS_LOG_FUNCTION.

ns3::YansWifiPhy::~YansWifiPhy ( )
virtual

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

References NS_LOG_FUNCTION.

Member Function Documentation

int64_t ns3::YansWifiPhy::AssignStreams ( int64_t  stream)
virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implements ns3::WifiPhy.

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

References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

double ns3::YansWifiPhy::CalculateSnr ( WifiMode  txMode,
double  ber 
) const
virtual
Parameters
txModethe transmission mode
berthe probability of bit error rate
Returns
the minimum snr which is required to achieve the requested ber for the specified transmission mode. (W/W)

Implements ns3::WifiPhy.

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

References ns3::InterferenceHelper::GetErrorRateModel(), and m_interference.

+ Here is the call graph for this function:

void ns3::YansWifiPhy::Configure80211_10Mhz ( void  )
private
void ns3::YansWifiPhy::Configure80211_5Mhz ( void  )
private
void ns3::YansWifiPhy::Configure80211a ( void  )
private

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

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

References ns3::WifiPhy::GetOfdmRate12Mbps(), ns3::WifiPhy::GetOfdmRate18Mbps(), ns3::WifiPhy::GetOfdmRate24Mbps(), ns3::WifiPhy::GetOfdmRate36Mbps(), ns3::WifiPhy::GetOfdmRate48Mbps(), ns3::WifiPhy::GetOfdmRate54Mbps(), ns3::WifiPhy::GetOfdmRate6Mbps(), ns3::WifiPhy::GetOfdmRate9Mbps(), m_channelStartingFrequency, m_deviceRateSet, NS_LOG_FUNCTION, and SetChannelWidth().

Referenced by ConfigureStandard().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::Configure80211b ( void  )
private

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

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

References ns3::WifiPhy::GetDsssRate11Mbps(), ns3::WifiPhy::GetDsssRate1Mbps(), ns3::WifiPhy::GetDsssRate2Mbps(), ns3::WifiPhy::GetDsssRate5_5Mbps(), m_channelStartingFrequency, m_deviceRateSet, NS_LOG_FUNCTION, and SetChannelWidth().

Referenced by ConfigureStandard().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::ConfigureHolland ( void  )
private
double ns3::YansWifiPhy::DbmToW ( double  dbm) const
private

Convert from dBm to Watts.

Parameters
dbmthe power in dBm
Returns
the equivalent Watts for the given dBm

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

Referenced by SetCcaMode1Threshold(), SetEdThreshold(), and StartReceivePreambleAndHeader().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::DbToRatio ( double  db) const
private

Convert from dB to ratio.

Parameters
db
Returns
ratio

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

Referenced by SetRxNoiseFigure().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::DoDispose ( void  )
privatevirtual

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 overriden 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.

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

References m_channel, m_device, m_deviceMcsSet, m_deviceRateSet, m_mobility, m_state, and NS_LOG_FUNCTION.

void ns3::YansWifiPhy::DoInitialize ( void  )
privatevirtual

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 212 of file yans-wifi-phy.cc.

References m_initialized, and NS_LOG_FUNCTION.

void ns3::YansWifiPhy::EndReceive ( Ptr< Packet packet,
enum WifiPreamble  preamble,
struct mpduInfo  aMpdu,
Ptr< InterferenceHelper::Event event 
)
private

The last bit of the packet has arrived.

Parameters
packetthe packet that the last bit has arrived
preamblethe preamble of the arriving packet
aMpduthe type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)
eventthe corresponding event of the first time the packet arrives

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

References ns3::InterferenceHelper::CalculatePlcpPayloadSnrPer(), GetChannelFrequencyMhz(), GetChannelNumber(), GetRxNoiseFigure(), ns3::Packet::GetSize(), ns3::UniformRandomVariable::GetValue(), IsStateRx(), m_interference, m_plcpSuccess, m_random, m_state, ns3::signalNoiseDbm::noise, ns3::WifiPhy::NotifyMonitorSniffRx(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyRxEnd(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::mpduInfo::packetType, RatioToDb(), ns3::signalNoiseDbm::signal, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, and ns3::WIFI_PREAMBLE_NONE.

Referenced by StartReceivePreambleAndHeader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::YansWifiPhy::GetBssMembershipSelector ( uint32_t  selector) const
virtual

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.

Parameters
selectorindex in array of supported memberships
Returns
the memebership selector whose index is specified.

Implements ns3::WifiPhy.

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

References m_bssMembershipSelectorSet.

Referenced by GetMembershipSelectorModes().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetCcaMode1Threshold ( void  ) const

Return the CCA threshold (dBm).

Returns
the CCA threshold in dBm

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

References m_ccaMode1ThresholdW, and WToDbm().

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< WifiChannel > ns3::YansWifiPhy::GetChannel ( void  ) const
virtual

Return the WifiChannel this WifiPhy is connected to.

Returns
the WifiChannel this WifiPhy is connected to

Implements ns3::WifiPhy.

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

References m_channel.

double ns3::YansWifiPhy::GetChannelFrequencyMhz ( ) const

Return current center channel frequency in MHz.

Returns
the current center channel frequency in MHz

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

References GetChannelNumber(), and m_channelStartingFrequency.

Referenced by EndReceive(), and SendPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint16_t ns3::YansWifiPhy::GetChannelNumber ( void  ) const
virtual

Return the current channel number.

Returns
the current channel number

Implements ns3::WifiPhy.

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

References m_channelNumber.

Referenced by EndReceive(), GetChannelFrequencyMhz(), ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), GetTypeId(), ns3::YansWifiChannel::Send(), and SendPacket().

+ Here is the caller graph for this function:

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

Implements ns3::WifiPhy.

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

References m_channelSwitchDelay.

uint32_t ns3::YansWifiPhy::GetChannelWidth ( void  ) const
virtual

Return channel width.

Returns
channel width

Implements ns3::WifiPhy.

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

References m_channelWidth.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Time ns3::YansWifiPhy::GetDelayUntilIdle ( void  )
virtual
Returns
the predicted delay until this PHY can become WifiPhy::IDLE.

The PHY will never become WifiPhy::IDLE before the delay returned by this method but it could become really idle later.

Implements ns3::WifiPhy.

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

References m_state.

Referenced by SetChannelNumber(), and SetSleepMode().

+ Here is the caller graph for this function:

Ptr< NetDevice > ns3::YansWifiPhy::GetDevice ( void  ) const

Return the device this PHY is associated with.

Returns
the device this PHY is associated with

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

References m_device.

double ns3::YansWifiPhy::GetEdThreshold ( void  ) const

Return the energy detection threshold (dBm).

Returns
the energy detection threshold in dBm

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

References m_edThresholdW, and WToDbm().

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetEdThresholdW ( void  ) const
private

Return the energy detection threshold.

Returns
the energy detection threshold.

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

References m_edThresholdW.

Ptr< ErrorRateModel > ns3::YansWifiPhy::GetErrorRateModel ( void  ) const

Return the error rate model this PHY is using.

Returns
the error rate model this PHY is using

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

References ns3::InterferenceHelper::GetErrorRateModel(), and m_interference.

+ Here is the call graph for this function:

uint32_t ns3::YansWifiPhy::GetFrequency ( void  ) const
virtual
Returns
the operating frequency on this node

Implements ns3::WifiPhy.

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

References m_channelStartingFrequency.

Referenced by GetTypeId(), and SendPacket().

+ Here is the caller graph for this function:

bool ns3::YansWifiPhy::GetGreenfield ( void  ) const
virtual

Return whether Greenfield is supported.

Returns
true if Greenfield is supported, false otherwise

Implements ns3::WifiPhy.

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

References m_greenfield.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

bool ns3::YansWifiPhy::GetGuardInterval ( void  ) const
virtual

Return whether guard interval is being used.

Returns
true if guard interval is being used, false otherwise

Implements ns3::WifiPhy.

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

References m_guardInterval.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Time ns3::YansWifiPhy::GetLastRxStartTime ( void  ) const
virtual

Return the start time of the last received packet.

Returns
the start time of the last received packet

Implements ns3::WifiPhy.

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

References m_state.

bool ns3::YansWifiPhy::GetLdpc ( void  ) const
virtual

Return if LDPC is supported.

Returns
true if LDPC is supported, false otherwise

Implements ns3::WifiPhy.

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

References m_ldpc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

WifiMode ns3::YansWifiPhy::GetMcs ( uint8_t  mcs) const
virtual

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.

Parameters
mcsindex in array of supported MCS
Returns
the MCS index whose index is specified.

Implements ns3::WifiPhy.

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

References m_deviceMcsSet.

Referenced by IsMcsSupported().

+ Here is the caller graph for this function:

WifiModeList ns3::YansWifiPhy::GetMembershipSelectorModes ( uint32_t  selector)
virtual

The WifiPhy::GetMembershipSelectorModes() 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.

Parameters
selectorindex in array of supported memberships
Returns
a WifiModeList that contains the WifiModes associrated with the selected index.
See also
WifiPhy::GetMembershipSelectorModes()

Implements ns3::WifiPhy.

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

References GetBssMembershipSelector(), ns3::WifiPhy::GetHtMcs0(), ns3::WifiPhy::GetHtMcs1(), ns3::WifiPhy::GetHtMcs2(), ns3::WifiPhy::GetHtMcs3(), ns3::WifiPhy::GetHtMcs4(), ns3::WifiPhy::GetHtMcs5(), ns3::WifiPhy::GetHtMcs6(), ns3::WifiPhy::GetHtMcs7(), ns3::WifiPhy::GetVhtMcs0(), ns3::WifiPhy::GetVhtMcs1(), ns3::WifiPhy::GetVhtMcs2(), ns3::WifiPhy::GetVhtMcs3(), ns3::WifiPhy::GetVhtMcs4(), ns3::WifiPhy::GetVhtMcs5(), ns3::WifiPhy::GetVhtMcs6(), ns3::WifiPhy::GetVhtMcs7(), ns3::WifiPhy::GetVhtMcs8(), ns3::WifiPhy::GetVhtMcs9(), HT_PHY, and VHT_PHY.

+ Here is the call graph for this function:

Ptr< MobilityModel > ns3::YansWifiPhy::GetMobility ( void  )

Return the mobility model this PHY is associated with.

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

Returns
the mobility model this PHY is associated with

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

References m_device, and m_mobility.

Referenced by ns3::YansWifiChannel::Send().

+ Here is the caller graph for this function:

WifiMode ns3::YansWifiPhy::GetMode ( uint32_t  mode) const
virtual

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.

It is important to note that the DeviceRateSet 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.

Parameters
modeindex in array of supported modes
Returns
the mode whose index is specified.
See also
WifiPhy::GetNModes()

Implements ns3::WifiPhy.

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

References m_deviceRateSet.

Referenced by IsModeSupported().

+ Here is the caller graph for this function:

uint32_t ns3::YansWifiPhy::GetNBssMembershipSelectors ( void  ) const
virtual

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.

Returns
the memebership selector whose index is specified.

Implements ns3::WifiPhy.

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

References m_bssMembershipSelectorSet.

uint8_t ns3::YansWifiPhy::GetNMcs ( void  ) const
virtual
Returns
the number of MCS supported by this phy

Implements ns3::WifiPhy.

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

References m_deviceMcsSet.

Referenced by IsMcsSupported().

+ Here is the caller graph for this function:

uint32_t ns3::YansWifiPhy::GetNModes ( void  ) const
virtual

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.

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

Returns
the number of transmission modes supported by this PHY.
See also
WifiPhy::GetMode()

Implements ns3::WifiPhy.

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

References m_deviceRateSet.

Referenced by IsModeSupported().

+ Here is the caller graph for this function:

uint32_t ns3::YansWifiPhy::GetNTxPower ( void  ) const
virtual

Return the number of available transmission power levels.

Returns
the number of available transmission power levels

Implements ns3::WifiPhy.

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

References m_nTxPower.

uint32_t ns3::YansWifiPhy::GetNumberOfReceiveAntennas ( void  ) const
virtual
Returns
the number of receivers on this node.

Implements ns3::WifiPhy.

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

References m_numberOfReceivers.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

uint32_t ns3::YansWifiPhy::GetNumberOfTransmitAntennas ( void  ) const
virtual
Returns
the number of transmitters on this node.

Implements ns3::WifiPhy.

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

References m_numberOfTransmitters.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetPowerDbm ( uint8_t  power) const
private

Get the power of the given power level in dBm.

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

Parameters
powerthe power level
Returns
the transmission power in dBm at the given power level

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

References m_nTxPower, m_txPowerBaseDbm, m_txPowerEndDbm, NS_ASSERT, and NS_ASSERT_MSG.

Referenced by SendPacket().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetRxGain ( void  ) const

Return the reception gain (dB).

Returns
the reception gain in dB

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

References m_rxGainDb.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetRxNoiseFigure ( void  ) const

Return the RX noise figure (dBm).

Returns
the RX noise figure in dBm

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

References ns3::InterferenceHelper::GetNoiseFigure(), m_interference, and RatioToDb().

Referenced by EndReceive(), and GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::YansWifiPhy::GetStateDuration ( void  )
virtual
Returns
the amount of time since the current state has started.

Implements ns3::WifiPhy.

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

References m_state.

bool ns3::YansWifiPhy::GetStbc ( void  ) const
virtual

Return whether STBC is supported.

Returns
true if STBC is supported, false otherwise

Implements ns3::WifiPhy.

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

References m_stbc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetTxGain ( void  ) const

Return the transmission gain (dB).

Returns
the transmission gain in dB

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

References m_txGainDb.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetTxPowerEnd ( void  ) const
virtual

Return the maximum available transmission power level (dBm).

Returns
the maximum available transmission power level (dBm)

Implements ns3::WifiPhy.

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

References m_txPowerEndDbm.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::YansWifiPhy::GetTxPowerStart ( void  ) const
virtual

Return the minimum available transmission power level (dBm).

Returns
the minimum available transmission power level (dBm)

Implements ns3::WifiPhy.

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

References m_txPowerBaseDbm.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

bool ns3::YansWifiPhy::IsMcsSupported ( WifiMode  mcs)
virtual

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

References GetMcs(), and GetNMcs().

Referenced by StartReceivePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Check if the given WifiMode is supported by the PHY.

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

Implements ns3::WifiPhy.

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

References GetMode(), and GetNModes().

Referenced by StartReceivePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::YansWifiPhy::IsStateBusy ( void  )
virtual
Returns
true of the current state of the PHY layer is not WifiPhy::IDLE, false otherwise.

Implements ns3::WifiPhy.

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

References m_state.

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

Implements ns3::WifiPhy.

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

References m_state.

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

Implements ns3::WifiPhy.

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

References m_state.

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

Implements ns3::WifiPhy.

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

References m_state.

Referenced by EndReceive(), and StartReceivePacket().

+ Here is the caller graph for this function:

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

Implements ns3::WifiPhy.

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

References m_state.

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

Implements ns3::WifiPhy.

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

References m_state.

Referenced by SetChannelNumber().

+ Here is the caller graph for this function:

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

Implements ns3::WifiPhy.

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

References m_state.

double ns3::YansWifiPhy::RatioToDb ( double  ratio) const
private

Convert from ratio to dB.

Parameters
ratio
Returns
dB

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

Referenced by EndReceive(), GetRxNoiseFigure(), and StartReceivePacket().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::RegisterListener ( WifiPhyListener listener)
virtual
Parameters
listenerthe new listener

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

Implements ns3::WifiPhy.

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

References m_state.

void ns3::YansWifiPhy::ResumeFromSleep ( void  )
virtual
void ns3::YansWifiPhy::SendPacket ( Ptr< const Packet packet,
WifiTxVector  txVector,
enum WifiPreamble  preamble,
uint8_t  packetType,
uint32_t  mpduReferenceNumber 
)
virtual
Parameters
packetthe packet to send
txVectorthe TXVECTOR that has tx parameters such as mode, the transmission mode to use to send this packet, and txPowerLevel, a power level to use to send this packet. The real transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels
preamblethe type of preamble to use to send this packet.
packetTypethe 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
mpduReferenceNumberthe A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)

Implements ns3::WifiPhy.

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

References ns3::WifiPhy::CalculateTxDuration(), ns3::EventId::Cancel(), GetChannelFrequencyMhz(), GetChannelNumber(), ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), GetFrequency(), ns3::WifiMode::GetMcsValue(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiTxVector::GetNss(), GetPowerDbm(), ns3::Packet::GetSize(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::WifiTxVector::IsShortGuardInterval(), m_channel, m_endPlcpRxEvent, m_endRxEvent, m_interference, m_state, m_txGainDb, ns3::NanoSeconds(), ns3::WifiPhy::NotifyMonitorSniffTx(), ns3::InterferenceHelper::NotifyRxEnd(), ns3::WifiPhy::NotifyTxBegin(), ns3::WifiPhy::NotifyTxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::mpduInfo::packetType, ns3::mpduInfo::referenceNumber, ns3::WIFI_MOD_CLASS_HT, and ns3::WIFI_MOD_CLASS_VHT.

+ Here is the call graph for this function:

void ns3::YansWifiPhy::SetCcaMode1Threshold ( double  threshold)

Sets the CCA threshold (dBm).

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

Parameters
thresholdthe CCA threshold in dBm

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

References DbmToW(), m_ccaMode1ThresholdW, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetChannel ( 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 413 of file yans-wifi-phy.cc.

References third::channel, and m_channel.

Referenced by ns3::YansWifiPhyHelper::Create(), PsrExperiment::Run(), InterferenceExperiment::Run(), and CollisionExperiment::Run().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetChannelNumber ( uint16_t  id)
virtual
void ns3::YansWifiPhy::SetChannelWidth ( uint32_t  channelwidth)
virtual

Set channel width.

Parameters
channelwidth

Implements ns3::WifiPhy.

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

References m_channelWidth, and NS_ASSERT_MSG.

Referenced by Configure80211_10Mhz(), Configure80211_5Mhz(), Configure80211a(), Configure80211ac(), Configure80211b(), Configure80211g(), Configure80211n(), ConfigureHolland(), and GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetDevice ( Ptr< NetDevice device)

Sets the device this PHY is associated with.

Parameters
devicethe device this PHY is associated with

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

References m_device.

Referenced by ns3::YansWifiPhyHelper::Create().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetEdThreshold ( double  threshold)

Sets the energy detection threshold (dBm).

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

Parameters
thresholdthe energy detction threshold in dBm

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

References DbmToW(), m_edThresholdW, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetErrorRateModel ( Ptr< ErrorRateModel rate)

Sets the error rate model.

Parameters
ratethe error rate model

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

References m_interference, and ns3::InterferenceHelper::SetErrorRateModel().

Referenced by ns3::YansWifiPhyHelper::Create(), PsrExperiment::Run(), InterferenceExperiment::Run(), and CollisionExperiment::Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetFrequency ( uint32_t  freq)
virtual
Parameters
freqthe operating frequency on this node (2.4 GHz or 5GHz).

Implements ns3::WifiPhy.

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

References m_channelStartingFrequency.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetGreenfield ( bool  greenfield)
virtual

Enable or disable Greenfield support.

Parameters
greenfieldEnable or disable Greenfield

Implements ns3::WifiPhy.

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

References m_greenfield.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetGuardInterval ( bool  guardInterval)
virtual

Enable or disable short/long guard interval.

Parameters
guardIntervalEnable or disable guard interval

Implements ns3::WifiPhy.

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

References m_guardInterval.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetLdpc ( bool  ldpc)
virtual

Enable or disable LDPC.

Parameters
ldpcEnable or disable LDPC

Implements ns3::WifiPhy.

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

References m_ldpc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetMobility ( Ptr< MobilityModel mobility)

assign a mobility model to this device

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

Parameters
mobilitythe mobility model this PHY is associated with

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

References m_mobility, and third::mobility.

Referenced by PsrExperiment::Run(), InterferenceExperiment::Run(), and CollisionExperiment::Run().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetNTxPower ( uint32_t  n)

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

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

Parameters
nthe number of available levels

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

References m_nTxPower, and NS_LOG_FUNCTION.

void ns3::YansWifiPhy::SetNumberOfReceiveAntennas ( uint32_t  rx)
virtual
Parameters
rxthe number of receivers on this node.

Implements ns3::WifiPhy.

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

References m_numberOfReceivers.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetNumberOfTransmitAntennas ( uint32_t  tx)
virtual
Parameters
txthe number of transmitters on this node.

Implements ns3::WifiPhy.

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

References m_numberOfTransmitters.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

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

Implements ns3::WifiPhy.

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

References m_state.

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

Implements ns3::WifiPhy.

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

References m_state.

void ns3::YansWifiPhy::SetRxGain ( double  gain)

Sets the reception gain (dB).

Parameters
gainthe reception gain in dB

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

References m_rxGainDb, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetRxNoiseFigure ( double  noiseFigureDb)

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

Parameters
noiseFigureDbnoise figure in dB

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

References DbToRatio(), m_interference, NS_LOG_FUNCTION, and ns3::InterferenceHelper::SetNoiseFigure().

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetSleepMode ( void  )
virtual
void ns3::YansWifiPhy::SetStbc ( bool  stbc)
virtual

Enable or disable STBC.

Parameters
stbcEnable or disable STBC

Implements ns3::WifiPhy.

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

References m_stbc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetTxGain ( double  gain)

Sets the transmission gain (dB).

Parameters
gainthe transmission gain in dB

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

References m_txGainDb, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetTxPowerEnd ( double  end)

Sets the maximum available transmission power level (dBm).

Parameters
endthe maximum transmission power level (dBm)

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

References m_txPowerEndDbm, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::SetTxPowerStart ( double  start)

Sets the minimum available transmission power level (dBm).

Parameters
startthe minimum transmission power level (dBm)

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

References m_txPowerBaseDbm, NS_LOG_FUNCTION, and visualizer.core::start().

Referenced by GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::StartReceivePacket ( Ptr< Packet packet,
WifiTxVector  txVector,
WifiPreamble  preamble,
struct mpduInfo  aMpdu,
Ptr< InterferenceHelper::Event event 
)

Starting receiving the payload of a packet (i.e.

the first bit of the packet has arrived).

Parameters
packetthe arriving packet
txVectorthe TXVECTOR of the arriving packet
preamblethe preamble of the arriving packet
aMpduthe type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)
eventthe corresponding event of the first time the packet arrives

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

References ns3::InterferenceHelper::CalculatePlcpHeaderSnrPer(), ns3::WifiTxVector::GetMode(), ns3::UniformRandomVariable::GetValue(), ns3::EventId::IsExpired(), IsMcsSupported(), IsModeSupported(), IsStateRx(), m_endPlcpRxEvent, m_interference, m_plcpSuccess, m_random, ns3::WifiPhy::NotifyRxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::mpduInfo::packetType, and RatioToDb().

Referenced by StartReceivePreambleAndHeader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::YansWifiPhy::StartReceivePreambleAndHeader ( Ptr< Packet packet,
double  rxPowerDbm,
WifiTxVector  txVector,
WifiPreamble  preamble,
struct mpduInfo  aMpdu,
Time  rxDuration 
)

Starting receiving the plcp of a packet (i.e.

the first bit of the preamble has arrived).

Parameters
packetthe arriving packet
rxPowerDbmthe receive power in dBm
txVectorthe TXVECTOR of the arriving packet
preamblethe preamble of the arriving packet
aMpduthe type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU)
rxDurationthe duration needed for the reception of the packet

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

References ns3::InterferenceHelper::Add(), ns3::WifiPhy::CalculatePlcpPreambleAndHeaderDuration(), ns3::WifiPhy::CCA_BUSY, DbmToW(), EndReceive(), ns3::InterferenceHelper::GetEnergyDuration(), ns3::WifiTxVector::GetMode(), ns3::AmpduTag::GetNoOfMpdus(), ns3::Packet::GetSize(), ns3::WifiPhy::IDLE, ns3::EventId::IsExpired(), ns3::Time::IsZero(), m_ccaMode1ThresholdW, m_edThresholdW, m_endPlcpRxEvent, m_endRxEvent, m_interference, m_mpdusNum, m_plcpSuccess, m_rxGainDb, m_state, ns3::WifiPhy::NotifyRxBegin(), ns3::WifiPhy::NotifyRxDrop(), ns3::InterferenceHelper::NotifyRxStart(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::mpduInfo::packetType, ns3::Packet::PeekPacketTag(), ns3::WifiPhy::RX, ns3::Simulator::Schedule(), ns3::WifiPhy::SLEEP, StartReceivePacket(), ns3::WifiPhy::SWITCHING, ns3::WifiPhy::TX, and ns3::WIFI_PREAMBLE_NONE.

+ Here is the call graph for this function:

void ns3::YansWifiPhy::UnregisterListener ( WifiPhyListener listener)
virtual
Parameters
listenerthe listener to be unregistered

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

Implements ns3::WifiPhy.

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

References m_state.

double ns3::YansWifiPhy::WToDbm ( double  w) const
private

Convert from Watts to dBm.

Parameters
wthe power in Watts
Returns
the equivalent dBm for the given Watts

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

Referenced by GetCcaMode1Threshold(), and GetEdThreshold().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<uint32_t> ns3::YansWifiPhy::m_bssMembershipSelectorSet
private
double ns3::YansWifiPhy::m_ccaMode1ThresholdW
private

Clear channel assessment (CCA) threshold in watts.

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

Referenced by GetCcaMode1Threshold(), ResumeFromSleep(), SetCcaMode1Threshold(), and StartReceivePreambleAndHeader().

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

YansWifiChannel that this YansWifiPhy is connected to.

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

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

uint16_t ns3::YansWifiPhy::m_channelNumber
private

Operating channel number.

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

Referenced by GetChannelNumber(), and SetChannelNumber().

double ns3::YansWifiPhy::m_channelStartingFrequency
private
Time ns3::YansWifiPhy::m_channelSwitchDelay
private

Time required to switch between channel.

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

Referenced by GetChannelSwitchDelay(), GetTypeId(), and SetChannelNumber().

uint32_t ns3::YansWifiPhy::m_channelWidth
private

Channel width.

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

Referenced by GetChannelWidth(), and SetChannelWidth().

Ptr<NetDevice> ns3::YansWifiPhy::m_device
private

Pointer to the device.

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

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

WifiModeList ns3::YansWifiPhy::m_deviceMcsSet
private

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

Referenced by Configure80211ac(), Configure80211n(), DoDispose(), GetMcs(), and GetNMcs().

WifiModeList ns3::YansWifiPhy::m_deviceRateSet
private

This vector holds the set of transmission modes that this WifiPhy(-derived class) can support.

In conversation we call this 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 this vector looking for WifiMode objects for which WifiMode::IsMandatory() is true.

A quick note is appropriate here (well, here is as good a place as any I can find)...

In the standard there is no text that explicitly precludes production of a device that does not support some rates that are mandatory (according to the standard) for PHYs that the device happens to fully or partially support.

This approach is taken by some devices which choose to only support, for example, 6 and 9 Mbps ERP-OFDM rates for cost and power consumption reasons (i.e., these devices don't need to be designed for and waste current on the increased linearity requirement of higher-order constellations when 6 and 9 Mbps more than meet their data requirements). The wording of the standard allows such devices to have an OperationalRateSet which includes 6 and 9 Mbps ERP-OFDM rates, despite 12 and 24 Mbps being "mandatory" rates for the ERP-OFDM PHY.

Now this doesn't actually have any impact on code, yet. It is, however, something that we need to keep in mind for the future. Basically, the key point is that we can't be making assumptions like "the Operational Rate Set will contain all the mandatory rates".

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

Referenced by Configure80211_10Mhz(), Configure80211_5Mhz(), Configure80211a(), Configure80211ac(), Configure80211b(), Configure80211g(), Configure80211n(), ConfigureHolland(), DoDispose(), GetMode(), and GetNModes().

double ns3::YansWifiPhy::m_edThresholdW
private

Energy detection threshold in watts.

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

Referenced by GetEdThreshold(), GetEdThresholdW(), SetEdThreshold(), and StartReceivePreambleAndHeader().

EventId ns3::YansWifiPhy::m_endPlcpRxEvent
private
EventId ns3::YansWifiPhy::m_endRxEvent
private

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

Referenced by SendPacket(), SetChannelNumber(), and StartReceivePreambleAndHeader().

bool ns3::YansWifiPhy::m_greenfield
private

Flag if GreenField format is supported.

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

Referenced by GetGreenfield(), and SetGreenfield().

bool ns3::YansWifiPhy::m_guardInterval
private

Flag if short guard interval is used.

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

Referenced by GetGuardInterval(), and SetGuardInterval().

bool ns3::YansWifiPhy::m_initialized
private

Flag for runtime initialization.

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

Referenced by DoInitialize(), and SetChannelNumber().

bool ns3::YansWifiPhy::m_ldpc
private

Flag if LDPC is used.

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

Referenced by GetLdpc(), and SetLdpc().

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

Pointer to the mobility model.

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

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

uint16_t ns3::YansWifiPhy::m_mpdusNum
private

carries the number of expected mpdus that are part of an A-MPDU

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

Referenced by StartReceivePreambleAndHeader().

uint32_t ns3::YansWifiPhy::m_nTxPower
private

Number of available transmission power levels.

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

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

uint32_t ns3::YansWifiPhy::m_numberOfReceivers
private

Number of receivers.

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

Referenced by GetNumberOfReceiveAntennas(), and SetNumberOfReceiveAntennas().

uint32_t ns3::YansWifiPhy::m_numberOfTransmitters
private

Number of transmitters.

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

Referenced by GetNumberOfTransmitAntennas(), and SetNumberOfTransmitAntennas().

bool ns3::YansWifiPhy::m_plcpSuccess
private

Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received.

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

Referenced by EndReceive(), StartReceivePacket(), and StartReceivePreambleAndHeader().

Ptr<UniformRandomVariable> ns3::YansWifiPhy::m_random
private

Provides uniform random variables.

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

Referenced by AssignStreams(), EndReceive(), StartReceivePacket(), and YansWifiPhy().

double ns3::YansWifiPhy::m_rxGainDb
private

Reception gain (dB)

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

Referenced by GetRxGain(), SetRxGain(), and StartReceivePreambleAndHeader().

bool ns3::YansWifiPhy::m_stbc
private

Flag if STBC is used.

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

Referenced by GetStbc(), and SetStbc().

double ns3::YansWifiPhy::m_txGainDb
private

Transmission gain (dB)

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

Referenced by GetTxGain(), SendPacket(), and SetTxGain().

double ns3::YansWifiPhy::m_txPowerBaseDbm
private

Minimum transmission power (dBm)

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

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

double ns3::YansWifiPhy::m_txPowerEndDbm
private

Maximum transmission power (dBm)

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

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


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