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,
66 };
67 
70 {
71  double signal;
72  double noise;
73 };
74 
76 struct MpduInfo
77 {
79  uint32_t mpduRefNumber;
80 };
81 
84 {
85  double rssiW;
86  uint8_t bssColor;
87 };
88 
94 class WifiPhy : public Object
95 {
96 public:
101  static TypeId GetTypeId (void);
102 
103  WifiPhy ();
104  virtual ~WifiPhy ();
105 
111  Ptr<WifiPhyStateHelper> GetState (void) const;
112 
117  void SetReceiveOkCallback (RxOkCallback callback);
123 
130  void RegisterListener (WifiPhyListener *listener);
137  void UnregisterListener (WifiPhyListener *listener);
138 
143 
150  void StartReceivePreamble (Ptr<WifiPpdu> ppdu, double rxPowerW);
151 
158  void StartReceiveHeader (Ptr<Event> event, Time headerPayloadDuration);
159 
165  void ContinueReceiveHeader (Ptr<Event> event);
166 
172  void StartReceivePayload (Ptr<Event> event);
173 
179  void EndReceive (Ptr<Event> event);
180 
185  void EndReceiveInterBss (void);
186 
193  void Send (Ptr<const WifiPsdu> psdu, WifiTxVector txVector);
194 
198  virtual void StartTx (Ptr<WifiPpdu> ppdu) = 0;
199 
203  void SetSleepMode (void);
207  void ResumeFromSleep (void);
211  void SetOffMode (void);
215  void ResumeFromOff (void);
216 
220  bool IsStateIdle (void) const;
224  bool IsStateCcaBusy (void) const;
228  bool IsStateRx (void) const;
232  bool IsStateTx (void) const;
236  bool IsStateSwitching (void) const;
240  bool IsStateSleep (void) const;
244  bool IsStateOff (void) const;
245 
252  Time GetDelayUntilIdle (void);
253 
259  Time GetLastRxStartTime (void) const;
260 
268  static Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
269 
280  static Time GetPreambleDetectionDuration (void);
291  static WifiMode GetHtPlcpHeaderMode ();
295  static WifiMode GetVhtPlcpHeaderMode ();
299  static WifiMode GetHePlcpHeaderMode ();
305  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
311  static Time GetPlcpSigA1Duration (WifiPreamble preamble);
317  static Time GetPlcpSigA2Duration (WifiPreamble preamble);
323  static Time GetPlcpSigBDuration (WifiPreamble preamble);
329  static WifiMode GetPlcpHeaderMode (WifiTxVector txVector);
335  static Time GetPlcpHeaderDuration (WifiTxVector txVector);
341  static Time GetPlcpPreambleDuration (WifiTxVector txVector);
350  static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype = NORMAL_MPDU);
366  static Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols);
372  static Time GetStartOfPacketDuration (WifiTxVector txVector);
373 
391  uint8_t GetNModes (void) const;
411  WifiMode GetMode (uint8_t mode) const;
420  bool IsModeSupported (WifiMode mode) const;
429  bool IsMcsSupported (WifiMode mcs) const;
439  bool IsMcsSupported (WifiModulationClass mc, uint8_t mcs) const;
440 
448  double CalculateSnr (WifiTxVector txVector, double ber) const;
449 
459  uint8_t GetNBssMembershipSelectors (void) const;
471  uint8_t GetBssMembershipSelector (uint8_t selector) const;
481  uint8_t GetNMcs (void) const;
493  WifiMode GetMcs (uint8_t mcs) const;
504  WifiMode GetMcs (WifiModulationClass modulation, uint8_t mcs) const;
514  WifiMode GetHtMcs (uint8_t mcs) const;
524  WifiMode GetVhtMcs (uint8_t mcs) const;
534  WifiMode GetHeMcs (uint8_t mcs) const;
535 
548  virtual void SetChannelNumber (uint8_t id);
554  uint8_t GetChannelNumber (void) const;
558  Time GetChannelSwitchDelay (void) const;
559 
565  virtual void ConfigureStandard (WifiPhyStandard standard);
566 
572  WifiPhyStandard GetStandard (void) const;
573 
589  bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth);
590 
594  typedef std::pair<uint8_t, WifiPhyStandard> ChannelNumberStandardPair;
598  typedef std::pair<uint16_t, uint16_t> FrequencyWidthPair;
599 
605  virtual Ptr<Channel> GetChannel (void) const = 0;
606 
612  static WifiMode GetDsssRate1Mbps ();
618  static WifiMode GetDsssRate2Mbps ();
624  static WifiMode GetDsssRate5_5Mbps ();
630  static WifiMode GetDsssRate11Mbps ();
636  static WifiMode GetErpOfdmRate6Mbps ();
642  static WifiMode GetErpOfdmRate9Mbps ();
648  static WifiMode GetErpOfdmRate12Mbps ();
654  static WifiMode GetErpOfdmRate18Mbps ();
660  static WifiMode GetErpOfdmRate24Mbps ();
666  static WifiMode GetErpOfdmRate36Mbps ();
672  static WifiMode GetErpOfdmRate48Mbps ();
678  static WifiMode GetErpOfdmRate54Mbps ();
684  static WifiMode GetOfdmRate6Mbps ();
690  static WifiMode GetOfdmRate9Mbps ();
696  static WifiMode GetOfdmRate12Mbps ();
702  static WifiMode GetOfdmRate18Mbps ();
708  static WifiMode GetOfdmRate24Mbps ();
714  static WifiMode GetOfdmRate36Mbps ();
720  static WifiMode GetOfdmRate48Mbps ();
726  static WifiMode GetOfdmRate54Mbps ();
823 
829  static WifiMode GetHtMcs0 ();
835  static WifiMode GetHtMcs1 ();
841  static WifiMode GetHtMcs2 ();
847  static WifiMode GetHtMcs3 ();
853  static WifiMode GetHtMcs4 ();
859  static WifiMode GetHtMcs5 ();
865  static WifiMode GetHtMcs6 ();
871  static WifiMode GetHtMcs7 ();
877  static WifiMode GetHtMcs8 ();
883  static WifiMode GetHtMcs9 ();
889  static WifiMode GetHtMcs10 ();
895  static WifiMode GetHtMcs11 ();
901  static WifiMode GetHtMcs12 ();
907  static WifiMode GetHtMcs13 ();
913  static WifiMode GetHtMcs14 ();
919  static WifiMode GetHtMcs15 ();
925  static WifiMode GetHtMcs16 ();
931  static WifiMode GetHtMcs17 ();
937  static WifiMode GetHtMcs18 ();
943  static WifiMode GetHtMcs19 ();
949  static WifiMode GetHtMcs20 ();
955  static WifiMode GetHtMcs21 ();
961  static WifiMode GetHtMcs22 ();
967  static WifiMode GetHtMcs23 ();
973  static WifiMode GetHtMcs24 ();
979  static WifiMode GetHtMcs25 ();
985  static WifiMode GetHtMcs26 ();
991  static WifiMode GetHtMcs27 ();
997  static WifiMode GetHtMcs28 ();
1003  static WifiMode GetHtMcs29 ();
1009  static WifiMode GetHtMcs30 ();
1015  static WifiMode GetHtMcs31 ();
1016 
1022  static WifiMode GetVhtMcs0 ();
1028  static WifiMode GetVhtMcs1 ();
1034  static WifiMode GetVhtMcs2 ();
1040  static WifiMode GetVhtMcs3 ();
1046  static WifiMode GetVhtMcs4 ();
1052  static WifiMode GetVhtMcs5 ();
1058  static WifiMode GetVhtMcs6 ();
1064  static WifiMode GetVhtMcs7 ();
1070  static WifiMode GetVhtMcs8 ();
1076  static WifiMode GetVhtMcs9 ();
1077 
1083  static WifiMode GetHeMcs0 ();
1089  static WifiMode GetHeMcs1 ();
1095  static WifiMode GetHeMcs2 ();
1101  static WifiMode GetHeMcs3 ();
1107  static WifiMode GetHeMcs4 ();
1113  static WifiMode GetHeMcs5 ();
1119  static WifiMode GetHeMcs6 ();
1125  static WifiMode GetHeMcs7 ();
1131  static WifiMode GetHeMcs8 ();
1137  static WifiMode GetHeMcs9 ();
1143  static WifiMode GetHeMcs10 ();
1149  static WifiMode GetHeMcs11 ();
1150 
1158  void NotifyTxBegin (Ptr<const WifiPsdu> psdu, double txPowerW);
1165  void NotifyTxEnd (Ptr<const WifiPsdu> psdu);
1172  void NotifyTxDrop (Ptr<const WifiPsdu> psdu);
1179  void NotifyRxBegin (Ptr<const WifiPsdu> psdu);
1186  void NotifyRxEnd (Ptr<const WifiPsdu> psdu);
1195 
1216  uint16_t channelFreqMhz,
1217  WifiTxVector txVector,
1218  SignalNoiseDbm signalNoise,
1219  std::vector<bool> statusPerMpdu);
1220 
1241  uint16_t channelFreqMhz,
1242  WifiTxVector txVector,
1243  MpduInfo aMpdu,
1244  SignalNoiseDbm signalNoise);
1245 
1259  uint16_t channelFreqMhz,
1260  WifiTxVector txVector);
1261 
1274  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet,
1275  uint16_t channelFreqMhz,
1276  WifiTxVector txVector,
1277  MpduInfo aMpdu);
1278 
1286  typedef void (* PsduTxBeginCallback)(Ptr<const WifiPsdu> psdu, WifiTxVector txVector, double txPowerW);
1287 
1294 
1302 
1311  virtual int64_t AssignStreams (int64_t stream);
1312 
1322  void SetEdThreshold (double threshold);
1330  void SetRxSensitivity (double threshold);
1336  double GetRxSensitivity (void) const;
1344  void SetCcaEdThreshold (double threshold);
1350  double GetCcaEdThreshold (void) const;
1356  void SetRxNoiseFigure (double noiseFigureDb);
1362  void SetTxPowerStart (double start);
1368  double GetTxPowerStart (void) const;
1374  void SetTxPowerEnd (double end);
1380  double GetTxPowerEnd (void) const;
1388  void SetNTxPower (uint8_t n);
1394  uint8_t GetNTxPower (void) const;
1400  void SetTxGain (double gain);
1406  double GetTxGain (void) const;
1412  void SetRxGain (double gain);
1418  double GetRxGain (void) const;
1419 
1425  void SetDevice (const Ptr<NetDevice> device);
1431  Ptr<NetDevice> GetDevice (void) const;
1452  Ptr<MobilityModel> GetMobility (void) const;
1453 
1457  virtual void SetFrequency (uint16_t freq);
1461  uint16_t GetFrequency (void) const;
1465  void SetNumberOfAntennas (uint8_t antennas);
1469  uint8_t GetNumberOfAntennas (void) const;
1473  void SetMaxSupportedTxSpatialStreams (uint8_t streams);
1477  uint8_t GetMaxSupportedTxSpatialStreams (void) const;
1481  void SetMaxSupportedRxSpatialStreams (uint8_t streams);
1485  uint8_t GetMaxSupportedRxSpatialStreams (void) const;
1493  void SetShortGuardInterval (bool shortGuardInterval);
1501  bool GetShortGuardInterval (void) const;
1507  void SetGuardInterval (Time guardInterval);
1513  Time GetGuardInterval (void) const;
1521  void SetGreenfield (bool greenfield);
1529  bool GetGreenfield (void) const;
1535  void SetShortPlcpPreambleSupported (bool preamble);
1541  bool GetShortPlcpPreambleSupported (void) const;
1542 
1548  void SetErrorRateModel (const Ptr<ErrorRateModel> rate);
1566  void SetFrameCaptureModel (const Ptr<FrameCaptureModel> frameCaptureModel);
1572  void SetPreambleDetectionModel (const Ptr<PreambleDetectionModel> preambleDetectionModel);
1578  void SetWifiRadioEnergyModel (const Ptr<WifiRadioEnergyModel> wifiRadioEnergyModel);
1579 
1583  uint16_t GetChannelWidth (void) const;
1587  virtual void SetChannelWidth (uint16_t channelwidth);
1591  void AddSupportedChannelWidth (uint16_t channelwidth);
1595  std::vector<uint16_t> GetSupportedChannelWidthSet (void) const;
1596 
1605  double GetPowerDbm (uint8_t power) const;
1606 
1614  void ResetCca (bool powerRestricted, double txPowerMaxSiso = 0, double txPowerMaxMimo = 0);
1621  double GetTxPowerForTransmission (WifiTxVector txVector) const;
1629  void NotifyChannelAccessRequested (void);
1630 
1631 
1632 protected:
1633  // Inherited
1634  virtual void DoInitialize (void);
1635  virtual void DoDispose (void);
1636 
1646  bool DoChannelSwitch (uint8_t id);
1656  bool DoFrequencySwitch (uint16_t frequency);
1657 
1664  void SwitchMaybeToCcaBusy (void);
1665 
1669 
1672 
1676 
1677 
1678 private:
1694  void Configure80211a (void);
1699  void Configure80211b (void);
1704  void Configure80211g (void);
1709  void Configure80211_10Mhz (void);
1714  void Configure80211_5Mhz ();
1719  void ConfigureHolland (void);
1724  void Configure80211n (void);
1729  void Configure80211ac (void);
1734  void Configure80211ax (void);
1739  void ConfigureHtDeviceMcsSet (void);
1745  void PushMcs (WifiMode mode);
1749  void RebuildMcsMap (void);
1767 
1774  uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const;
1781  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const;
1782 
1789 
1793  void MaybeCcaBusyDuration (void);
1794 
1801  void StartRx (Ptr<Event> event, double rxPowerW);
1812  std::pair<bool, SignalNoiseDbm> GetReceptionStatus (Ptr<const WifiPsdu> psdu,
1813  Ptr<Event> event,
1814  Time relativeMpduStart,
1815  Time mpduDuration);
1816 
1831 
1839 
1847 
1855 
1863 
1870 
1884 
1898 
1905 
1944  std::map<WifiModulationClass, std::map<uint8_t /* MCS value */, uint8_t /* index */>> m_mcsIndexMap;
1946 
1947  std::vector<uint8_t> m_bssMembershipSelectorSet;
1948 
1954  uint16_t m_channelWidth;
1955 
1958  double m_txGainDb;
1959  double m_rxGainDb;
1962  uint8_t m_nTxPower;
1963 
1968 
1972 
1974 
1978 
1979  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
1981 
1982  std::vector<uint16_t> m_supportedChannelWidthSet;
1985 
1987 
1990 
1997 
1999 };
2000 
2001 } //namespace ns3
2002 
2003 #endif /* WIFI_PHY_H */
MpduInfo structure.
Definition: wifi-phy.h:76
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:3745
void NotifyRxDrop(Ptr< const WifiPsdu > psdu, WifiPhyRxfailureReason reason)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:2465
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3399
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1854
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:1988
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:3090
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:585
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1670
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:3027
bool IsStateSwitching(void) const
Definition: wifi-phy.cc:3992
bool IsStateOff(void) const
Definition: wifi-phy.cc:4004
double signal
in dBm
Definition: wifi-phy.h:71
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:3835
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:594
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:3102
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:578
uint8_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:1983
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:1959
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1153
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:3761
void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
Definition: wifi-phy.cc:711
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:611
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3875
WifiMode GetHeMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the HE modulation class.
Definition: wifi-phy.cc:3962
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:3153
double GetCcaEdThreshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:538
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3300
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:3324
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo, SignalNoiseDbm > m_phyMonitorSniffRxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being received...
Definition: wifi-phy.h:1883
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:1958
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:3932
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3363
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:3697
void AbortCurrentReception(WifiPhyRxfailureReason reason)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
Definition: wifi-phy.cc:4039
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
Definition: wifi-phy.cc:2785
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1305
virtual ~WifiPhy()
Definition: wifi-phy.cc:412
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:2988
void ResumeFromOff(void)
Resume from off mode.
Definition: wifi-phy.cc:1742
Ptr< WifiPhyStateHelper > GetState(void) const
Return the WifiPhyStateHelper of this PHY.
Definition: wifi-phy.cc:448
void ResumeFromSleep(void)
Resume from sleep mode.
Definition: wifi-phy.cc:1712
double m_rxSensitivityW
Receive sensitivity threshold in watts.
Definition: wifi-phy.h:1956
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
Definition: wifi-phy.cc:664
bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:633
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
Definition: wifi-phy.cc:3819
802.11 PHY layer model
Definition: wifi-phy.h:94
Time m_timeLastPreambleDetected
Record the time the last preamble was detected.
Definition: wifi-phy.h:1996
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:3078
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:591
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
Definition: wifi-phy.cc:1124
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:3494
void SetRxSensitivity(double threshold)
Sets the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:518
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:418
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:1005
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:1830
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1846
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:3737
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1445
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:3614
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:3550
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:3165
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1862
bool IsStateCcaBusy(void) const
Definition: wifi-phy.cc:3968
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:460
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:3686
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:3606
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:3678
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
Definition: wifi-phy.h:1947
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:2936
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:3518
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:3646
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3339
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:3574
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:3630
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3252
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:3225
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:748
void UnregisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:472
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:544
WifiMode GetVhtMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the VHT modulation class.
Definition: wifi-phy.cc:3956
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
Definition: wifi-phy.cc:3811
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for holland.
Definition: wifi-phy.cc:980
bool IsStateIdle(void) const
Definition: wifi-phy.cc:3974
void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
Definition: wifi-phy.cc:617
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
Definition: wifi-phy.cc:950
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:1869
std::pair< uint16_t, uint16_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
Definition: wifi-phy.h:598
uint8_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:1962
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:3502
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:3582
double GetTxPowerForTransmission(WifiTxVector txVector) const
Compute the transmit power (in dBm) for the next transmission.
Definition: wifi-phy.cc:4074
virtual void SetFrequency(uint16_t freq)
Definition: wifi-phy.cc:1311
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:3729
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:3654
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
Definition: wifi-phy.cc:781
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:4062
void(* EndOfHePreambleCallback)(HePreambleParameters params)
TracedCallback signature for end of HE-SIG-A events.
Definition: wifi-phy.h:1301
TracedCallback< Ptr< const Packet >, uint16_t, WifiTxVector, MpduInfo > m_phyMonitorSniffTxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being transmitted...
Definition: wifi-phy.h:1897
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:3201
uint8_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:1984
void NotifyRxEnd(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:2456
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:3753
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3387
bool IsStateSleep(void) const
Definition: wifi-phy.cc:3998
void NotifyEndOfHePreamble(HePreambleParameters params)
Public method used to fire a EndOfHePreamble trace once both HE SIG fields have been received...
Definition: wifi-phy.cc:2530
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:3721
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:829
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1861
MpduType
The type of an MPDU.
double GetRxSensitivity(void) const
Return the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:525
void NotifyTxEnd(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:2429
WifiModeList m_deviceMcsSet
the device MCS set
Definition: wifi-phy.h:1943
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:1951
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:724
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
Definition: wifi-phy.cc:718
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:3566
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1388
bool m_powerRestricted
Flag whether transmit power is restricted by OBSS PD SR.
Definition: wifi-phy.h:1964
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:3126
void AddSupportedChannelWidth(uint16_t channelwidth)
Definition: wifi-phy.cc:1457
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:3670
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:3526
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:3926
static Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2412
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:1980
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:85
uint8_t bssColor
BSS color.
Definition: wifi-phy.h:86
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1878
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1606
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:3454
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:1989
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:4095
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2051
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:1846
double m_txPowerMaxMimo
MIMO maximum transmit power due to OBSS PD SR power restriction.
Definition: wifi-phy.h:1966
bool m_shortPreamble
Flag if short PLCP preamble is supported.
Definition: wifi-phy.h:1971
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
Definition: wifi-phy.cc:3803
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:1274
static Time GetPlcpSigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1895
EventId m_endPlcpRxEvent
the end of PLCP receive event
Definition: wifi-phy.h:1674
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:3534
Ptr< WifiRadioEnergyModel > m_wifiRadioEnergyModel
Wifi radio energy model.
Definition: wifi-phy.h:1994
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:3114
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2398
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:565
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
Definition: wifi-phy.cc:787
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3288
WifiMode GetHtMcs(uint8_t mcs) const
Get the WifiMode object corresponding to the given MCS of the HT modulation class.
Definition: wifi-phy.cc:3950
void NotifyChannelAccessRequested(void)
Notify the PHY that an access to the channel was requested.
Definition: wifi-phy.cc:2979
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Definition: wifi-phy.cc:3867
Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:4010
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1671
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:965
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1478
TracedCallback< HePreambleParameters > m_phyEndOfHePreambleTrace
A trace source that indiates the end of both HE SIG fields as well as training fields for received 80...
Definition: wifi-phy.h:1904
double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:823
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:3177
void SetCapabilitiesChangedCallback(Callback< void > callback)
Definition: wifi-phy.cc:478
void SetOffMode(void)
Put in off mode.
Definition: wifi-phy.cc:1700
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3276
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3411
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:1240
Ptr< PreambleDetectionModel > m_preambleDetectionModel
Preamble detection model.
Definition: wifi-phy.h:1993
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:799
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:3705
EventId m_endPreambleDetectionEvent
the end of preamble detection event
Definition: wifi-phy.h:1675
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:3213
void NotifyRxBegin(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:2447
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:767
void StartReceivePreamble(Ptr< WifiPpdu > ppdu, double rxPowerW)
Start receiving the PHY preamble of a PPDU (i.e.
Definition: wifi-phy.cc:2687
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
Definition: wifi-phy.cc:3851
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:3438
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:754
static Time GetPreambleDetectionDuration(void)
Definition: wifi-phy.cc:1791
void SetPostReceptionErrorModel(const Ptr< ErrorModel > em)
Attach a receive ErrorModel to the WifiPhy.
Definition: wifi-phy.cc:774
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy.cc:162
Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:817
void ContinueReceiveHeader(Ptr< Event > event)
Continue receiving the PHY header of a PPDU (i.e.
Definition: wifi-phy.cc:2663
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:793
Time m_guardInterval
Supported HE guard interval (deprecated)
Definition: wifi-phy.h:1973
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1368
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1402
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:3189
void NotifyTxDrop(Ptr< const WifiPsdu > psdu)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:2438
void(* PsduTxBeginCallback)(Ptr< const WifiPsdu > psdu, WifiTxVector txVector, double txPowerW)
TracedCallback signature for PSDU transmit events.
Definition: wifi-phy.h:1286
virtual void SetChannelWidth(uint16_t channelwidth)
Definition: wifi-phy.cc:1374
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
Definition: wifi-phy.cc:3787
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:1823
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:648
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:3542
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
Definition: wifi-phy.cc:3779
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
Definition: wifi-phy.cc:3859
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:3598
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
Definition: wifi-phy.cc:3795
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:3478
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1427
double m_ccaEdThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:1957
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:3713
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Definition: wifi-phy.cc:1486
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:3015
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:1104
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:435
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3351
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1540
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:250
WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:1949
void SetGuardInterval(Time guardInterval)
Definition: wifi-phy.cc:679
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint16_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:1170
bool m_channelAccessRequested
Flag if channels access has been requested (used for OBSS_PD SR)
Definition: wifi-phy.h:1967
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:3054
void EndReceive(Ptr< Event > event)
The last symbol of the PPDU has arrived.
Definition: wifi-phy.cc:2864
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1667
static Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype=NORMAL_MPDU)
Definition: wifi-phy.cc:2120
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
Definition: wifi-phy.h:1976
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:559
Ptr< ErrorModel > m_postReceptionErrorModel
Error model for receive packet events.
Definition: wifi-phy.h:1995
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:484
std::vector< uint16_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1472
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3914
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Definition: wifi-phy.h:1992
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:604
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:923
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:454
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3920
uint16_t m_channelWidth
Channel width.
Definition: wifi-phy.h:1954
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:3042
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1451
void RegisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:466
bool IsStateTx(void) const
Definition: wifi-phy.cc:3986
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1198
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1408
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:3066
bool m_greenfield
Flag if GreenField format is supported (deprecated)
Definition: wifi-phy.h:1969
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:1673
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1668
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:512
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:1087
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:552
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:1960
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3888
An identifier for simulation events.
Definition: event-id.h:53
SignalNoiseDbm structure.
Definition: wifi-phy.h:69
uint32_t mpduRefNumber
MPDU ref number.
Definition: wifi-phy.h:79
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:1953
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:3590
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1666
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:1950
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:3486
void NotifyTxBegin(Ptr< const WifiPsdu > psdu, double txPowerW)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:2420
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:1017
void PushMcs(WifiMode mode)
Add the given MCS to the device MCS set.
Definition: wifi-phy.cc:992
WifiPhyRxfailureReason
Enumeration of the possible reeception failure reasons.
Definition: wifi-phy.h:53
static WifiMode GetVhtPlcpHeaderMode()
Definition: wifi-phy.cc:1779
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:3662
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:572
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:3510
void EndReceiveInterBss(void)
For HE receptions only, check and possibly modify the transmit power restriction state at the end of ...
Definition: wifi-phy.cc:2969
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:3470
void StartReceivePayload(Ptr< Event > event)
Start receiving the PSDU (i.e.
Definition: wifi-phy.cc:2800
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:3638
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Definition: wifi-phy.cc:3843
void Send(Ptr< const WifiPsdu > psdu, WifiTxVector txVector)
Definition: wifi-phy.cc:2536
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:934
static WifiMode GetHePlcpHeaderMode()
Definition: wifi-phy.cc:1785
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:742
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:2505
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:598
void StartReceiveHeader(Ptr< Event > event, Time headerPayloadDuration)
Start receiving the PHY header of a PPDU (i.e.
Definition: wifi-phy.cc:2619
void SetSleepMode(void)
Put in sleep mode.
Definition: wifi-phy.cc:1666
double noise
in dBm
Definition: wifi-phy.h:72
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:1942
void SetNumberOfAntennas(uint8_t antennas)
Definition: wifi-phy.cc:1394
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:3446
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:1945
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:3622
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:3000
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:3769
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1248
static Time GetStartOfPacketDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2045
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3264
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:1961
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
Definition: wifi-phy.cc:1909
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1797
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3312
MpduType type
type
Definition: wifi-phy.h:78
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:1986
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3423
uint8_t m_numberOfAntennas
Number of transmitters.
Definition: wifi-phy.h:1975
static Time GetPlcpHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1973
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1421
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:3558
Ptr< Event > m_currentEvent
Hold the current event.
Definition: wifi-phy.h:1991
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:4016
double m_txPowerMaxSiso
SISO maximum transmit power due to OBSS PD SR power restriction.
Definition: wifi-phy.h:1965
bool IsStateRx(void) const
Definition: wifi-phy.cc:3980
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:3462
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
Definition: wifi-phy.h:1977
std::vector< uint16_t > m_supportedChannelWidthSet
Supported channel width.
Definition: wifi-phy.h:1982
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:3141
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
Definition: wifi-phy.cc:4022
void SetCcaEdThreshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:531
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported (deprecated)
Definition: wifi-phy.h:1970
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:4131
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
Definition: wifi-phy.cc:3827
static WifiMode GetHtPlcpHeaderMode()
Definition: wifi-phy.cc:1773
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:2474
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3375
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
Definition: wifi-phy.h:1998
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:908
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1439
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
Definition: wifi-phy.h:1979
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3240
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1838
uint16_t m_initialFrequency
Store frequency until initialization.
Definition: wifi-phy.h:1952
Parameters for receive HE preamble.
Definition: wifi-phy.h:83
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1546
Time GetGuardInterval(void) const
Definition: wifi-phy.cc:696