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 <map>
26 #include "ns3/callback.h"
27 #include "ns3/event-id.h"
28 #include "ns3/mobility-model.h"
29 #include "ns3/random-variable-stream.h"
30 #include "ns3/channel.h"
31 #include "wifi-phy-standard.h"
32 #include "interference-helper.h"
33 #include "ns3/node.h"
34 #include "ns3/string.h"
35 
36 namespace ns3 {
37 
38 #define HE_PHY 125
39 #define VHT_PHY 126
40 #define HT_PHY 127
41 
45 class WifiPhyStateHelper;
46 
50 class FrameCaptureModel;
51 
55 enum MpduType
57 {
64 };
65 
68 {
69  double signal;
70  double noise;
71 };
72 
74 struct MpduInfo
75 {
77  uint64_t mpduRefNumber;
78 };
79 
84 {
85 public:
86  virtual ~WifiPhyListener ();
87 
100  virtual void NotifyRxStart (Time duration) = 0;
106  virtual void NotifyRxEndOk (void) = 0;
112  virtual void NotifyRxEndError (void) = 0;
123  virtual void NotifyTxStart (Time duration, double txPowerDbm) = 0;
139  virtual void NotifyMaybeCcaBusyStart (Time duration) = 0;
147  virtual void NotifySwitchingStart (Time duration) = 0;
151  virtual void NotifySleep (void) = 0;
155  virtual void NotifyWakeup (void) = 0;
156 };
157 
158 
164 class WifiPhy : public Object
165 {
166 public:
170  enum State
172  {
184  TX,
188  RX,
197  };
198 
210  typedef Callback<void, Ptr<Packet>, double> RxErrorCallback;
211 
216  static TypeId GetTypeId (void);
217 
218  WifiPhy ();
219  virtual ~WifiPhy ();
220 
225  void SetReceiveOkCallback (RxOkCallback callback);
230  void SetReceiveErrorCallback (RxErrorCallback callback);
231 
238  void RegisterListener (WifiPhyListener *listener);
245  void UnregisterListener (WifiPhyListener *listener);
246 
255  double rxPowerW,
256  Time rxDuration);
257 
266  void StartReceivePacket (Ptr<Packet> packet,
267  WifiTxVector txVector,
268  MpduType mpdutype,
270 
279  void EndReceive (Ptr<Packet> packet, WifiPreamble preamble, MpduType mpdutype, Ptr<InterferenceHelper::Event> event);
280 
288  void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, MpduType mpdutype = NORMAL_MPDU);
289 
297  virtual void StartTx (Ptr<Packet> packet, WifiTxVector txVector, Time txDuration) = 0;
298 
302  void SetSleepMode (void);
306  void ResumeFromSleep (void);
307 
311  bool IsStateIdle (void);
315  bool IsStateCcaBusy (void);
319  bool IsStateBusy (void);
323  bool IsStateRx (void);
327  bool IsStateTx (void);
331  bool IsStateSwitching (void);
335  bool IsStateSleep (void);
339  Time GetStateDuration (void);
346  Time GetDelayUntilIdle (void);
347 
353  Time GetLastRxStartTime (void) const;
354 
362  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
372  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, uint8_t incFlag);
373 
380 
391  static WifiMode GetHtPlcpHeaderMode ();
395  static WifiMode GetVhtPlcpHeaderMode ();
399  static WifiMode GetHePlcpHeaderMode ();
405  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
411  static Time GetPlcpSigA1Duration (WifiPreamble preamble);
417  static Time GetPlcpSigA2Duration (WifiPreamble preamble);
423  static Time GetPlcpSigBDuration (WifiPreamble preamble);
429  static WifiMode GetPlcpHeaderMode (WifiTxVector txVector);
435  static Time GetPlcpHeaderDuration (WifiTxVector txVector);
441  static Time GetPlcpPreambleDuration (WifiTxVector txVector);
449  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
459  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, uint8_t incFlag);
460 
478  uint32_t GetNModes (void) const;
498  WifiMode GetMode (uint32_t mode) const;
507  bool IsModeSupported (WifiMode mode) const;
516  bool IsMcsSupported (WifiMode mcs) const;
517 
525  double CalculateSnr (WifiTxVector txVector, double ber) const;
526 
536  uint32_t GetNBssMembershipSelectors (void) const;
548  uint32_t GetBssMembershipSelector (uint32_t selector) const;
562  WifiModeList GetMembershipSelectorModes (uint32_t selector);
572  uint8_t GetNMcs (void) const;
584  WifiMode GetMcs (uint8_t mcs) const;
585 
598  virtual void SetChannelNumber (uint8_t id);
604  uint8_t GetChannelNumber (void) const;
608  Time GetChannelSwitchDelay (void) const;
609 
615  virtual void ConfigureStandard (WifiPhyStandard standard);
616 
622  WifiPhyStandard GetStandard (void) const;
623 
639  bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth);
640 
644  typedef std::pair<uint8_t, WifiPhyStandard> ChannelNumberStandardPair;
648  typedef std::pair<uint16_t, uint8_t> FrequencyWidthPair;
649 
655  virtual Ptr<Channel> GetChannel (void) const = 0;
656 
662  static WifiMode GetDsssRate1Mbps ();
668  static WifiMode GetDsssRate2Mbps ();
674  static WifiMode GetDsssRate5_5Mbps ();
680  static WifiMode GetDsssRate11Mbps ();
686  static WifiMode GetErpOfdmRate6Mbps ();
692  static WifiMode GetErpOfdmRate9Mbps ();
698  static WifiMode GetErpOfdmRate12Mbps ();
704  static WifiMode GetErpOfdmRate18Mbps ();
710  static WifiMode GetErpOfdmRate24Mbps ();
716  static WifiMode GetErpOfdmRate36Mbps ();
722  static WifiMode GetErpOfdmRate48Mbps ();
728  static WifiMode GetErpOfdmRate54Mbps ();
734  static WifiMode GetOfdmRate6Mbps ();
740  static WifiMode GetOfdmRate9Mbps ();
746  static WifiMode GetOfdmRate12Mbps ();
752  static WifiMode GetOfdmRate18Mbps ();
758  static WifiMode GetOfdmRate24Mbps ();
764  static WifiMode GetOfdmRate36Mbps ();
770  static WifiMode GetOfdmRate48Mbps ();
776  static WifiMode GetOfdmRate54Mbps ();
873 
879  static WifiMode GetHtMcs0 ();
885  static WifiMode GetHtMcs1 ();
891  static WifiMode GetHtMcs2 ();
897  static WifiMode GetHtMcs3 ();
903  static WifiMode GetHtMcs4 ();
909  static WifiMode GetHtMcs5 ();
915  static WifiMode GetHtMcs6 ();
921  static WifiMode GetHtMcs7 ();
927  static WifiMode GetHtMcs8 ();
933  static WifiMode GetHtMcs9 ();
939  static WifiMode GetHtMcs10 ();
945  static WifiMode GetHtMcs11 ();
951  static WifiMode GetHtMcs12 ();
957  static WifiMode GetHtMcs13 ();
963  static WifiMode GetHtMcs14 ();
969  static WifiMode GetHtMcs15 ();
975  static WifiMode GetHtMcs16 ();
981  static WifiMode GetHtMcs17 ();
987  static WifiMode GetHtMcs18 ();
993  static WifiMode GetHtMcs19 ();
999  static WifiMode GetHtMcs20 ();
1005  static WifiMode GetHtMcs21 ();
1011  static WifiMode GetHtMcs22 ();
1017  static WifiMode GetHtMcs23 ();
1023  static WifiMode GetHtMcs24 ();
1029  static WifiMode GetHtMcs25 ();
1035  static WifiMode GetHtMcs26 ();
1041  static WifiMode GetHtMcs27 ();
1047  static WifiMode GetHtMcs28 ();
1053  static WifiMode GetHtMcs29 ();
1059  static WifiMode GetHtMcs30 ();
1065  static WifiMode GetHtMcs31 ();
1066 
1072  static WifiMode GetVhtMcs0 ();
1078  static WifiMode GetVhtMcs1 ();
1084  static WifiMode GetVhtMcs2 ();
1090  static WifiMode GetVhtMcs3 ();
1096  static WifiMode GetVhtMcs4 ();
1102  static WifiMode GetVhtMcs5 ();
1108  static WifiMode GetVhtMcs6 ();
1114  static WifiMode GetVhtMcs7 ();
1120  static WifiMode GetVhtMcs8 ();
1126  static WifiMode GetVhtMcs9 ();
1127 
1133  static WifiMode GetHeMcs0 ();
1139  static WifiMode GetHeMcs1 ();
1145  static WifiMode GetHeMcs2 ();
1151  static WifiMode GetHeMcs3 ();
1157  static WifiMode GetHeMcs4 ();
1163  static WifiMode GetHeMcs5 ();
1169  static WifiMode GetHeMcs6 ();
1175  static WifiMode GetHeMcs7 ();
1181  static WifiMode GetHeMcs8 ();
1187  static WifiMode GetHeMcs9 ();
1193  static WifiMode GetHeMcs10 ();
1199  static WifiMode GetHeMcs11 ();
1200 
1209  static bool IsValidTxVector (WifiTxVector txVector);
1210 
1217  void NotifyTxBegin (Ptr<const Packet> packet);
1224  void NotifyTxEnd (Ptr<const Packet> packet);
1231  void NotifyTxDrop (Ptr<const Packet> packet);
1238  void NotifyRxBegin (Ptr<const Packet> packet);
1245  void NotifyRxEnd (Ptr<const Packet> packet);
1252  void NotifyRxDrop (Ptr<const Packet> packet);
1253 
1272  uint16_t channelFreqMhz,
1273  WifiTxVector txVector,
1274  MpduInfo aMpdu,
1275  SignalNoiseDbm signalNoise);
1276 
1297  uint16_t channelFreqMhz,
1298  WifiTxVector txVector,
1299  MpduInfo aMpdu,
1300  SignalNoiseDbm signalNoise);
1301 
1314  uint16_t channelFreqMhz,
1315  WifiTxVector txVector,
1316  MpduInfo aMpdu);
1317 
1330  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet,
1331  uint16_t channelFreqMhz,
1332  WifiTxVector txVector,
1333  MpduInfo aMpdu);
1334 
1343  virtual int64_t AssignStreams (int64_t stream);
1344 
1352  void SetEdThreshold (double threshold);
1358  double GetEdThreshold (void) const;
1364  double GetEdThresholdW (void) const;
1372  void SetCcaMode1Threshold (double threshold);
1378  double GetCcaMode1Threshold (void) const;
1384  void SetRxNoiseFigure (double noiseFigureDb);
1390  double GetRxNoiseFigure (void) const;
1396  void SetTxPowerStart (double start);
1402  double GetTxPowerStart (void) const;
1408  void SetTxPowerEnd (double end);
1414  double GetTxPowerEnd (void) const;
1422  void SetNTxPower (uint32_t n);
1428  uint32_t GetNTxPower (void) const;
1434  void SetTxGain (double gain);
1440  double GetTxGain (void) const;
1446  void SetRxGain (double gain);
1452  double GetRxGain (void) const;
1453 
1459  void SetDevice (const Ptr<NetDevice> device);
1465  Ptr<NetDevice> GetDevice (void) const;
1486  Ptr<MobilityModel> GetMobility (void) const;
1487 
1491  virtual void SetFrequency (uint16_t freq);
1495  uint16_t GetFrequency (void) const;
1499  void SetNumberOfAntennas (uint8_t antennas);
1503  uint8_t GetNumberOfAntennas (void) const;
1507  void SetMaxSupportedTxSpatialStreams (uint8_t streams);
1511  uint8_t GetMaxSupportedTxSpatialStreams (void) const;
1515  void SetMaxSupportedRxSpatialStreams (uint8_t streams);
1519  uint8_t GetMaxSupportedRxSpatialStreams (void) const;
1524  static bool Is2_4Ghz (double frequency);
1529  static bool Is5Ghz (double frequency);
1535  void SetShortGuardInterval (bool shortGuardInterval);
1541  bool GetShortGuardInterval (void) const;
1545  void SetGuardInterval (Time guardInterval);
1549  Time GetGuardInterval (void) const;
1554  void SetLdpc (bool ldpc);
1560  bool GetLdpc (void) const;
1566  void SetStbc (bool stbc);
1572  bool GetStbc (void) const;
1578  void SetGreenfield (bool greenfield);
1584  bool GetGreenfield (void) const;
1590  void SetShortPlcpPreambleSupported (bool preamble);
1596  bool GetShortPlcpPreambleSupported (void) const;
1597 
1603  void SetErrorRateModel (const Ptr<ErrorRateModel> rate);
1610 
1616  void SetFrameCaptureModel (const Ptr<FrameCaptureModel> rate);
1623 
1627  uint8_t GetChannelWidth (void) const;
1631  virtual void SetChannelWidth (uint8_t channelwidth);
1635  void AddSupportedChannelWidth (uint8_t channelwidth);
1639  std::vector<uint8_t> GetSupportedChannelWidthSet (void) const;
1640 
1649  double GetPowerDbm (uint8_t power) const;
1650 
1651 
1652 protected:
1653  // Inherited
1654  virtual void DoInitialize (void);
1655  virtual void DoDispose (void);
1656 
1666  bool DoChannelSwitch (uint8_t id);
1676  bool DoFrequencySwitch (uint16_t frequency);
1677 
1684  void SwitchMaybeToCcaBusy (void);
1685 
1689 
1690  uint16_t m_mpdusNum;
1694 
1697 
1698 private:
1714  void Configure80211a (void);
1719  void Configure80211b (void);
1724  void Configure80211g (void);
1729  void Configure80211_10Mhz (void);
1734  void Configure80211_5Mhz ();
1739  void ConfigureHolland (void);
1744  void Configure80211n (void);
1749  void Configure80211ac (void);
1754  void Configure80211ax (void);
1759  void ConfigureHtDeviceMcsSet (void);
1777 
1784  uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint8_t width) const;
1791  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const;
1792 
1797  void AbortCurrentReception (void);
1798 
1802  void MaybeCcaBusyDuration (void);
1803 
1814  void StartRx (Ptr<Packet> packet,
1815  WifiTxVector txVector,
1816  MpduType mpdutype,
1817  double rxPowerW,
1818  Time rxDuration,
1820 
1828 
1836 
1844 
1852 
1860 
1867 
1881 
1895 
1934 
1935  std::vector<uint32_t> m_bssMembershipSelectorSet;
1936 
1942  uint8_t m_channelWidth;
1943 
1946  double m_txGainDb;
1947  double m_rxGainDb;
1950  uint32_t m_nTxPower;
1951 
1952  bool m_ldpc;
1953  bool m_stbc;
1957 
1959 
1962 
1966 
1967  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
1968  static ChannelToFrequencyWidthMap m_channelToFrequencyWidth;
1969 
1970  std::vector<uint8_t> m_supportedChannelWidthSet;
1973 
1975  uint32_t m_totalAmpduSize;
1977 
1980 
1983 };
1984 
1990 std::ostream& operator<< (std::ostream& os, WifiPhy::State state);
1991 
1992 } //namespace ns3
1993 
1994 #endif /* WIFI_PHY_H */
MpduInfo structure.
Definition: wifi-phy.h:74
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:3349
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3003
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1851
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:1978
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:2694
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:2631
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1496
double signal
in dBm
Definition: wifi-phy.h:69
uint32_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1351
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:3439
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:644
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:2706
bool IsStateBusy(void)
Definition: wifi-phy.cc:3577
The MPDU is not part of an A-MPDU.
Definition: wifi-phy.h:59
uint8_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:1971
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:1947
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:3365
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:572
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
Definition: wifi-phy.cc:520
void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
Definition: wifi-phy.cc:657
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3528
Callback template class.
Definition: callback.h:1176
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:2757
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2904
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:2928
virtual void NotifyTxStart(Time duration, double txPowerDbm)=0
std::vector< uint8_t > m_supportedChannelWidthSet
Supported channel width.
Definition: wifi-phy.h:1970
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:1880
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:1946
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2967
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:3301
virtual void NotifyWakeup(void)=0
Notify listeners that we woke up.
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
Definition: wifi-phy.cc:2488
virtual ~WifiPhy()
Definition: wifi-phy.cc:398
void SetLdpc(bool ldpc)
Enable or disable LDPC.
Definition: wifi-phy.cc:591
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:2592
bool m_ldpc
Flag if LDPC is used.
Definition: wifi-phy.h:1952
void ResumeFromSleep(void)
Resume from sleep mode.
Definition: wifi-phy.cc:1638
bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:624
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
Definition: wifi-phy.cc:3423
802.11 PHY layer model
Definition: wifi-phy.h:164
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:2682
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:565
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy.h:180
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
Definition: wifi-phy.cc:1027
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:3098
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:404
def start()
Definition: core.py:1790
Forward calls to a chain of Callback.
void SetStbc(bool stbc)
Enable or disable STBC.
Definition: wifi-phy.cc:604
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1733
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:3341
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:3218
std::vector< uint32_t > m_bssMembershipSelectorSet
the BSS membership selector set
Definition: wifi-phy.h:1935
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1345
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:3154
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:2769
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1859
void EndReceive(Ptr< Packet > packet, WifiPreamble preamble, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
Definition: wifi-phy.cc:2541
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:434
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:3290
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:3210
uint8_t m_channelWidth
Channel width.
Definition: wifi-phy.h:1942
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:3282
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:3122
void StartReceivePreambleAndHeader(Ptr< Packet > packet, double rxPowerW, Time rxDuration)
Starting receiving the plcp of a packet (i.e.
Definition: wifi-phy.cc:2374
The MPDU is the last aggregate in an A-MPDU.
Definition: wifi-phy.h:63
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
Definition: wifi-phy.cc:708
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:3250
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2943
The PHY layer is sleeping.
Definition: wifi-phy.h:196
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:3178
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:3234
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
Definition: wifi-phy.cc:637
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2856
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:2829
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:682
void UnregisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:446
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:512
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
Definition: wifi-phy.cc:3415
void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, MpduType mpdutype=NORMAL_MPDU)
Definition: wifi-phy.cc:2316
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for holland.
Definition: wifi-phy.cc:909
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:3553
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:2280
uint64_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1693
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:879
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:3106
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:3186
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:2268
virtual void SetFrequency(uint16_t freq)
Definition: wifi-phy.cc:1213
Ptr< FrameCaptureModel > GetFrameCaptureModel(void) const
Return the frame capture model this PHY is using.
Definition: wifi-phy.cc:720
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:3333
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:3258
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:1894
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1270
std::vector< uint8_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1428
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3515
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:2805
uint8_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:1972
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:3357
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2991
bool GetStbc(void) const
Return whether STBC is supported.
Definition: wifi-phy.cc:611
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:3325
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:756
uint32_t GetBssMembershipSelector(uint32_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1357
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1748
virtual void NotifySwitchingStart(Time duration)=0
WifiModeList m_deviceMcsSet
the device MCS set
Definition: wifi-phy.h:1933
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:1939
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:670
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:3170
bool GetLdpc(void) const
Return if LDPC is supported.
Definition: wifi-phy.cc:598
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:2730
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
Definition: wifi-phy.h:1690
static bool Is2_4Ghz(double frequency)
Definition: wifi-phy.cc:1276
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:3274
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:3130
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:2298
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2262
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
void SetNTxPower(uint32_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
Definition: wifi-phy.cc:552
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
the channel to frequency width map
Definition: wifi-phy.h:1968
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:726
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
Definition: wifi-phy.cc:493
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1763
virtual void NotifyRxEndOk(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1554
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > rate)
Sets the frame capture model.
Definition: wifi-phy.cc:714
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:3058
tuple mobility
Definition: third.py:101
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:1979
virtual void StartTx(Ptr< Packet > packet, WifiTxVector txVector, Time txDuration)=0
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1910
receive notifications about phy events.
Definition: wifi-phy.h:83
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:1843
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:2304
bool m_shortPreamble
Flag if short PLCP preamble is supported.
Definition: wifi-phy.h:1956
bool IsStateTx(void)
Definition: wifi-phy.cc:3589
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
Definition: wifi-phy.cc:3407
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:1330
static Time GetPlcpSigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1778
The PHY layer is IDLE.
Definition: wifi-phy.h:176
EventId m_endPlcpRxEvent
the end PLCP receive event
Definition: wifi-phy.h:1696
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:3138
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:2718
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2240
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:539
Time GetGuardInterval(void) const
Definition: wifi-phy.cc:651
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2892
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Definition: wifi-phy.cc:3471
Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:3613
The PHY layer is receiving a packet.
Definition: wifi-phy.h:188
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1866
uint8_t m_numberOfTransmitters
Number of transmitters (DEPRECATED)
Definition: wifi-phy.h:1960
double m_edThresholdW
Energy detection threshold in watts.
Definition: wifi-phy.h:1944
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:894
void StartReceivePacket(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
Starting receiving the payload of a packet (i.e.
Definition: wifi-phy.cc:2503
virtual ~WifiPhyListener()
Definition: wifi-phy.cc:43
uint64_t mpduRefNumber
MPDU ref number.
Definition: wifi-phy.h:77
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:2286
The PHY layer is sending a packet.
Definition: wifi-phy.h:184
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:2781
uint32_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3541
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2880
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3015
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:1296
WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
Definition: wifi-phy.cc:1363
The PHY layer is switching to other channel.
Definition: wifi-phy.h:192
void AbortCurrentReception(void)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
Definition: wifi-phy.cc:3642
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1827
uint32_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:559
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:3309
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:2817
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:701
virtual void NotifySleep(void)=0
Notify listeners that we went to sleep.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
Definition: wifi-phy.cc:3455
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:3042
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:3559
Callback< void, Ptr< Packet >, double > RxErrorCallback
arg1: packet received unsuccessfully arg2: snr of packet
Definition: wifi-phy.h:210
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy.cc:155
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetChannelWidth(uint8_t channelwidth)
Definition: wifi-phy.cc:1296
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:546
Time m_guardInterval
Supported HE guard interval.
Definition: wifi-phy.h:1958
bool IsStateIdle(void)
Definition: wifi-phy.cc:3571
static bool IsValidTxVector(WifiTxVector txVector)
The standard disallows certain combinations of WifiMode, number of spatial streams, and channel widths.
Definition: wifi-phy.cc:3479
uint64_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1692
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:2793
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
Definition: wifi-phy.cc:3391
std::pair< uint16_t, uint8_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
Definition: wifi-phy.h:648
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
Definition: wifi-phy.cc:630
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:3146
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
Definition: wifi-phy.cc:3383
double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:750
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
Definition: wifi-phy.cc:3463
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:3202
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
Definition: wifi-phy.cc:3399
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:3082
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1338
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:499
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:3619
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:3317
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1434
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Definition: wifi-phy.cc:1442
bool IsStateCcaBusy(void)
Definition: wifi-phy.cc:3565
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:2619
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:1007
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:415
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2955
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:251
WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:1937
void SetGuardInterval(Time guardInterval)
Definition: wifi-phy.cc:643
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:2658
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:2274
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1687
Time GetStateDuration(void)
Definition: wifi-phy.cc:3607
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
Definition: wifi-phy.h:1964
virtual void NotifyRxStart(Time duration)=0
virtual void NotifyRxEndError(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1332
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:452
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Definition: wifi-phy.h:1982
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:676
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:578
uint8_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1304
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:852
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:428
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:2646
void RegisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:440
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1097
static bool Is5Ghz(double frequency)
Definition: wifi-phy.cc:1286
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1324
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:2670
bool m_plcpSuccess
Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received.
Definition: wifi-phy.h:1691
bool m_greenfield
Flag if GreenField format is supported.
Definition: wifi-phy.h:1954
EventId m_endRxEvent
the end reeive event
Definition: wifi-phy.h:1695
bool IsStateSleep(void)
Definition: wifi-phy.cc:3601
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1688
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:480
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:2292
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:990
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:526
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:1948
An identifier for simulation events.
Definition: event-id.h:53
bool IsStateSwitching(void)
Definition: wifi-phy.cc:3595
SignalNoiseDbm structure.
Definition: wifi-phy.h:67
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:1941
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:3194
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1686
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:1938
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:3090
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:921
static WifiMode GetVhtPlcpHeaderMode()
Definition: wifi-phy.cc:1674
double m_totalAmpduNumSymbols
Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the ...
Definition: wifi-phy.h:1976
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:3266
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:3114
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:688
Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:744
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:3074
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:3242
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Definition: wifi-phy.cc:3447
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:863
static WifiMode GetHePlcpHeaderMode()
Definition: wifi-phy.cc:1680
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1052
void SetSleepMode(void)
Put in sleep mode.
Definition: wifi-phy.cc:1606
uint32_t m_totalAmpduSize
Total size of the previously transmitted MPDUs in an A-MPDU, used for the computation of the number o...
Definition: wifi-phy.h:1975
double noise
in dBm
Definition: wifi-phy.h:70
void StartRx(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr< InterferenceHelper::Event > event)
Starting receiving the packet after having detected the medium is idle or after a reception switch...
Definition: wifi-phy.cc:3660
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:1932
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:2310
Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:1964
void SetNumberOfAntennas(uint8_t antennas)
Definition: wifi-phy.cc:1310
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:3050
Callback< void, Ptr< Packet >, double, WifiTxVector > RxOkCallback
arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preambl...
Definition: wifi-phy.h:205
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:3226
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:2604
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:3373
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1147
void AddSupportedChannelWidth(uint8_t channelwidth)
Definition: wifi-phy.cc:1413
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2868
double GetEdThresholdW(void) const
Return the energy detection threshold.
Definition: wifi-phy.cc:487
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:1949
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1318
The MPDU is part of an A-MPDU, but is not the last aggregate.
Definition: wifi-phy.h:61
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
Definition: wifi-phy.cc:664
State
The state of the PHY layer.
Definition: wifi-phy.h:171
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
Definition: wifi-phy.cc:1795
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1686
Ptr< InterferenceHelper::Event > m_currentEvent
Hold the current event.
Definition: wifi-phy.h:1981
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2916
MpduType type
type
Definition: wifi-phy.h:76
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:1974
bool IsStateRx(void)
Definition: wifi-phy.cc:3583
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3027
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:1945
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:506
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint8_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:1069
uint8_t m_numberOfAntennas
Number of transmitters.
Definition: wifi-phy.h:1963
static Time GetPlcpHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1841
a unique identifier for an interface.
Definition: type-id.h:58
MpduType
This enumeration defines the type of an MPDU.
Definition: wifi-phy.h:56
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
Definition: wifi-phy.cc:3162
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:3066
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
Definition: wifi-phy.h:1965
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:2745
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
Definition: wifi-phy.cc:3625
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported.
Definition: wifi-phy.h:1955
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1207
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:585
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:3736
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
Definition: wifi-phy.cc:3431
static WifiMode GetHtPlcpHeaderMode()
Definition: wifi-phy.cc:1668
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:533
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2979
uint32_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:1950
bool m_stbc
Flag if STBC is used.
Definition: wifi-phy.h:1953
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:837
uint8_t m_numberOfReceivers
Number of receivers (DEPRECATED)
Definition: wifi-phy.h:1961
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
Definition: wifi-phy.h:1967
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2844
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1835
uint16_t m_initialFrequency
Store frequency until initialization.
Definition: wifi-phy.h:1940
WifiMode GetMode(uint32_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3547
virtual void NotifyMaybeCcaBusyStart(Time duration)=0
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1502