A Discrete-Event Network Simulator
API
wifi-phy.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  * Sébastien Deronne <sebastien.deronne@gmail.com>
20  */
21 
22 #ifndef WIFI_PHY_H
23 #define WIFI_PHY_H
24 
25 #include "ns3/event-id.h"
26 #include "ns3/deprecated.h"
27 #include "ns3/error-model.h"
28 #include "wifi-mpdu-type.h"
29 #include "wifi-phy-standard.h"
30 #include "interference-helper.h"
31 #include "wifi-phy-state-helper.h"
32 
33 namespace ns3 {
34 
35 #define HE_PHY 125
36 #define VHT_PHY 126
37 #define HT_PHY 127
38 
39 class Channel;
40 class NetDevice;
41 class MobilityModel;
42 class WifiPhyStateHelper;
43 class FrameCaptureModel;
44 class PreambleDetectionModel;
45 class WifiRadioEnergyModel;
46 class UniformRandomVariable;
47 
48 typedef enum
49 {
50  UNKNOWN = 0,
62 
65 {
66  double signal;
67  double noise;
68 };
69 
71 struct MpduInfo
72 {
74  uint32_t mpduRefNumber;
75 };
76 
77 // Parameters for receive HE preamble
79 {
80  double rssiW;
81  uint8_t bssColor;
82 };
83 
89 class WifiPhy : public Object
90 {
91 public:
96  static TypeId GetTypeId (void);
97 
98  WifiPhy ();
99  virtual ~WifiPhy ();
100 
106  Ptr<WifiPhyStateHelper> GetState (void) const;
107 
112  void SetReceiveOkCallback (RxOkCallback callback);
118 
125  void RegisterListener (WifiPhyListener *listener);
132  void UnregisterListener (WifiPhyListener *listener);
133 
138 
146  void StartReceivePreamble (Ptr<Packet> packet, double rxPowerW, Time rxDuration);
147 
154  void StartReceiveHeader (Ptr<Event> event, Time rxDuration);
155 
161  void ContinueReceiveHeader (Ptr<Event> event);
162 
168  void StartReceivePayload (Ptr<Event> event);
169 
175  void EndReceive (Ptr<Event> event);
176 
181  void EndReceiveInterBss (void);
182 
189  void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector);
190 
198  virtual void StartTx (Ptr<Packet> packet, WifiTxVector txVector, Time txDuration) = 0;
199 
203  void SetSleepMode (void);
207  void ResumeFromSleep (void);
211  void SetOffMode (void);
215  void ResumeFromOff (void);
216 
220  bool IsStateIdle (void) const;
224  bool IsStateCcaBusy (void) const;
228  bool IsStateRx (void) const;
232  bool IsStateTx (void) const;
236  bool IsStateSwitching (void) const;
240  bool IsStateSleep (void) const;
244  bool IsStateOff (void) const;
245 
252  Time GetDelayUntilIdle (void);
253 
259  Time GetLastRxStartTime (void) const;
260 
268  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
278  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency,
279  MpduType mpdutype, uint8_t incFlag);
280 
291  static Time GetPreambleDetectionDuration (void);
302  static WifiMode GetHtPlcpHeaderMode ();
306  static WifiMode GetVhtPlcpHeaderMode ();
310  static WifiMode GetHePlcpHeaderMode ();
316  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
322  static Time GetPlcpSigA1Duration (WifiPreamble preamble);
328  static Time GetPlcpSigA2Duration (WifiPreamble preamble);
334  static Time GetPlcpSigBDuration (WifiPreamble preamble);
340  static WifiMode GetPlcpHeaderMode (WifiTxVector txVector);
346  static Time GetPlcpHeaderDuration (WifiTxVector txVector);
352  static Time GetPlcpPreambleDuration (WifiTxVector txVector);
360  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
370  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, uint8_t incFlag);
376  static Time GetStartOfPacketDuration (WifiTxVector txVector);
377 
395  uint8_t GetNModes (void) const;
415  WifiMode GetMode (uint8_t mode) const;
424  bool IsModeSupported (WifiMode mode) const;
433  bool IsMcsSupported (WifiMode mcs) const;
434 
442  double CalculateSnr (WifiTxVector txVector, double ber) const;
443 
453  uint8_t GetNBssMembershipSelectors (void) const;
465  uint8_t GetBssMembershipSelector (uint8_t selector) const;
475  uint8_t GetNMcs (void) const;
487  WifiMode GetMcs (uint8_t mcs) const;
488 
501  virtual void SetChannelNumber (uint8_t id);
507  uint8_t GetChannelNumber (void) const;
511  Time GetChannelSwitchDelay (void) const;
512 
518  virtual void ConfigureStandard (WifiPhyStandard standard);
519 
525  WifiPhyStandard GetStandard (void) const;
526 
542  bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth);
543 
547  typedef std::pair<uint8_t, WifiPhyStandard> ChannelNumberStandardPair;
551  typedef std::pair<uint16_t, uint16_t> FrequencyWidthPair;
552 
558  virtual Ptr<Channel> GetChannel (void) const = 0;
559 
565  static WifiMode GetDsssRate1Mbps ();
571  static WifiMode GetDsssRate2Mbps ();
577  static WifiMode GetDsssRate5_5Mbps ();
583  static WifiMode GetDsssRate11Mbps ();
589  static WifiMode GetErpOfdmRate6Mbps ();
595  static WifiMode GetErpOfdmRate9Mbps ();
601  static WifiMode GetErpOfdmRate12Mbps ();
607  static WifiMode GetErpOfdmRate18Mbps ();
613  static WifiMode GetErpOfdmRate24Mbps ();
619  static WifiMode GetErpOfdmRate36Mbps ();
625  static WifiMode GetErpOfdmRate48Mbps ();
631  static WifiMode GetErpOfdmRate54Mbps ();
637  static WifiMode GetOfdmRate6Mbps ();
643  static WifiMode GetOfdmRate9Mbps ();
649  static WifiMode GetOfdmRate12Mbps ();
655  static WifiMode GetOfdmRate18Mbps ();
661  static WifiMode GetOfdmRate24Mbps ();
667  static WifiMode GetOfdmRate36Mbps ();
673  static WifiMode GetOfdmRate48Mbps ();
679  static WifiMode GetOfdmRate54Mbps ();
776 
782  static WifiMode GetHtMcs0 ();
788  static WifiMode GetHtMcs1 ();
794  static WifiMode GetHtMcs2 ();
800  static WifiMode GetHtMcs3 ();
806  static WifiMode GetHtMcs4 ();
812  static WifiMode GetHtMcs5 ();
818  static WifiMode GetHtMcs6 ();
824  static WifiMode GetHtMcs7 ();
830  static WifiMode GetHtMcs8 ();
836  static WifiMode GetHtMcs9 ();
842  static WifiMode GetHtMcs10 ();
848  static WifiMode GetHtMcs11 ();
854  static WifiMode GetHtMcs12 ();
860  static WifiMode GetHtMcs13 ();
866  static WifiMode GetHtMcs14 ();
872  static WifiMode GetHtMcs15 ();
878  static WifiMode GetHtMcs16 ();
884  static WifiMode GetHtMcs17 ();
890  static WifiMode GetHtMcs18 ();
896  static WifiMode GetHtMcs19 ();
902  static WifiMode GetHtMcs20 ();
908  static WifiMode GetHtMcs21 ();
914  static WifiMode GetHtMcs22 ();
920  static WifiMode GetHtMcs23 ();
926  static WifiMode GetHtMcs24 ();
932  static WifiMode GetHtMcs25 ();
938  static WifiMode GetHtMcs26 ();
944  static WifiMode GetHtMcs27 ();
950  static WifiMode GetHtMcs28 ();
956  static WifiMode GetHtMcs29 ();
962  static WifiMode GetHtMcs30 ();
968  static WifiMode GetHtMcs31 ();
969 
975  static WifiMode GetVhtMcs0 ();
981  static WifiMode GetVhtMcs1 ();
987  static WifiMode GetVhtMcs2 ();
993  static WifiMode GetVhtMcs3 ();
999  static WifiMode GetVhtMcs4 ();
1005  static WifiMode GetVhtMcs5 ();
1011  static WifiMode GetVhtMcs6 ();
1017  static WifiMode GetVhtMcs7 ();
1023  static WifiMode GetVhtMcs8 ();
1029  static WifiMode GetVhtMcs9 ();
1030 
1036  static WifiMode GetHeMcs0 ();
1042  static WifiMode GetHeMcs1 ();
1048  static WifiMode GetHeMcs2 ();
1054  static WifiMode GetHeMcs3 ();
1060  static WifiMode GetHeMcs4 ();
1066  static WifiMode GetHeMcs5 ();
1072  static WifiMode GetHeMcs6 ();
1078  static WifiMode GetHeMcs7 ();
1084  static WifiMode GetHeMcs8 ();
1090  static WifiMode GetHeMcs9 ();
1096  static WifiMode GetHeMcs10 ();
1102  static WifiMode GetHeMcs11 ();
1103 
1111  void NotifyTxBegin (Ptr<const Packet> packet, double txPowerW);
1118  void NotifyTxEnd (Ptr<const Packet> packet);
1125  void NotifyTxDrop (Ptr<const Packet> packet);
1132  void NotifyRxBegin (Ptr<const Packet> packet);
1139  void NotifyRxEnd (Ptr<const Packet> packet);
1148 
1169  uint16_t channelFreqMhz,
1170  WifiTxVector txVector,
1171  SignalNoiseDbm signalNoise,
1172  std::vector<bool> statusPerMpdu);
1173 
1194  uint16_t channelFreqMhz,
1195  WifiTxVector txVector,
1196  MpduInfo aMpdu,
1197  SignalNoiseDbm signalNoise);
1198 
1212  uint16_t channelFreqMhz,
1213  WifiTxVector txVector);
1214 
1227  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet,
1228  uint16_t channelFreqMhz,
1229  WifiTxVector txVector,
1230  MpduInfo aMpdu);
1231 
1238 
1246 
1255  virtual int64_t AssignStreams (int64_t stream);
1256 
1266  void SetEdThreshold (double threshold);
1274  void SetRxSensitivity (double threshold);
1280  double GetRxSensitivity (void) const;
1288  void SetCcaEdThreshold (double threshold);
1294  double GetCcaEdThreshold (void) const;
1300  void SetRxNoiseFigure (double noiseFigureDb);
1306  void SetTxPowerStart (double start);
1312  double GetTxPowerStart (void) const;
1318  void SetTxPowerEnd (double end);
1324  double GetTxPowerEnd (void) const;
1332  void SetNTxPower (uint8_t n);
1338  uint8_t GetNTxPower (void) const;
1344  void SetTxGain (double gain);
1350  double GetTxGain (void) const;
1356  void SetRxGain (double gain);
1362  double GetRxGain (void) const;
1363 
1369  void SetDevice (const Ptr<NetDevice> device);
1375  Ptr<NetDevice> GetDevice (void) const;
1396  Ptr<MobilityModel> GetMobility (void) const;
1397 
1401  virtual void SetFrequency (uint16_t freq);
1405  uint16_t GetFrequency (void) const;
1409  void SetNumberOfAntennas (uint8_t antennas);
1413  uint8_t GetNumberOfAntennas (void) const;
1417  void SetMaxSupportedTxSpatialStreams (uint8_t streams);
1421  uint8_t GetMaxSupportedTxSpatialStreams (void) const;
1425  void SetMaxSupportedRxSpatialStreams (uint8_t streams);
1429  uint8_t GetMaxSupportedRxSpatialStreams (void) const;
1437  void SetShortGuardInterval (bool shortGuardInterval);
1445  bool GetShortGuardInterval (void) const;
1451  void SetGuardInterval (Time guardInterval);
1457  Time GetGuardInterval (void) const;
1465  void SetGreenfield (bool greenfield);
1473  bool GetGreenfield (void) const;
1479  void SetShortPlcpPreambleSupported (bool preamble);
1485  bool GetShortPlcpPreambleSupported (void) const;
1486 
1492  void SetErrorRateModel (const Ptr<ErrorRateModel> rate);
1510  void SetFrameCaptureModel (const Ptr<FrameCaptureModel> frameCaptureModel);
1516  void SetPreambleDetectionModel (const Ptr<PreambleDetectionModel> preambleDetectionModel);
1522  void SetWifiRadioEnergyModel (const Ptr<WifiRadioEnergyModel> wifiRadioEnergyModel);
1523 
1527  uint16_t GetChannelWidth (void) const;
1531  virtual void SetChannelWidth (uint16_t channelwidth);
1535  void AddSupportedChannelWidth (uint16_t channelwidth);
1539  std::vector<uint16_t> GetSupportedChannelWidthSet (void) const;
1540 
1549  double GetPowerDbm (uint8_t power) const;
1550 
1558  void ResetCca (bool powerRestricted, double txPowerMaxSiso = 0, double txPowerMaxMimo = 0);
1565  double GetTxPowerForTransmission (WifiTxVector txVector) const;
1573  void NotifyChannelAccessRequested (void);
1574 
1575 
1576 protected:
1577  // Inherited
1578  virtual void DoInitialize (void);
1579  virtual void DoDispose (void);
1580 
1590  bool DoChannelSwitch (uint8_t id);
1600  bool DoFrequencySwitch (uint16_t frequency);
1601 
1608  void SwitchMaybeToCcaBusy (void);
1609 
1613 
1616 
1620 
1621 
1622 private:
1638  void Configure80211a (void);
1643  void Configure80211b (void);
1648  void Configure80211g (void);
1653  void Configure80211_10Mhz (void);
1658  void Configure80211_5Mhz ();
1663  void ConfigureHolland (void);
1668  void Configure80211n (void);
1673  void Configure80211ac (void);
1678  void Configure80211ax (void);
1683  void ConfigureHtDeviceMcsSet (void);
1701 
1708  uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const;
1715  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const;
1716 
1723 
1727  void MaybeCcaBusyDuration (void);
1728 
1736  void StartRx (Ptr<Event> event, double rxPowerW, Time rxDuration);
1747  std::pair<bool, SignalNoiseDbm> GetReceptionStatus (Ptr<const Packet> mpdu,
1748  Ptr<Event> event,
1749  Time relativeMpduStart,
1750  Time mpduDuration);
1751 
1759 
1767 
1775 
1783 
1791 
1798 
1812 
1826 
1833 
1872 
1873  std::vector<uint8_t> m_bssMembershipSelectorSet;
1874 
1880  uint16_t m_channelWidth;
1881 
1884  double m_txGainDb;
1885  double m_rxGainDb;
1888  uint8_t m_nTxPower;
1889 
1894 
1898 
1900 
1904 
1905  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
1907 
1908  std::vector<uint16_t> m_supportedChannelWidthSet;
1911 
1913  uint32_t m_totalAmpduSize;
1915 
1918 
1925 
1927 };
1928 
1934 std::ostream& operator<< (std::ostream& os, WifiPhyState state);
1935 
1936 } //namespace ns3
1937 
1938 #endif /* WIFI_PHY_H */
MpduInfo structure.
Definition: wifi-phy.h:71
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:3916
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3570
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1782
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:1916
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:3261
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:580
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1614
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:3198
bool IsStateSwitching(void) const
Definition: wifi-phy.cc:4120
bool IsStateOff(void) const
Definition: wifi-phy.cc:4132
double signal
in dBm
Definition: wifi-phy.h:66
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:4006
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:547
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:3273
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
void SetNTxPower(uint8_t n)
Sets the number of transmission power levels available between the minimum level and the maximum leve...
Definition: wifi-phy.cc:573
uint8_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:1909
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:1885
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1122
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:3932
void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
Definition: wifi-phy.cc:706
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:606
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:4046
void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector)
Definition: wifi-phy.cc:2516
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:3324
double GetCcaEdThreshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:533
void StartReceiveHeader(Ptr< Event > event, Time rxDuration)
Start receiving the PHY header of a packet (i.e.
Definition: wifi-phy.cc:2668
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3471
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:3495
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:1811
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:1884
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:4090
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3534
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:3868
void AbortCurrentReception(WifiPhyRxfailureReason reason)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
Definition: wifi-phy.cc:4167
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
Definition: wifi-phy.cc:2976
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1274
virtual ~WifiPhy()
Definition: wifi-phy.cc:408
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:3159
void ResumeFromOff(void)
Resume from off mode.
Definition: wifi-phy.cc:1711
Ptr< WifiPhyStateHelper > GetState(void) const
Return the WifiPhyStateHelper of this PHY.
Definition: wifi-phy.cc:443
void ResumeFromSleep(void)
Resume from sleep mode.
Definition: wifi-phy.cc:1681
double m_rxSensitivityW
Receive sensitivity threshold in watts.
Definition: wifi-phy.h:1882
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
Definition: wifi-phy.cc:659
bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:628
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
Definition: wifi-phy.cc:3990
802.11 PHY layer model
Definition: wifi-phy.h:89
Time m_timeLastPreambleDetected
Record the time the last preamble was detected.
Definition: wifi-phy.h:1924
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:3249
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:586
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
Definition: wifi-phy.cc:1093
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:3665
void SetRxSensitivity(double threshold)
Sets the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:513
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:414
def start()
Definition: core.py:1858
Forward calls to a chain of Callback.
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1815
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:3908
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1414
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:3785
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:3721
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:3336
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1790
bool IsStateCcaBusy(void) const
Definition: wifi-phy.cc:4096
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:455
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:3857
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:3777
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:3849
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
Definition: wifi-phy.h:1873
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:3689
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:3817
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3510
void StartRx(Ptr< Event > event, double rxPowerW, Time rxDuration)
Starting receiving the packet after having detected the medium is idle or after a reception switch...
Definition: wifi-phy.cc:4223
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:3745
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:3801
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3423
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:3396
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:743
void UnregisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:467
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:539
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
Definition: wifi-phy.cc:3982
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for holland.
Definition: wifi-phy.cc:975
bool IsStateIdle(void) const
Definition: wifi-phy.cc:4102
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:2384
void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
Definition: wifi-phy.cc:612
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
Definition: wifi-phy.cc:945
TracedCallback< Ptr< const Packet >, WifiPhyRxfailureReason > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1797
std::pair< uint16_t, uint16_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
Definition: wifi-phy.h:551
uint8_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:1888
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:3673
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:3753
double GetTxPowerForTransmission(WifiTxVector txVector) const
Compute the transmit power (in dBm) for the next transmission.
Definition: wifi-phy.cc:4202
virtual void SetFrequency(uint16_t freq)
Definition: wifi-phy.cc:1280
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:3900
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:3825
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
Definition: wifi-phy.cc:776
void ResetCca(bool powerRestricted, double txPowerMaxSiso=0, double txPowerMaxMimo=0)
Reset PHY to IDLE, with some potential TX power restrictions for the next transmission.
Definition: wifi-phy.cc:4190
void(* EndOfHePreambleCallback)(HePreambleParameters params)
TracedCallback signature for end of HE-SIG-A events.
Definition: wifi-phy.h:1245
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:1825
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:3372
uint8_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:1910
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:3924
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3558
bool IsStateSleep(void) const
Definition: wifi-phy.cc:4126
void NotifyEndOfHePreamble(HePreambleParameters params)
Public method used to fire a EndOfHePreamble trace once both HE SIG fields have been received...
Definition: wifi-phy.cc:2510
void NotifyRxDrop(Ptr< const Packet > packet, WifiPhyRxfailureReason reason)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:2435
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:3892
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:824
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1830
MpduType
The type of an MPDU.
double GetRxSensitivity(void) const
Return the receive sensitivity threshold (dBm).
Definition: wifi-phy.cc:520
WifiModeList m_deviceMcsSet
the device MCS set
Definition: wifi-phy.h:1871
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, SignalNoiseDbm signalNoise, std::vector< bool > statusPerMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:2452
mobility
Definition: third.py:101
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:1877
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:719
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
Definition: wifi-phy.cc:713
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:3737
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1357
bool m_powerRestricted
Flag whether transmit power is retricted by OBSS PD SR.
Definition: wifi-phy.h:1890
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:3297
void AddSupportedChannelWidth(uint16_t channelwidth)
Definition: wifi-phy.cc:1426
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:3841
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:3697
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:4084
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2344
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth
the channel to frequency width map
Definition: wifi-phy.h:1906
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
double rssiW
RSSI in W.
Definition: wifi-phy.h:80
uint8_t bssColor
BSS color.
Definition: wifi-phy.h:81
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1847
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1575
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:3625
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:1917
virtual void StartTx(Ptr< Packet > packet, WifiTxVector txVector, Time txDuration)=0
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1995
receive notifications about phy events.
std::pair< bool, SignalNoiseDbm > GetReceptionStatus(Ptr< const Packet > mpdu, Ptr< Event > event, Time relativeMpduStart, Time mpduDuration)
Get the reception status for the provided MPDU and notify.
Definition: wifi-phy.cc:3107
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:1774
double m_txPowerMaxMimo
MIMO maximum transmit power due to OBSS PD SR power restriction.
Definition: wifi-phy.h:1892
bool m_shortPreamble
Flag if short PLCP preamble is supported.
Definition: wifi-phy.h:1897
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
Definition: wifi-phy.cc:3974
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:1227
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:2484
static Time GetPlcpSigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1864
EventId m_endPlcpRxEvent
the end of PLCP receive event
Definition: wifi-phy.h:1618
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:3705
Ptr< WifiRadioEnergyModel > m_wifiRadioEnergyModel
Wifi radio energy model.
Definition: wifi-phy.h:1922
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:3285
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2321
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:560
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
Definition: wifi-phy.cc:782
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3459
void NotifyChannelAccessRequested(void)
Notify the PHY that an access to the channel was requested.
Definition: wifi-phy.cc:3150
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Definition: wifi-phy.cc:4038
Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:4138
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1615
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:960
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1447
TracedCallback< HePreambleParameters > m_phyEndOfHePreambleTrace
A trace source that indiates the end of both HE SIG fields as well as training fields for received 80...
Definition: wifi-phy.h:1832
double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:818
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:2401
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:3348
void SetCapabilitiesChangedCallback(Callback< void > callback)
Definition: wifi-phy.cc:473
void SetOffMode(void)
Put in off mode.
Definition: wifi-phy.cc:1669
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3447
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3582
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:1193
Ptr< PreambleDetectionModel > m_preambleDetectionModel
Preamble detection model.
Definition: wifi-phy.h:1921
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:794
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:3876
EventId m_endPreambleDetectionEvent
the end of preamble detection event
Definition: wifi-phy.h:1619
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:3384
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:762
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:4022
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:3609
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:749
static Time GetPreambleDetectionDuration(void)
Definition: wifi-phy.cc:1760
void SetPostReceptionErrorModel(const Ptr< ErrorModel > em)
Attach a receive ErrorModel to the WifiPhy.
Definition: wifi-phy.cc:769
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy.cc:162
Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:812
void ContinueReceiveHeader(Ptr< Event > event)
Continue receiving the PHY header of a packet (i.e.
Definition: wifi-phy.cc:2720
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
Definition: wifi-phy.cc:788
Time m_guardInterval
Supported HE guard interval (deprecated)
Definition: wifi-phy.h:1899
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1337
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1371
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:3360
virtual void SetChannelWidth(uint16_t channelwidth)
Definition: wifi-phy.cc:1343
WifiPhyState
The state of the PHY layer.
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
Definition: wifi-phy.cc:3958
TracedCallback< Ptr< const Packet >, double > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1758
void StartReceivePreamble(Ptr< Packet > packet, double rxPowerW, Time rxDuration)
Start receiving the PHY preamble of a packet (i.e.
Definition: wifi-phy.cc:2744
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
Definition: wifi-phy.cc:643
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:3713
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
Definition: wifi-phy.cc:3950
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
Definition: wifi-phy.cc:4030
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:3769
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
Definition: wifi-phy.cc:3966
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:3649
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1396
double m_ccaEdThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:1883
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:3884
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Definition: wifi-phy.cc:1455
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:3186
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:1073
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:430
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3522
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1509
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:252
WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:1875
void SetGuardInterval(Time guardInterval)
Definition: wifi-phy.cc:674
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint16_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:1139
bool m_channelAccessRequested
Definition: wifi-phy.h:1893
void NotifyTxBegin(Ptr< const Packet > packet, double txPowerW)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:2350
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:3225
void EndReceive(Ptr< Event > event)
The last bit of the packet has arrived.
Definition: wifi-phy.cc:3040
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:2367
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1611
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
Definition: wifi-phy.h:1902
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:554
Ptr< ErrorModel > m_postReceptionErrorModel
Error model for receive packet events.
Definition: wifi-phy.h:1923
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:479
std::vector< uint16_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1441
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4072
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Definition: wifi-phy.h:1920
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:599
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:918
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:449
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:4078
uint16_t m_channelWidth
Channel width.
Definition: wifi-phy.h:1880
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:3213
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1420
void RegisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:461
bool IsStateTx(void) const
Definition: wifi-phy.cc:4114
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1167
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1377
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:3237
bool m_greenfield
Flag if GreenField format is supported (deprecated)
Definition: wifi-phy.h:1895
EventId m_endRxEvent
the end of receive event
Definition: wifi-phy.h:1617
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1612
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:507
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:2418
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:1056
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:547
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:1886
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:4059
An identifier for simulation events.
Definition: event-id.h:53
SignalNoiseDbm structure.
Definition: wifi-phy.h:64
uint32_t mpduRefNumber
MPDU ref number.
Definition: wifi-phy.h:74
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:1879
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:3761
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1610
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:1876
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:3657
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:987
WifiPhyRxfailureReason
Definition: wifi-phy.h:48
static WifiMode GetVhtPlcpHeaderMode()
Definition: wifi-phy.cc:1748
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:1914
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:3833
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:567
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:3681
void EndReceiveInterBss(void)
For HE receptions only, check and possibly modify the transmit power restriction state at the end of ...
Definition: wifi-phy.cc:3140
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:3641
void StartReceivePayload(Ptr< Event > event)
Start receiving the payload of a packet (i.e.
Definition: wifi-phy.cc:2991
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:3809
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Definition: wifi-phy.cc:4014
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:929
static WifiMode GetHePlcpHeaderMode()
Definition: wifi-phy.cc:1754
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:737
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:593
void SetSleepMode(void)
Put in sleep mode.
Definition: wifi-phy.cc:1635
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:1913
double noise
in dBm
Definition: wifi-phy.h:67
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:1870
Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2045
void SetNumberOfAntennas(uint8_t antennas)
Definition: wifi-phy.cc:1363
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:3617
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:3793
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:3171
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:3940
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1217
static Time GetStartOfPacketDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1989
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3435
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:1887
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
Definition: wifi-phy.cc:1878
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1766
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3483
MpduType type
type
Definition: wifi-phy.h:73
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:1912
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3594
uint8_t m_numberOfAntennas
Number of transmitters.
Definition: wifi-phy.h:1901
static Time GetPlcpHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1924
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1390
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:3729
Ptr< Event > m_currentEvent
Hold the current event.
Definition: wifi-phy.h:1919
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:4144
double m_txPowerMaxSiso
SISO maximum transmit power due to OBSS PD SR power restriction.
Definition: wifi-phy.h:1891
bool IsStateRx(void) const
Definition: wifi-phy.cc:4108
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:3633
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
Definition: wifi-phy.h:1903
std::vector< uint16_t > m_supportedChannelWidthSet
Supported channel width.
Definition: wifi-phy.h:1908
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:3312
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
Definition: wifi-phy.cc:4150
void SetCcaEdThreshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:526
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported (deprecated)
Definition: wifi-phy.h:1896
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:4259
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
Definition: wifi-phy.cc:3998
static WifiMode GetHtPlcpHeaderMode()
Definition: wifi-phy.cc:1742
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3546
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
Definition: wifi-phy.h:1926
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:903
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1408
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
Definition: wifi-phy.h:1905
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:3411
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1766
uint16_t m_initialFrequency
Store frequency until initialization.
Definition: wifi-phy.h:1878
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1515
Time GetGuardInterval(void) const
Definition: wifi-phy.cc:691