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 <stdint.h>
26 #include <map>
27 #include "ns3/callback.h"
28 #include "ns3/event-id.h"
29 #include "ns3/packet.h"
30 #include "ns3/object.h"
31 #include "ns3/nstime.h"
32 #include "ns3/ptr.h"
33 #include "ns3/mobility-model.h"
34 #include "ns3/random-variable-stream.h"
35 #include "wifi-mode.h"
36 #include "wifi-preamble.h"
37 #include "wifi-phy-standard.h"
38 #include "ns3/traced-callback.h"
39 #include "wifi-tx-vector.h"
40 #include "wifi-phy-standard.h"
41 #include "interference-helper.h"
42 #include "ns3/net-device.h"
43 #include "ns3/node.h"
44 #include "wifi-channel.h"
45 
46 namespace ns3 {
47 
48 #define VHT_PHY 126
49 #define HT_PHY 127
50 
51 class WifiPhyStateHelper;
52 
57 {
64 };
65 
67 {
68  double signal; //in dBm
69  double noise; //in dBm
70 };
71 
72 struct mpduInfo
73 {
74  enum mpduType type;
75  uint32_t mpduRefNumber;
76 };
77 
82 {
83 public:
84  virtual ~WifiPhyListener ();
85 
98  virtual void NotifyRxStart (Time duration) = 0;
104  virtual void NotifyRxEndOk (void) = 0;
110  virtual void NotifyRxEndError (void) = 0;
121  virtual void NotifyTxStart (Time duration, double txPowerDbm) = 0;
137  virtual void NotifyMaybeCcaBusyStart (Time duration) = 0;
145  virtual void NotifySwitchingStart (Time duration) = 0;
149  virtual void NotifySleep (void) = 0;
153  virtual void NotifyWakeup (void) = 0;
154 };
155 
156 
162 class WifiPhy : public Object
163 {
164 public:
168  enum State
169  {
181  TX,
185  RX,
194  };
195 
207  typedef Callback<void, Ptr<Packet>, double> RxErrorCallback;
208 
209  static TypeId GetTypeId (void);
210 
211  WifiPhy ();
212  virtual ~WifiPhy ();
213 
218  virtual void SetReceiveOkCallback (RxOkCallback callback) = 0;
223  virtual void SetReceiveErrorCallback (RxErrorCallback callback) = 0;
224 
232  virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, enum WifiPreamble preamble) = 0;
241  virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, enum WifiPreamble preamble, enum mpduType mpdutype) = 0;
242 
249  virtual void RegisterListener (WifiPhyListener *listener) = 0;
256  virtual void UnregisterListener (WifiPhyListener *listener) = 0;
257 
261  virtual void SetSleepMode (void) = 0;
265  virtual void ResumeFromSleep (void) = 0;
266 
270  virtual bool IsStateIdle (void);
274  virtual bool IsStateCcaBusy (void);
278  virtual bool IsStateBusy (void);
282  virtual bool IsStateRx (void);
286  virtual bool IsStateTx (void);
290  virtual bool IsStateSwitching (void);
294  virtual bool IsStateSleep (void);
298  virtual Time GetStateDuration (void);
305  virtual Time GetDelayUntilIdle (void);
306 
312  virtual Time GetLastRxStartTime (void) const;
313 
322  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency);
333  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency, enum mpduType mpdutype, uint8_t incFlag);
334 
341  Time CalculatePlcpPreambleAndHeaderDuration (WifiTxVector txVector, enum WifiPreamble preamble);
342 
349  static Time GetPlcpHtTrainingSymbolDuration (WifiPreamble preamble, WifiTxVector txVector);
356  static WifiMode GetHtPlcpHeaderMode (WifiMode payloadMode);
362  static WifiMode GetVhtPlcpHeaderMode (WifiMode payloadMode);
368  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
374  static Time GetPlcpVhtSigA1Duration (WifiPreamble preamble);
380  static Time GetPlcpVhtSigA2Duration (WifiPreamble preamble);
386  static Time GetPlcpVhtSigBDuration (WifiPreamble preamble);
394  static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txVector);
401  static Time GetPlcpHeaderDuration (WifiTxVector txVector, WifiPreamble preamble);
408  static Time GetPlcpPreambleDuration (WifiTxVector txVector, WifiPreamble preamble);
417  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency);
428  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency, enum mpduType mpdutype, uint8_t incFlag);
429 
447  virtual uint32_t GetNModes (void) const;
467  virtual WifiMode GetMode (uint32_t mode) const;
476  virtual bool IsModeSupported (WifiMode mode) const;
485  virtual bool IsMcsSupported (WifiMode mcs) const;
486 
494  virtual double CalculateSnr (WifiTxVector txVector, double ber) const;
495 
505  virtual uint32_t GetNBssMembershipSelectors (void) const;
517  virtual uint32_t GetBssMembershipSelector (uint32_t selector) const;
531  virtual WifiModeList GetMembershipSelectorModes (uint32_t selector);
541  virtual uint8_t GetNMcs (void) const;
553  virtual WifiMode GetMcs (uint8_t mcs) const;
554 
567  virtual void SetChannelNumber (uint16_t id);
573  virtual uint16_t GetChannelNumber (void) const;
577  virtual Time GetChannelSwitchDelay (void) const;
578 
584  virtual void ConfigureStandard (enum WifiPhyStandard standard);
585 
591  virtual enum WifiPhyStandard GetStandard (void) const;
592 
608  bool DefineChannelNumber (uint16_t channelNumber, enum WifiPhyStandard standard, uint32_t frequency, uint32_t channelWidth);
609 
613  typedef std::pair<uint16_t, enum WifiPhyStandard> ChannelNumberStandardPair;
617  typedef std::pair<uint32_t, uint32_t> FrequencyWidthPair;
618 
624  virtual Ptr<WifiChannel> GetChannel (void) const = 0;
625 
631  static WifiMode GetDsssRate1Mbps ();
637  static WifiMode GetDsssRate2Mbps ();
643  static WifiMode GetDsssRate5_5Mbps ();
649  static WifiMode GetDsssRate11Mbps ();
655  static WifiMode GetErpOfdmRate6Mbps ();
661  static WifiMode GetErpOfdmRate9Mbps ();
667  static WifiMode GetErpOfdmRate12Mbps ();
673  static WifiMode GetErpOfdmRate18Mbps ();
679  static WifiMode GetErpOfdmRate24Mbps ();
685  static WifiMode GetErpOfdmRate36Mbps ();
691  static WifiMode GetErpOfdmRate48Mbps ();
697  static WifiMode GetErpOfdmRate54Mbps ();
703  static WifiMode GetOfdmRate6Mbps ();
709  static WifiMode GetOfdmRate9Mbps ();
715  static WifiMode GetOfdmRate12Mbps ();
721  static WifiMode GetOfdmRate18Mbps ();
727  static WifiMode GetOfdmRate24Mbps ();
733  static WifiMode GetOfdmRate36Mbps ();
739  static WifiMode GetOfdmRate48Mbps ();
745  static WifiMode GetOfdmRate54Mbps ();
842 
848  static WifiMode GetHtMcs0 ();
854  static WifiMode GetHtMcs1 ();
860  static WifiMode GetHtMcs2 ();
866  static WifiMode GetHtMcs3 ();
872  static WifiMode GetHtMcs4 ();
878  static WifiMode GetHtMcs5 ();
884  static WifiMode GetHtMcs6 ();
890  static WifiMode GetHtMcs7 ();
896  static WifiMode GetHtMcs8 ();
902  static WifiMode GetHtMcs9 ();
908  static WifiMode GetHtMcs10 ();
914  static WifiMode GetHtMcs11 ();
920  static WifiMode GetHtMcs12 ();
926  static WifiMode GetHtMcs13 ();
932  static WifiMode GetHtMcs14 ();
938  static WifiMode GetHtMcs15 ();
944  static WifiMode GetHtMcs16 ();
950  static WifiMode GetHtMcs17 ();
956  static WifiMode GetHtMcs18 ();
962  static WifiMode GetHtMcs19 ();
968  static WifiMode GetHtMcs20 ();
974  static WifiMode GetHtMcs21 ();
980  static WifiMode GetHtMcs22 ();
986  static WifiMode GetHtMcs23 ();
992  static WifiMode GetHtMcs24 ();
998  static WifiMode GetHtMcs25 ();
1004  static WifiMode GetHtMcs26 ();
1010  static WifiMode GetHtMcs27 ();
1016  static WifiMode GetHtMcs28 ();
1022  static WifiMode GetHtMcs29 ();
1028  static WifiMode GetHtMcs30 ();
1034  static WifiMode GetHtMcs31 ();
1035 
1041  static WifiMode GetVhtMcs0 ();
1047  static WifiMode GetVhtMcs1 ();
1053  static WifiMode GetVhtMcs2 ();
1059  static WifiMode GetVhtMcs3 ();
1065  static WifiMode GetVhtMcs4 ();
1071  static WifiMode GetVhtMcs5 ();
1077  static WifiMode GetVhtMcs6 ();
1083  static WifiMode GetVhtMcs7 ();
1089  static WifiMode GetVhtMcs8 ();
1095  static WifiMode GetVhtMcs9 ();
1104  static bool IsValidTxVector (WifiTxVector txVector);
1105 
1112  void NotifyTxBegin (Ptr<const Packet> packet);
1119  void NotifyTxEnd (Ptr<const Packet> packet);
1126  void NotifyTxDrop (Ptr<const Packet> packet);
1133  void NotifyRxBegin (Ptr<const Packet> packet);
1140  void NotifyRxEnd (Ptr<const Packet> packet);
1147  void NotifyRxDrop (Ptr<const Packet> packet);
1148 
1170  void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz,
1171  uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,
1172  WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise);
1173 
1197  typedef void (* MonitorSnifferRxCallback)(Ptr<const Packet> packet, uint16_t channelFreqMhz,
1198  uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,
1199  WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise);
1200 
1216  void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz,
1217  uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,
1218  WifiTxVector txVector, struct mpduInfo aMpdu);
1219 
1236  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet, uint16_t channelFreqMhz,
1237  uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,
1238  WifiTxVector txVector, struct mpduInfo aMpdu);
1239 
1248  virtual int64_t AssignStreams (int64_t stream);
1249 
1257  void SetEdThreshold (double threshold);
1263  double GetEdThreshold (void) const;
1269  double GetEdThresholdW (void) const;
1277  void SetCcaMode1Threshold (double threshold);
1283  double GetCcaMode1Threshold (void) const;
1289  void SetRxNoiseFigure (double noiseFigureDb);
1295  double GetRxNoiseFigure (void) const;
1301  void SetTxPowerStart (double start);
1307  virtual double GetTxPowerStart (void) const;
1313  void SetTxPowerEnd (double end);
1319  virtual double GetTxPowerEnd (void) const;
1327  void SetNTxPower (uint32_t n);
1333  virtual uint32_t GetNTxPower (void) const;
1339  void SetTxGain (double gain);
1345  double GetTxGain (void) const;
1351  void SetRxGain (double gain);
1357  double GetRxGain (void) const;
1363  void SetDevice (Ptr<NetDevice> device);
1369  Ptr<NetDevice> GetDevice (void) const;
1391 
1395  virtual void SetFrequency (uint32_t freq);
1399  virtual uint32_t GetFrequency (void) const;
1403  virtual void SetNumberOfTransmitAntennas (uint32_t tx);
1407  virtual uint32_t GetNumberOfTransmitAntennas (void) const;
1411  virtual void SetNumberOfReceiveAntennas (uint32_t rx);
1415  virtual uint32_t GetNumberOfReceiveAntennas (void) const;
1416 
1422  virtual void SetGuardInterval (bool guardInterval);
1428  virtual bool GetGuardInterval (void) const;
1433  virtual void SetLdpc (bool ldpc);
1439  virtual bool GetLdpc (void) const;
1445  virtual void SetStbc (bool stbc);
1451  virtual bool GetStbc (void) const;
1457  virtual void SetGreenfield (bool greenfield);
1463  virtual bool GetGreenfield (void) const;
1469  virtual void SetShortPlcpPreambleSupported (bool preamble);
1475  virtual bool GetShortPlcpPreambleSupported (void) const;
1476 
1489 
1493  virtual uint32_t GetChannelWidth (void) const;
1497  virtual void SetChannelWidth (uint32_t channelwidth);
1501  virtual void AddSupportedChannelWidth (uint32_t channelwidth);
1505  virtual std::vector<uint32_t> GetSupportedChannelWidthSet (void) const;
1509  virtual uint8_t GetSupportedRxSpatialStreams (void) const;
1513  virtual uint8_t GetSupportedTxSpatialStreams (void) const;
1521  double DbmToW (double dbm) const;
1529  double DbToRatio (double db) const;
1537  double WToDbm (double w) const;
1545  double RatioToDb (double ratio) const;
1546 
1547 protected:
1548  // Inherited
1549  virtual void DoInitialize (void);
1550  virtual void DoDispose (void);
1551 
1561  virtual bool DoChannelSwitch (uint16_t id);
1571  virtual bool DoFrequencySwitch (uint32_t frequency);
1572 
1581  double GetPowerDbm (uint8_t power) const;
1582 
1586 
1587  uint16_t m_mpdusNum;
1591 
1594 
1595 private:
1611  void Configure80211a (void);
1616  void Configure80211b (void);
1621  void Configure80211g (void);
1626  void Configure80211_10Mhz (void);
1631  void Configure80211_5Mhz ();
1632  void ConfigureHolland (void);
1637  void Configure80211n (void);
1642  void Configure80211ac (void);
1647  void ConfigureHtDeviceMcsSet (void);
1655  virtual void ConfigureDefaultsForStandard (enum WifiPhyStandard standard);
1664  virtual void ConfigureChannelForStandard (enum WifiPhyStandard standard);
1665 
1672  uint16_t FindChannelNumberForFrequencyWidth (uint32_t frequency, uint32_t width) const;
1679  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint16_t channelNumber, enum WifiPhyStandard standard) const;
1680 
1688 
1696 
1704 
1712 
1720 
1727 
1740  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t,
1742 
1755  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t,
1757 
1796 
1797  std::vector<uint32_t> m_bssMembershipSelectorSet;
1798 
1804  uint32_t m_channelWidth;
1805 
1808  double m_txGainDb;
1809  double m_rxGainDb;
1812  uint32_t m_nTxPower;
1813 
1814  bool m_ldpc;
1815  bool m_stbc;
1819 
1822 
1823  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
1824  static ChannelToFrequencyWidthMap m_channelToFrequencyWidth;
1825 
1826  std::vector<uint32_t> m_supportedChannelWidthSet;
1827  uint16_t m_channelNumber;
1829 
1831  uint32_t m_totalAmpduSize;
1833 
1836 };
1837 
1843 std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state);
1844 
1845 } //namespace ns3
1846 
1847 #endif /* WIFI_PHY_H */
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:2756
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2410
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1711
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:1834
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:2101
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1589
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:2038
virtual Ptr< WifiChannel > GetChannel(void) const =0
Return the WifiChannel this WifiPhy is connected to.
virtual uint32_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1200
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
virtual bool DoFrequencySwitch(uint32_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1341
void SetDevice(Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:598
void(* MonitorSnifferTxCallback)(const Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu)
TracedCallback signature for monitor mode transmit events.
Definition: wifi-phy.h:1236
std::vector< uint32_t > m_supportedChannelWidthSet
Supported channel width.
Definition: wifi-phy.h:1826
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:2113
virtual void SetNumberOfTransmitAntennas(uint32_t tx)
Definition: wifi-phy.cc:1163
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:1990
virtual bool IsStateBusy(void)
Definition: wifi-phy.cc:2912
double RatioToDb(double ratio) const
Convert from ratio to dB.
Definition: wifi-phy.cc:2894
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:1809
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:2772
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:514
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
Definition: wifi-phy.cc:462
virtual void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
Definition: wifi-phy.cc:585
virtual bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:2837
Callback template class.
Definition: callback.h:1176
uint16_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:1827
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:2164
virtual bool GetGuardInterval(void) const
Return whether guard interval is being used.
Definition: wifi-phy.cc:579
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2311
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:2335
virtual void NotifyTxStart(Time duration, double txPowerDbm)=0
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:1808
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2374
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:2708
virtual void NotifyWakeup(void)=0
Notify listeners that we woke up.
virtual ~WifiPhy()
Definition: wifi-phy.cc:365
virtual void SetLdpc(bool ldpc)
Enable or disable LDPC.
Definition: wifi-phy.cc:533
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:1999
bool m_ldpc
Flag if LDPC is used.
Definition: wifi-phy.h:1814
virtual bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:566
enum mpduType type
Definition: wifi-phy.h:74
802.11 PHY layer model
Definition: wifi-phy.h:162
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:2089
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:507
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy.h:177
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:2505
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:371
static WifiMode GetHtPlcpHeaderMode(WifiMode payloadMode)
Definition: wifi-phy.cc:1347
def start()
Definition: core.py:1482
Forward calls to a chain of Callback.
virtual void SetStbc(bool stbc)
Enable or disable STBC.
Definition: wifi-phy.cc:546
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1405
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:2748
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:2625
std::vector< uint32_t > m_bssMembershipSelectorSet
Definition: wifi-phy.h:1797
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:2561
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:2176
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1719
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:2697
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:2617
uint32_t m_numberOfReceivers
Number of receivers.
Definition: wifi-phy.h:1821
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:2689
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:2529
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
Definition: wifi-phy.cc:635
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:2657
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2350
Callback< void, Ptr< Packet >, double, WifiTxVector, enum WifiPreamble > RxOkCallback
arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preambl...
Definition: wifi-phy.h:202
virtual void SetNumberOfReceiveAntennas(uint32_t rx)
Definition: wifi-phy.cc:1170
The PHY layer is sleeping.
Definition: wifi-phy.h:193
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:2585
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:2641
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2263
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:2236
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:455
void ConfigureHolland(void)
Definition: wifi-phy.cc:812
virtual 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:2862
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:1960
virtual void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
Definition: wifi-phy.cc:559
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
Definition: wifi-phy.cc:782
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:2513
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:2593
virtual void SetGuardInterval(bool guardInterval)
Enable or disable short/long guard interval.
Definition: wifi-phy.cc:572
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:1948
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:2740
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:2665
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
virtual bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:2824
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:2212
Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, WifiPreamble preamble, double frequency)
Definition: wifi-phy.cc:1623
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:2764
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2398
virtual bool GetStbc(void) const
Return whether STBC is supported.
Definition: wifi-phy.cc:553
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:2732
virtual void RegisterListener(WifiPhyListener *listener)=0
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:1984
virtual uint32_t GetBssMembershipSelector(uint32_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1206
virtual void NotifySwitchingStart(Time duration)=0
WifiModeList m_deviceMcsSet
Definition: wifi-phy.h:1795
virtual void ResumeFromSleep(void)=0
Resume from sleep mode.
static WifiMode GetVhtPlcpHeaderMode(WifiMode payloadMode)
Definition: wifi-phy.cc:1353
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:2577
virtual bool GetLdpc(void) const
Return if LDPC is supported.
Definition: wifi-phy.cc:540
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:2137
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
Definition: wifi-phy.h:1587
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:2681
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:2537
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:1978
virtual uint32_t GetNumberOfReceiveAntennas(void) const
Definition: wifi-phy.cc:1182
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:494
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
This table maintains the mapping of valid ChannelNumber to Frequency/ChannelWidth pairs...
Definition: wifi-phy.h:1824
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:641
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
Definition: wifi-phy.cc:436
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo, struct signalNoiseDbm > m_phyMonitorSniffRxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being received...
Definition: wifi-phy.h:1741
virtual void NotifyRxEndOk(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
The MPDU is not part of an A-MPDU.
Definition: wifi-phy.h:59
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:2465
tuple mobility
Definition: third.py:101
virtual uint16_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1329
virtual void SetReceiveErrorCallback(RxErrorCallback callback)=0
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:1835
Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector, enum WifiPreamble preamble)
Definition: wifi-phy.cc:1921
uint32_t mpduRefNumber
Definition: wifi-phy.h:75
bool DefineChannelNumber(uint16_t channelNumber, enum WifiPhyStandard standard, uint32_t frequency, uint32_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:930
receive notifications about phy events.
Definition: wifi-phy.h:81
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:1703
virtual void AddSupportedChannelWidth(uint32_t channelwidth)
Definition: wifi-phy.cc:1246
bool m_shortPreamble
Flag if short PLCP preamble is supported.
Definition: wifi-phy.h:1818
virtual bool IsStateTx(void)
Definition: wifi-phy.cc:2924
virtual void SetChannelWidth(uint32_t channelwidth)
Definition: wifi-phy.cc:1149
static WifiMode GetPlcpHeaderMode(WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txVector)
Definition: wifi-phy.cc:1462
The PHY layer is IDLE.
Definition: wifi-phy.h:173
EventId m_endPlcpRxEvent
Definition: wifi-phy.h:1593
std::pair< uint32_t, uint32_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
Definition: wifi-phy.h:617
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:2545
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:2125
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:481
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2299
virtual Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:2948
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency)
Definition: wifi-phy.cc:1942
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1590
The PHY layer is receiving a packet.
Definition: wifi-phy.h:185
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1726
double m_edThresholdW
Energy detection threshold in watts.
Definition: wifi-phy.h:1806
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:797
virtual ~WifiPhyListener()
Definition: wifi-phy.cc:47
virtual uint32_t GetFrequency(void) const
Definition: wifi-phy.cc:1143
uint16_t FindChannelNumberForFrequencyWidth(uint32_t frequency, uint32_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:947
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:1966
The PHY layer is sending a packet.
Definition: wifi-phy.h:181
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:2188
virtual uint32_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:2850
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2287
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2422
virtual void SetChannelNumber(uint16_t id)
Set channel number.
Definition: wifi-phy.cc:1275
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
Definition: wifi-phy.cc:1212
std::pair< uint16_t, enum WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:613
The PHY layer is switching to other channel.
Definition: wifi-phy.h:189
virtual bool DoChannelSwitch(uint16_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1335
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1687
The MPDU is part of an A-MPDU, but is not the last aggregate.
Definition: wifi-phy.h:61
virtual uint32_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:501
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:2716
virtual void ConfigureDefaultsForStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:671
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:2224
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 GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:2449
virtual 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:2868
Callback< void, Ptr< Packet >, double > RxErrorCallback
arg1: packet received unsuccessfully arg2: snr of packet
Definition: wifi-phy.h:207
virtual uint32_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1157
static TypeId GetTypeId(void)
Definition: wifi-phy.cc:160
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:488
virtual bool IsStateIdle(void)
Definition: wifi-phy.cc:2906
virtual void UnregisterListener(WifiPhyListener *listener)=0
static bool IsValidTxVector(WifiTxVector txVector)
The standard disallows certain combinations of WifiMode, number of spatial streams, and channel widths.
Definition: wifi-phy.cc:2788
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo > m_phyMonitorSniffTxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being transmitted...
Definition: wifi-phy.h:1756
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:2200
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:2553
virtual double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:665
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:2609
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:2489
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:442
virtual Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:2954
void SetMobility(Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:610
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:2724
virtual bool IsStateCcaBusy(void)
Definition: wifi-phy.cc:2900
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:2026
Ptr< MobilityModel > GetMobility(void)
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:616
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:910
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:382
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2362
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:226
static Time GetPlcpVhtSigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1420
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:2065
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:1954
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1584
virtual Time GetStateDuration(void)
Definition: wifi-phy.cc:2942
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...
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:395
virtual void ConfigureStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1026
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:604
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:520
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:755
virtual std::vector< uint32_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1261
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:2053
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:2077
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:1588
bool m_greenfield
Flag if GreenField format is supported.
Definition: wifi-phy.h:1816
EventId m_endRxEvent
Definition: wifi-phy.h:1592
virtual void ConfigureChannelForStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:975
virtual bool IsStateSleep(void)
Definition: wifi-phy.cc:2936
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1585
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:423
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:1972
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:893
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:468
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:1810
An identifier for simulation events.
Definition: event-id.h:53
virtual bool IsStateSwitching(void)
Definition: wifi-phy.cc:2930
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:1803
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:2601
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1583
enum WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:1799
virtual uint8_t GetSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1194
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:1800
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:2497
virtual uint32_t GetNumberOfTransmitAntennas(void) const
Definition: wifi-phy.cc:1176
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:824
void(* MonitorSnifferRxCallback)(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
TracedCallback signature for monitor mode receive events.
Definition: wifi-phy.h:1197
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:1832
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:2673
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint16_t channelNumber, enum WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1267
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:2521
virtual void SetSleepMode(void)=0
Put in sleep mode.
virtual void SetReceiveOkCallback(RxOkCallback callback)=0
virtual void SetFrequency(uint32_t freq)
Definition: wifi-phy.cc:1086
static Time GetPlcpHeaderDuration(WifiTxVector txVector, WifiPreamble preamble)
Definition: wifi-phy.cc:1507
uint32_t m_channelCenterFrequency
Center frequency in MHz.
Definition: wifi-phy.h:1801
virtual Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:659
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:2481
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:2649
uint32_t m_initialFrequency
Store frequency until initialization.
Definition: wifi-phy.h:1802
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:766
double WToDbm(double w) const
Convert from Watts to dBm.
Definition: wifi-phy.cc:2888
uint32_t m_channelWidth
Channel width.
Definition: wifi-phy.h:1804
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:1831
virtual void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble)=0
virtual uint8_t GetSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1188
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:1794
double DbmToW(double dbm) const
Convert from dBm to Watts.
Definition: wifi-phy.cc:2881
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:2457
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:2633
A base class which provides memory management and object aggregation.
Definition: object.h:87
virtual enum WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1080
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2Mbps.
Definition: wifi-phy.cc:2011
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:2780
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2275
double GetEdThresholdW(void) const
Return the energy detection threshold.
Definition: wifi-phy.cc:430
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:1811
virtual bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
Definition: wifi-phy.cc:592
State
The state of the PHY layer.
Definition: wifi-phy.h:168
static Time GetPlcpHtTrainingSymbolDuration(WifiPreamble preamble, WifiTxVector txVector)
Definition: wifi-phy.cc:1359
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2323
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:1830
static Time GetPlcpVhtSigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1448
virtual bool IsStateRx(void)
Definition: wifi-phy.cc:2918
uint32_t m_numberOfTransmitters
Number of transmitters.
Definition: wifi-phy.h:1820
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2434
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:1807
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:449
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:2569
static Time GetPlcpPreambleDuration(WifiTxVector txVector, WifiPreamble preamble)
Definition: wifi-phy.cc:1571
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:2473
uint16_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:1828
double DbToRatio(double db) const
Convert from dB to ratio.
Definition: wifi-phy.cc:2874
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:2152
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:527
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:2960
virtual double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:475
static Time GetPlcpVhtSigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1434
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:2386
uint32_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:1812
bool m_stbc
Flag if STBC is used.
Definition: wifi-phy.h:1815
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:740
mpduType
This enumeration defines the type of an MPDU.
Definition: wifi-phy.h:56
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:629
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
Definition: wifi-phy.h:1823
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2251
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1695
bool m_guardInterval
Flag if short guard interval is used.
Definition: wifi-phy.h:1817
virtual WifiMode GetMode(uint32_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:2856
virtual void NotifyMaybeCcaBusyStart(Time duration)=0
The MPDU is the last aggregate in an A-MPDU.
Definition: wifi-phy.h:63