A Discrete-Event Network Simulator
API
wifi-phy.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  * S├ębastien Deronne <sebastien.deronne@gmail.com>
20  */
21 
22 #ifndef WIFI_PHY_H
23 #define WIFI_PHY_H
24 
25 #include "ns3/event-id.h"
26 #include "ns3/deprecated.h"
27 #include "ns3/error-model.h"
28 #include "wifi-mpdu-type.h"
29 #include "wifi-phy-standard.h"
30 #include "interference-helper.h"
31 #include "wifi-phy-state-helper.h"
32 
33 namespace ns3 {
34 
35 #define HE_PHY 125
36 #define VHT_PHY 126
37 #define HT_PHY 127
38 
39 class Channel;
40 class NetDevice;
41 class MobilityModel;
42 class WifiPhyStateHelper;
43 class FrameCaptureModel;
44 class PreambleDetectionModel;
45 class WifiRadioEnergyModel;
46 class UniformRandomVariable;
47 class WifiPsdu;
48 class WifiPpdu;
49 
54 {
55  UNKNOWN = 0,
69 };
70 
78 inline std::ostream& operator<< (std::ostream& os, WifiPhyRxfailureReason reason)
79 {
80  switch (reason)
81  {
83  return (os << "UNSUPPORTED_SETTINGS");
84  case CHANNEL_SWITCHING:
85  return (os << "CHANNEL_SWITCHING");
86  case RXING:
87  return (os << "RXING");
88  case TXING:
89  return (os << "TXING");
90  case SLEEPING:
91  return (os << "SLEEPING");
93  return (os << "BUSY_DECODING_PREAMBLE");
95  return (os << "PREAMBLE_DETECT_FAILURE");
97  return (os << "RECEPTION_ABORTED_BY_TX");
98  case L_SIG_FAILURE:
99  return (os << "L_SIG_FAILURE");
100  case SIG_A_FAILURE:
101  return (os << "SIG_A_FAILURE");
103  return (os << "PREAMBLE_DETECTION_PACKET_SWITCH");
105  return (os << "FRAME_CAPTURE_PACKET_SWITCH");
106  case OBSS_PD_CCA_RESET:
107  return (os << "OBSS_PD_CCA_RESET");
108  case UNKNOWN:
109  default:
110  NS_FATAL_ERROR ("Unknown reason");
111  return (os << "UNKNOWN");
112  }
113 }
114 
115 
118 {
119  double signal;
120  double noise;
121 };
122 
124 struct MpduInfo
125 {
127  uint32_t mpduRefNumber;
128 };
129 
132 {
133  double rssiW;
134  uint8_t bssColor;
135 };
136 
142 class WifiPhy : public Object
143 {
144 public:
149  static TypeId GetTypeId (void);
150 
151  WifiPhy ();
152  virtual ~WifiPhy ();
153 
159  Ptr<WifiPhyStateHelper> GetState (void) const;
160 
165  void SetReceiveOkCallback (RxOkCallback callback);
171 
178  void RegisterListener (WifiPhyListener *listener);
185  void UnregisterListener (WifiPhyListener *listener);
186 
191 
198  void StartReceivePreamble (Ptr<WifiPpdu> ppdu, double rxPowerW);
199 
205  void StartReceiveHeader (Ptr<Event> event);
206 
212  void ContinueReceiveHeader (Ptr<Event> event);
213 
219  void StartReceivePayload (Ptr<Event> event);
220 
226  void EndReceive (Ptr<Event> event);
227 
233  void ResetReceive (Ptr<Event> event);
234 
239  void EndReceiveInterBss (void);
240 
247  void Send (Ptr<const WifiPsdu> psdu, WifiTxVector txVector);
248 
252  virtual void StartTx (Ptr<WifiPpdu> ppdu) = 0;
253 
257  void SetSleepMode (void);
261  void ResumeFromSleep (void);
265  void SetOffMode (void);
269  void ResumeFromOff (void);
270 
274  bool IsStateIdle (void) const;
278  bool IsStateCcaBusy (void) const;
282  bool IsStateRx (void) const;
286  bool IsStateTx (void) const;
290  bool IsStateSwitching (void) const;
294  bool IsStateSleep (void) const;
298  bool IsStateOff (void) const;
299 
306  Time GetDelayUntilIdle (void);
307 
313  Time GetLastRxStartTime (void) const;
319  Time GetLastRxEndTime (void) const;
320 
328  static Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
329 
340  static Time GetPreambleDetectionDuration (void);
351  static WifiMode GetHtPhyHeaderMode ();
355  static WifiMode GetVhtPhyHeaderMode ();
359  static WifiMode GetHePhyHeaderMode ();
365  static Time GetPhyHtSigHeaderDuration (WifiPreamble preamble);
371  static Time GetPhySigA1Duration (WifiPreamble preamble);
377  static Time GetPhySigA2Duration (WifiPreamble preamble);
383  static Time GetPhySigBDuration (WifiPreamble preamble);
389  static WifiMode GetPhyHeaderMode (WifiTxVector txVector);
395  static Time GetPhyHeaderDuration (WifiTxVector txVector);
401  static Time GetPhyPreambleDuration (WifiTxVector txVector);
410  static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype = NORMAL_MPDU);
426  static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols);
432  static Time GetStartOfPacketDuration (WifiTxVector txVector);
433 
451  uint8_t GetNModes (void) const;
471  WifiMode GetMode (uint8_t mode) const;
480  bool IsModeSupported (WifiMode mode) const;
489  bool IsMcsSupported (WifiMode mcs) const;
499  bool IsMcsSupported (WifiModulationClass mc, uint8_t mcs) const;
500 
508  double CalculateSnr (WifiTxVector txVector, double ber) const;
509 
515  void SetSifs (Time sifs);
521  Time GetSifs (void) const;
527  void SetSlot (Time slot);
533  Time GetSlot (void) const;
539  void SetPifs (Time pifs);
545  Time GetPifs (void) const;
551  Time GetAckTxTime (void) const;
557  Time GetBlockAckTxTime (void) const;
558 
568  uint8_t GetNBssMembershipSelectors (void) const;
580  uint8_t GetBssMembershipSelector (uint8_t selector) const;
590  uint8_t GetNMcs (void) const;
602  WifiMode GetMcs (uint8_t mcs) const;
613  WifiMode GetMcs (WifiModulationClass modulation, uint8_t mcs) const;
623  WifiMode GetHtMcs (uint8_t mcs) const;
633  WifiMode GetVhtMcs (uint8_t mcs) const;
643  WifiMode GetHeMcs (uint8_t mcs) const;
644 
657  virtual void SetChannelNumber (uint8_t id);
663  uint8_t GetChannelNumber (void) const;
667  Time GetChannelSwitchDelay (void) const;
668 
674  virtual void ConfigureStandard (WifiPhyStandard standard);
675 
681  WifiPhyStandard GetStandard (void) const;
682 
698  bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth);
699 
703  typedef std::pair<uint8_t, WifiPhyStandard> ChannelNumberStandardPair;
707  typedef std::pair<uint16_t, uint16_t> FrequencyWidthPair;
708 
714  virtual Ptr<Channel> GetChannel (void) const = 0;
715 
721  static WifiMode GetDsssRate1Mbps ();
727  static WifiMode GetDsssRate2Mbps ();
733  static WifiMode GetDsssRate5_5Mbps ();
739  static WifiMode GetDsssRate11Mbps ();
745  static WifiMode GetErpOfdmRate6Mbps ();
751  static WifiMode GetErpOfdmRate9Mbps ();
757  static WifiMode GetErpOfdmRate12Mbps ();
763  static WifiMode GetErpOfdmRate18Mbps ();
769  static WifiMode GetErpOfdmRate24Mbps ();
775  static WifiMode GetErpOfdmRate36Mbps ();
781  static WifiMode GetErpOfdmRate48Mbps ();
787  static WifiMode GetErpOfdmRate54Mbps ();
793  static WifiMode GetOfdmRate6Mbps ();
799  static WifiMode GetOfdmRate9Mbps ();
805  static WifiMode GetOfdmRate12Mbps ();
811  static WifiMode GetOfdmRate18Mbps ();
817  static WifiMode GetOfdmRate24Mbps ();
823  static WifiMode GetOfdmRate36Mbps ();
829  static WifiMode GetOfdmRate48Mbps ();
835  static WifiMode GetOfdmRate54Mbps ();
932 
938  static WifiMode GetHtMcs0 ();
944  static WifiMode GetHtMcs1 ();
950  static WifiMode GetHtMcs2 ();
956  static WifiMode GetHtMcs3 ();
962  static WifiMode GetHtMcs4 ();
968  static WifiMode GetHtMcs5 ();
974  static WifiMode GetHtMcs6 ();
980  static WifiMode GetHtMcs7 ();
986  static WifiMode GetHtMcs8 ();
992  static WifiMode GetHtMcs9 ();
998  static WifiMode GetHtMcs10 ();
1004  static WifiMode GetHtMcs11 ();
1010  static WifiMode GetHtMcs12 ();
1016  static WifiMode GetHtMcs13 ();
1022  static WifiMode GetHtMcs14 ();
1028  static WifiMode GetHtMcs15 ();
1034  static WifiMode GetHtMcs16 ();
1040  static WifiMode GetHtMcs17 ();
1046  static WifiMode GetHtMcs18 ();
1052  static WifiMode GetHtMcs19 ();
1058  static WifiMode GetHtMcs20 ();
1064  static WifiMode GetHtMcs21 ();
1070  static WifiMode GetHtMcs22 ();
1076  static WifiMode GetHtMcs23 ();
1082  static WifiMode GetHtMcs24 ();
1088  static WifiMode GetHtMcs25 ();
1094  static WifiMode GetHtMcs26 ();
1100  static WifiMode GetHtMcs27 ();
1106  static WifiMode GetHtMcs28 ();
1112  static WifiMode GetHtMcs29 ();
1118  static WifiMode GetHtMcs30 ();
1124  static WifiMode GetHtMcs31 ();
1125 
1131  static WifiMode GetVhtMcs0 ();
1137  static WifiMode GetVhtMcs1 ();
1143  static WifiMode GetVhtMcs2 ();
1149  static WifiMode GetVhtMcs3 ();
1155  static WifiMode GetVhtMcs4 ();
1161  static WifiMode GetVhtMcs5 ();
1167  static WifiMode GetVhtMcs6 ();
1173  static WifiMode GetVhtMcs7 ();
1179  static WifiMode GetVhtMcs8 ();
1185  static WifiMode GetVhtMcs9 ();
1186 
1192  static WifiMode GetHeMcs0 ();
1198  static WifiMode GetHeMcs1 ();
1204  static WifiMode GetHeMcs2 ();
1210  static WifiMode GetHeMcs3 ();
1216  static WifiMode GetHeMcs4 ();
1222  static WifiMode GetHeMcs5 ();
1228  static WifiMode GetHeMcs6 ();
1234  static WifiMode GetHeMcs7 ();
1240  static WifiMode GetHeMcs8 ();
1246  static WifiMode GetHeMcs9 ();
1252  static WifiMode GetHeMcs10 ();
1258  static WifiMode GetHeMcs11 ();
1259 
1267  void NotifyTxBegin (Ptr<const WifiPsdu> psdu, double txPowerW);
1274  void NotifyTxEnd (Ptr<const WifiPsdu> psdu);
1281  void NotifyTxDrop (Ptr<const WifiPsdu> psdu);
1288  void NotifyRxBegin (Ptr<const WifiPsdu> psdu);
1295  void NotifyRxEnd (Ptr<const WifiPsdu> psdu);
1304 
1325  uint16_t channelFreqMhz,
1326  WifiTxVector txVector,
1327  SignalNoiseDbm signalNoise,
1328  std::vector<bool> statusPerMpdu);
1329 
1350  uint16_t channelFreqMhz,
1351  WifiTxVector txVector,
1352  MpduInfo aMpdu,
1353  SignalNoiseDbm signalNoise);
1354 
1368  uint16_t channelFreqMhz,
1369  WifiTxVector txVector);
1370 
1383  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet,
1384  uint16_t channelFreqMhz,
1385  WifiTxVector txVector,
1386  MpduInfo aMpdu);
1387 
1395  typedef void (* PsduTxBeginCallback)(Ptr<const WifiPsdu> psdu, WifiTxVector txVector, double txPowerW);
1396 
1403 
1411 
1418  typedef void (* PhyRxPayloadBeginTracedCallback)(WifiTxVector txVector, Time psduDuration);
1419 
1428  virtual int64_t AssignStreams (int64_t stream);
1429 
1439  void SetEdThreshold (double threshold);
1447  void SetRxSensitivity (double threshold);
1453  double GetRxSensitivity (void) const;
1461  void SetCcaEdThreshold (double threshold);
1467  double GetCcaEdThreshold (void) const;
1473  void SetRxNoiseFigure (double noiseFigureDb);
1479  void SetTxPowerStart (double start);
1485  double GetTxPowerStart (void) const;
1491  void SetTxPowerEnd (double end);
1497  double GetTxPowerEnd (void) const;
1505  void SetNTxPower (uint8_t n);
1511  uint8_t GetNTxPower (void) const;
1517  void SetTxGain (double gain);
1523  double GetTxGain (void) const;
1529  void SetRxGain (double gain);
1535  double GetRxGain (void) const;
1536 
1542  void SetDevice (const Ptr<NetDevice> device);
1548  Ptr<NetDevice> GetDevice (void) const;
1569  Ptr<MobilityModel> GetMobility (void) const;
1570 
1574  virtual void SetFrequency (uint16_t freq);
1578  uint16_t GetFrequency (void) const;
1582  void SetNumberOfAntennas (uint8_t antennas);
1586  uint8_t GetNumberOfAntennas (void) const;
1590  void SetMaxSupportedTxSpatialStreams (uint8_t streams);
1594  uint8_t GetMaxSupportedTxSpatialStreams (void) const;
1598  void SetMaxSupportedRxSpatialStreams (uint8_t streams);
1602  uint8_t GetMaxSupportedRxSpatialStreams (void) const;
1610  void SetShortGuardInterval (bool shortGuardInterval);
1618  bool GetShortGuardInterval (void) const;
1624  void SetGuardInterval (Time guardInterval);
1630  Time GetGuardInterval (void) const;
1638  void SetGreenfield (bool greenfield);
1646  bool GetGreenfield (void) const;
1652  void SetShortPhyPreambleSupported (bool preamble);
1658  bool GetShortPhyPreambleSupported (void) const;
1659 
1665  void SetErrorRateModel (const Ptr<ErrorRateModel> rate);
1683  void SetFrameCaptureModel (const Ptr<FrameCaptureModel> frameCaptureModel);
1689  void SetPreambleDetectionModel (const Ptr<PreambleDetectionModel> preambleDetectionModel);
1695  void SetWifiRadioEnergyModel (const Ptr<WifiRadioEnergyModel> wifiRadioEnergyModel);
1696 
1700  uint16_t GetChannelWidth (void) const;
1704  virtual void SetChannelWidth (uint16_t channelWidth);
1708  void AddSupportedChannelWidth (uint16_t width);
1712  std::vector<uint16_t> GetSupportedChannelWidthSet (void) const;
1713 
1722  double GetPowerDbm (uint8_t power) const;
1723 
1731  void ResetCca (bool powerRestricted, double txPowerMaxSiso = 0, double txPowerMaxMimo = 0);
1738  double GetTxPowerForTransmission (WifiTxVector txVector) const;
1746  void NotifyChannelAccessRequested (void);
1747 
1748 
1749 protected:
1750  // Inherited
1751  virtual void DoInitialize (void);
1752  virtual void DoDispose (void);
1753 
1763  bool DoChannelSwitch (uint8_t id);
1773  bool DoFrequencySwitch (uint16_t frequency);
1774 
1781  void SwitchMaybeToCcaBusy (void);
1782 
1786 
1789 
1793 
1795 
1796 private:
1812  void Configure80211a (void);
1817  void Configure80211b (void);
1822  void Configure80211g (void);
1827  void Configure80211_10Mhz (void);
1832  void Configure80211_5Mhz ();
1837  void ConfigureHolland (void);
1842  void Configure80211n (void);
1847  void Configure80211ac (void);
1852  void Configure80211ax (void);
1857  void ConfigureHtDeviceMcsSet (void);
1863  void PushMcs (WifiMode mode);
1867  void RebuildMcsMap (void);
1885 
1892  uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const;
1899  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const;
1900 
1907 
1911  void MaybeCcaBusyDuration (void);
1912 
1919  void StartRx (Ptr<Event> event, double rxPowerW);
1930  std::pair<bool, SignalNoiseDbm> GetReceptionStatus (Ptr<const WifiPsdu> psdu,
1931  Ptr<Event> event,
1932  Time relativeMpduStart,
1933  Time mpduDuration);
1934 
1949 
1957 
1965 
1973 
1989 
1997 
2004 
2018 
2032 
2039 
2078  std::map<WifiModulationClass, std::map<uint8_t /* MCS value */, uint8_t /* index */>> m_mcsIndexMap;
2080 
2081  std::vector<uint8_t> m_bssMembershipSelectorSet;
2082 
2088  uint16_t m_channelWidth;
2089 
2095 
2098  double m_txGainDb;
2099  double m_rxGainDb;
2102  uint8_t m_nTxPower;
2103 
2108 
2112 
2114 
2118 
2119  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
2121 
2122  std::vector<uint16_t> m_supportedChannelWidthSet;
2125 
2127 
2130 
2137 
2139 };
2140 
2141 } //namespace ns3
2142 
2143 #endif /* WIFI_PHY_H */
MpduInfo structure.
Definition: wifi-phy.h:124
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:3923
void NotifyRxDrop(Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:2586
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3577
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1972
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:2128
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:3268
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:618
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1787
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:3205
bool IsStateSwitching(void) const
Definition: wifi-phy.cc:4170
void SetPifs(Time pifs)
Set the PCF Interframe Space (PIFS) for this PHY.
Definition: wifi-phy.cc:965
bool IsStateOff(void) const
Definition: wifi-phy.cc:4182
double signal
in dBm
Definition: wifi-phy.h:119
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
static WifiMode GetHeMcs7()
Return MCS 7 from HE MCS values.
Definition: wifi-phy.cc:4013
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:703
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:3280
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
void SetNTxPower(uint8_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
Definition: wifi-phy.cc:611
uint8_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:2123
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:2099
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1273
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:3939
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:644
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:4053
void AddSupportedChannelWidth(uint16_t width)
Definition: wifi-phy.cc:1577
WifiMode GetHeMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the HE modulation class.
Definition: wifi-phy.cc:4140
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:3331
double GetCcaEdThreshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:571
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3478
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
static WifiMode GetOfdmRate27MbpsBW10MHz()
Return a WifiMode for OFDM at 27Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3502
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm > m_phyMonitorSniffRxTrace
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being received...
Definition: wifi-phy.h:2017
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:2098
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
Definition: wifi-phy.cc:4110
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3541
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:3875
void AbortCurrentReception(WifiPhyRxfailureReason reason)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
Definition: wifi-phy.cc:4223
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
Definition: wifi-phy.cc:2952
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1425
virtual ~WifiPhy()
Definition: wifi-phy.cc:444
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:3166
void ResumeFromOff(void)
Resume from off mode.
Definition: wifi-phy.cc:1863
Ptr< WifiPhyStateHelper > GetState(void) const
Return the WifiPhyStateHelper of this PHY.
Definition: wifi-phy.cc:481
void ResumeFromSleep(void)
Resume from sleep mode.
Definition: wifi-phy.cc:1833
double m_rxSensitivityW
Receive sensitivity threshold in watts.
Definition: wifi-phy.h:2096
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
Definition: wifi-phy.cc:697
bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:666
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
Definition: wifi-phy.cc:3997
802.11 PHY layer model
Definition: wifi-phy.h:142
Time m_timeLastPreambleDetected
Record the time the last preamble was detected.
Definition: wifi-phy.h:2136
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:3256
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:624
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
Definition: wifi-phy.cc:1244
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:3672
void SetRxSensitivity(double threshold)
Sets the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:551
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:450
static WifiMode GetHePhyHeaderMode()
Definition: wifi-phy.cc:1906
def start()
Definition: core.py:1855
Forward calls to a chain of Callback.
void RebuildMcsMap(void)
Rebuild the mapping of MCS values to indices in the device MCS set.
Definition: wifi-phy.cc:1123
TracedCallback< Ptr< const WifiPsdu >, WifiTxVector, double > m_phyTxPsduBeginTrace
The trace source fired when a PSDU begins the transmission process on the medium. ...
Definition: wifi-phy.h:1948
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:3915
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1565
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:3792
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:3728
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:3343
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1996
bool IsStateCcaBusy(void) const
Definition: wifi-phy.cc:4146
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:493
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:3864
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:3784
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:3856
void SetSlot(Time slot)
Set the slot duration for this PHY.
Definition: wifi-phy.cc:953
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
Definition: wifi-phy.h:2081
std::pair< bool, SignalNoiseDbm > GetReceptionStatus(Ptr< const WifiPsdu > psdu, Ptr< Event > event, Time relativeMpduStart, Time mpduDuration)
Get the reception status for the provided MPDU and notify.
Definition: wifi-phy.cc:3105
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:3696
static Time GetPhyPreambleDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2172
void SetShortPhyPreambleSupported(bool preamble)
Enable or disable short PHY preamble.
Definition: wifi-phy.cc:744
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:3824
TracedCallback< WifiTxVector, Time > m_phyRxPayloadBeginTrace
The trace source fired when the reception of the PHY payload (PSDU) begins.
Definition: wifi-phy.h:1988
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3517
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:3752
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:3808
EventId m_endPhyRxEvent
the end of PHY receive event
Definition: wifi-phy.h:1791
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3430
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:3403
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:781
void UnregisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:505
void SetRxNoiseFigure(double noiseFigureDb)
Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
Definition: wifi-phy.cc:577
WifiMode GetVhtMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the VHT modulation class.
Definition: wifi-phy.cc:4134
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
Definition: wifi-phy.cc:3989
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for Holland.
Definition: wifi-phy.cc:1094
bool IsStateIdle(void) const
Definition: wifi-phy.cc:4152
void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
Definition: wifi-phy.cc:650
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
Definition: wifi-phy.cc:1052
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReason > m_phyRxDropTrace
The trace source fired when the PHY layer drops a packet it has received.
Definition: wifi-phy.h:2003
std::pair< uint16_t, uint16_t > FrequencyWidthPair
A pair of a center Frequency (MHz) and a ChannelWidth (MHz)
Definition: wifi-phy.h:707
uint8_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:2102
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:3680
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:3760
double GetTxPowerForTransmission(WifiTxVector txVector) const
Compute the transmit power (in dBm) for the next transmission.
Definition: wifi-phy.cc:4260
virtual void SetFrequency(uint16_t freq)
Definition: wifi-phy.cc:1431
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:3907
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:3832
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
Definition: wifi-phy.cc:814
void ResetCca(bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0)
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
Definition: wifi-phy.cc:4248
void(* EndOfHePreambleCallback)(HePreambleParameters params)
TracedCallback signature for end of HE-SIG-A events.
Definition: wifi-phy.h:1410
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo > m_phyMonitorSniffTxTrace
A trace source that emulates a Wi-Fi device in monitor mode sniffing a packet being transmitted...
Definition: wifi-phy.h:2031
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:3379
uint8_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:2124
void NotifyRxEnd(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:2577
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:3931
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3565
bool IsStateSleep(void) const
Definition: wifi-phy.cc:4176
void NotifyEndOfHePreamble(HePreambleParameters params)
Public method used to fire a EndOfHePreamble trace once both HE SIG fields have been received...
Definition: wifi-phy.cc:2651
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:3899
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:862
MpduType
The type of an MPDU.
double GetRxSensitivity(void) const
Return the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:558
void NotifyTxEnd(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:2550
WifiModeList m_deviceMcsSet
the device MCS set
Definition: wifi-phy.h:2077
mobility
Definition: third.py:108
virtual Ptr< Channel > GetChannel(void) const =0
Return the Channel this WifiPhy is connected to.
uint16_t m_channelCenterFrequency
Center frequency in MHz.
Definition: wifi-phy.h:2085
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:757
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:3744
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1508
bool m_powerRestricted
Flag whether transmit power is restricted by OBSS PD SR.
Definition: wifi-phy.h:2104
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:3304
static Time GetPhyHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1967
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:3848
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:3704
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
Definition: wifi-phy.cc:4104
static Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2533
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:32
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
the channel to frequency width map
Definition: wifi-phy.h:2120
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
The MPDU is not part of an A-MPDU.
double rssiW
RSSI in W.
Definition: wifi-phy.h:133
uint8_t bssColor
BSS color.
Definition: wifi-phy.h:134
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1726
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:3632
void StartReceiveHeader(Ptr< Event > event)
Start receiving the PHY header of a PPDU (i.e.
Definition: wifi-phy.cc:2732
static WifiMode GetHtPhyHeaderMode()
Definition: wifi-phy.cc:1894
Time m_slot
Slot duration.
Definition: wifi-phy.h:2091
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:2129
void StartRx(Ptr< Event > event, double rxPowerW)
Starting receiving the PPDU after having detected the medium is idle or after a reception switch...
Definition: wifi-phy.cc:4281
Time m_blockAckTxTime
estimated BlockAck TX time
Definition: wifi-phy.h:2094
receive notifications about PHY events.
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the PHY layer drops a packet as it tries to transmit it.
Definition: wifi-phy.h:1964
double m_txPowerMaxMimo
MIMO maximum transmit power due to OBSS PD SR power restriction (dBm)
Definition: wifi-phy.h:2106
bool m_shortPreamble
Flag if short PHY preamble is supported.
Definition: wifi-phy.h:2111
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
Definition: wifi-phy.cc:3981
void(* MonitorSnifferTxCallback)(const Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
TracedCallback signature for monitor mode transmit events.
Definition: wifi-phy.h:1383
EventId m_endTxEvent
the end of transmit event
Definition: wifi-phy.h:1794
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:3712
Ptr< WifiRadioEnergyModel > m_wifiRadioEnergyModel
Wifi radio energy model.
Definition: wifi-phy.h:2134
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:3292
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:598
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
Definition: wifi-phy.cc:820
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3466
WifiMode GetHtMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the HT modulation class.
Definition: wifi-phy.cc:4128
void NotifyChannelAccessRequested(void)
Notify the PHY that an access to the channel was requested.
Definition: wifi-phy.cc:3157
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Definition: wifi-phy.cc:4045
Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:4188
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1788
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:1073
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1598
TracedCallback< HePreambleParameters > m_phyEndOfHePreambleTrace
A trace source that indicates the end of both HE SIG fields as well as training fields for received 8...
Definition: wifi-phy.h:2038
double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:856
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:3355
void SetCapabilitiesChangedCallback(Callback< void > callback)
Definition: wifi-phy.cc:511
void SetOffMode(void)
Put in off mode.
Definition: wifi-phy.cc:1820
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3454
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3589
void(* MonitorSnifferRxCallback)(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
TracedCallback signature for monitor mode receive events.
Definition: wifi-phy.h:1349
void(* PhyRxPayloadBeginTracedCallback)(WifiTxVector txVector, Time psduDuration)
TracedCallback signature for start of PSDU reception events.
Definition: wifi-phy.h:1418
Ptr< PreambleDetectionModel > m_preambleDetectionModel
Preamble detection model.
Definition: wifi-phy.h:2133
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:832
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:3883
EventId m_endPreambleDetectionEvent
the end of preamble detection event
Definition: wifi-phy.h:1792
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:3391
void NotifyRxBegin(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:2568
Time GetBlockAckTxTime(void) const
Return the estimated BlockAck TX time for this PHY.
Definition: wifi-phy.cc:983
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:800
void StartReceivePreamble(Ptr< WifiPpdu > ppdu, double rxPowerW)
Start receiving the PHY preamble of a PPDU (i.e.
Definition: wifi-phy.cc:2813
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
static WifiMode GetVhtPhyHeaderMode()
Definition: wifi-phy.cc:1900
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
Definition: wifi-phy.cc:4029
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:3616
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:787
static Time GetPreambleDetectionDuration(void)
Definition: wifi-phy.cc:1912
Time m_pifs
PCF Interframe Space (PIFS) duration.
Definition: wifi-phy.h:2092
static Time GetPhySigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1982
void SetPostReceptionErrorModel(const Ptr< ErrorModel > em)
Attach a receive ErrorModel to the WifiPhy.
Definition: wifi-phy.cc:807
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy.cc:162
Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:850
void ContinueReceiveHeader(Ptr< Event > event)
Continue receiving the PHY header of a PPDU (i.e.
Definition: wifi-phy.cc:2784
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
Definition: wifi-phy.cc:826
Time m_guardInterval
Supported HE guard interval (deprecated)
Definition: wifi-phy.h:2113
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1488
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1522
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:3367
void NotifyTxDrop(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:2559
void(* PsduTxBeginCallback)(Ptr< const WifiPsdu > psdu, WifiTxVector txVector, double txPowerW)
TracedCallback signature for PSDU transmit events.
Definition: wifi-phy.h:1395
Time m_sifs
Short Interframe Space (SIFS) duration.
Definition: wifi-phy.h:2090
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
Definition: wifi-phy.cc:3965
TracedCallback< Ptr< const Packet >, double > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1941
virtual void StartTx(Ptr< WifiPpdu > ppdu)=0
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
Definition: wifi-phy.cc:681
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:3720
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
Definition: wifi-phy.cc:3957
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
Definition: wifi-phy.cc:4037
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:3776
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
Definition: wifi-phy.cc:3973
static Time GetPhyTrainingSymbolDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1918
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:3656
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1547
bool GetShortPhyPreambleSupported(void) const
Return whether short PHY preamble is supported.
Definition: wifi-phy.cc:751
double m_ccaEdThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:2097
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:3891
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Definition: wifi-phy.cc:1606
Time GetPifs(void) const
Return the PCF Interframe Space (PIFS) for this PHY.
Definition: wifi-phy.cc:971
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:3193
Time GetAckTxTime(void) const
Return the estimated Ack TX time for this PHY.
Definition: wifi-phy.cc:977
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:1224
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:468
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3529
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1660
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:283
WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:2083
void SetGuardInterval(Time guardInterval)
Definition: wifi-phy.cc:712
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint16_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:1290
bool m_channelAccessRequested
Flag if channels access has been requested (used for OBSS_PD SR)
Definition: wifi-phy.h:2107
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:3232
void EndReceive(Ptr< Event > event)
The last symbol of the PPDU has arrived.
Definition: wifi-phy.cc:3030
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1784
static Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype=NORMAL_MPDU)
Definition: wifi-phy.cc:2241
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
Definition: wifi-phy.h:2116
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:592
Time m_ackTxTime
estimated Ack TX time
Definition: wifi-phy.h:2093
Ptr< ErrorModel > m_postReceptionErrorModel
Error model for receive packet events.
Definition: wifi-phy.h:2135
static WifiMode GetPhyHeaderMode(WifiTxVector txVector)
Definition: wifi-phy.cc:2030
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:517
std::vector< uint16_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1592
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4092
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Definition: wifi-phy.h:2132
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:637
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:1012
void SetSifs(Time sifs)
Set the Short Interframe Space (SIFS) for this PHY.
Definition: wifi-phy.cc:941
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:487
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4098
uint16_t m_channelWidth
Channel width (MHz)
Definition: wifi-phy.h:2088
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:3220
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1571
void RegisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:499
bool IsStateTx(void) const
Definition: wifi-phy.cc:4164
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1318
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1528
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:3244
bool m_greenfield
Flag if GreenField format is supported (deprecated)
Definition: wifi-phy.h:2109
WifiModulationClass
This enumeration defines the modulation classes per (Table 9-4 "Modulation classes"; IEEE 802...
Definition: wifi-mode.h:36
EventId m_endRxEvent
the end of receive event
Definition: wifi-phy.h:1790
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1785
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:545
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:1205
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:585
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:2100
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:4066
Time GetSifs(void) const
Return the Short Interframe Space (SIFS) for this PHY.
Definition: wifi-phy.cc:947
An identifier for simulation events.
Definition: event-id.h:53
void ResetReceive(Ptr< Event > event)
Reset PHY at the end of the packet under reception after it has failed the PHY header.
Definition: wifi-phy.cc:3146
SignalNoiseDbm structure.
Definition: wifi-phy.h:117
uint32_t mpduRefNumber
MPDU ref number.
Definition: wifi-phy.h:127
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:2087
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:3768
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1783
virtual void SetChannelWidth(uint16_t channelWidth)
Definition: wifi-phy.cc:1494
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:2084
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:3664
void NotifyTxBegin(Ptr< const WifiPsdu > psdu, double txPowerW)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:2541
void ConfigureHtDeviceMcsSet(void)
Configure the device MCS set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:1135
void PushMcs(WifiMode mode)
Add the given MCS to the device MCS set.
Definition: wifi-phy.cc:1110
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
Definition: wifi-phy.h:53
static Time GetPhySigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1999
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:3840
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:605
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:3688
Time GetSlot(void) const
Return the slot duration for this PHY.
Definition: wifi-phy.cc:959
void EndReceiveInterBss(void)
For HE receptions only, check and possibly modify the transmit power restriction state at the end of ...
Definition: wifi-phy.cc:3136
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:3648
void StartReceivePayload(Ptr< Event > event)
Start receiving the PSDU (i.e.
Definition: wifi-phy.cc:2967
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:3816
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Definition: wifi-phy.cc:4021
void Send(Ptr< const WifiPsdu > psdu, WifiTxVector txVector)
Definition: wifi-phy.cc:2657
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:1031
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:775
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.
Definition: wifi-phy.cc:2626
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:631
void SetSleepMode(void)
Put in sleep mode.
Definition: wifi-phy.cc:1786
double noise
in dBm
Definition: wifi-phy.h:120
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:2076
void SetNumberOfAntennas(uint8_t antennas)
Definition: wifi-phy.cc:1514
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:3624
std::map< WifiModulationClass, std::map< uint8_t, uint8_t > > m_mcsIndexMap
Maps MCS values to indices in m_deviceMcsSet, for HT, VHT and HE modulation classes.
Definition: wifi-phy.h:2079
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:3800
static Time GetPhyHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2094
A base class which provides memory management and object aggregation.
Definition: object.h:87
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
Definition: wifi-phy.cc:3178
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:3947
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1368
static Time GetStartOfPacketDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2166
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3442
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:2101
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3490
MpduType type
type
Definition: wifi-phy.h:126
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:2126
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3601
Time GetLastRxEndTime(void) const
Return the end time of the last received packet.
Definition: wifi-phy.cc:4200
uint8_t m_numberOfAntennas
Number of transmitters.
Definition: wifi-phy.h:2115
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1541
a unique identifier for an interface.
Definition: type-id.h:58
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
Definition: wifi-phy.cc:3736
Ptr< Event > m_currentEvent
Hold the current event.
Definition: wifi-phy.h:2131
static Time GetPhySigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:2016
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:4194
double m_txPowerMaxSiso
SISO maximum transmit power due to OBSS PD SR power restriction (dBm)
Definition: wifi-phy.h:2105
bool IsStateRx(void) const
Definition: wifi-phy.cc:4158
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:3640
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
Definition: wifi-phy.h:2117
std::vector< uint16_t > m_supportedChannelWidthSet
Supported channel width set (MHz)
Definition: wifi-phy.h:2122
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:3319
void SwitchMaybeToCcaBusy(void)
Check if PHY state should move to CCA busy state based on current state of interference tracker...
Definition: wifi-phy.cc:4206
void SetCcaEdThreshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:564
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported (deprecated)
Definition: wifi-phy.h:2110
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Definition: wifi-phy.cc:4315
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
Definition: wifi-phy.cc:4005
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. ...
Definition: wifi-phy.cc:2595
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3553
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
Definition: wifi-phy.h:2138
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:989
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1559
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
Definition: wifi-phy.h:2119
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3418
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1956
uint16_t m_initialFrequency
Store frequency until initialization (MHz)
Definition: wifi-phy.h:2086
Parameters for receive HE preamble.
Definition: wifi-phy.h:131
static Time CalculatePhyPreambleAndHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2519
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1666
Time GetGuardInterval(void) const
Definition: wifi-phy.cc:729