A Discrete-Event Network Simulator
API
wifi-phy.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  * Sébastien Deronne <sebastien.deronne@gmail.com>
20  */
21 
22 #ifndef WIFI_PHY_H
23 #define WIFI_PHY_H
24 
25 #include <map>
26 #include "ns3/event-id.h"
27 #include "ns3/mobility-model.h"
28 #include "ns3/random-variable-stream.h"
29 #include "ns3/channel.h"
30 #include "wifi-phy-standard.h"
31 #include "interference-helper.h"
32 #include "ns3/node.h"
33 #include "ns3/string.h"
34 #include "wifi-phy-state-helper.h"
35 
36 namespace ns3 {
37 
38 #define HE_PHY 125
39 #define VHT_PHY 126
40 #define HT_PHY 127
41 
45 class WifiPhyStateHelper;
46 
50 class FrameCaptureModel;
51 
55 class WifiRadioEnergyModel;
56 
60 enum MpduType
62 {
69 };
70 
73 {
74  double signal;
75  double noise;
76 };
77 
79 struct MpduInfo
80 {
82  uint32_t mpduRefNumber;
83 };
84 
90 class WifiPhy : public Object
91 {
92 public:
97  static TypeId GetTypeId (void);
98 
99  WifiPhy ();
100  virtual ~WifiPhy ();
101 
106  void SetReceiveOkCallback (RxOkCallback callback);
112 
119  void RegisterListener (WifiPhyListener *listener);
126  void UnregisterListener (WifiPhyListener *listener);
127 
132 
141  double rxPowerW,
142  Time rxDuration);
143 
152  void StartReceivePacket (Ptr<Packet> packet,
153  WifiTxVector txVector,
154  MpduType mpdutype,
156 
165  void EndReceive (Ptr<Packet> packet, WifiPreamble preamble, MpduType mpdutype, Ptr<InterferenceHelper::Event> event);
166 
174  void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, MpduType mpdutype = NORMAL_MPDU);
175 
183  virtual void StartTx (Ptr<Packet> packet, WifiTxVector txVector, Time txDuration) = 0;
184 
188  void SetSleepMode (void);
192  void ResumeFromSleep (void);
196  void SetOffMode (void);
200  void ResumeFromOff (void);
201 
205  bool IsStateIdle (void) const;
209  bool IsStateCcaBusy (void) const;
213  bool IsStateRx (void) const;
217  bool IsStateTx (void) const;
221  bool IsStateSwitching (void) const;
225  bool IsStateSleep (void) const;
229  bool IsStateOff (void) const;
230 
237  Time GetDelayUntilIdle (void);
238 
244  Time GetLastRxStartTime (void) const;
245 
253  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
263  Time CalculateTxDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, uint8_t incFlag);
264 
271 
282  static WifiMode GetHtPlcpHeaderMode ();
286  static WifiMode GetVhtPlcpHeaderMode ();
290  static WifiMode GetHePlcpHeaderMode ();
296  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
302  static Time GetPlcpSigA1Duration (WifiPreamble preamble);
308  static Time GetPlcpSigA2Duration (WifiPreamble preamble);
314  static Time GetPlcpSigBDuration (WifiPreamble preamble);
320  static WifiMode GetPlcpHeaderMode (WifiTxVector txVector);
326  static Time GetPlcpHeaderDuration (WifiTxVector txVector);
332  static Time GetPlcpPreambleDuration (WifiTxVector txVector);
340  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency);
350  Time GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t frequency, MpduType mpdutype, uint8_t incFlag);
351 
369  uint8_t GetNModes (void) const;
389  WifiMode GetMode (uint8_t mode) const;
398  bool IsModeSupported (WifiMode mode) const;
407  bool IsMcsSupported (WifiMode mcs) const;
408 
416  double CalculateSnr (WifiTxVector txVector, double ber) const;
417 
427  uint8_t GetNBssMembershipSelectors (void) const;
439  uint8_t GetBssMembershipSelector (uint8_t selector) const;
453  WifiModeList GetMembershipSelectorModes (uint32_t selector);
463  uint8_t GetNMcs (void) const;
475  WifiMode GetMcs (uint8_t mcs) const;
476 
489  virtual void SetChannelNumber (uint8_t id);
495  uint8_t GetChannelNumber (void) const;
499  Time GetChannelSwitchDelay (void) const;
500 
506  virtual void ConfigureStandard (WifiPhyStandard standard);
507 
513  WifiPhyStandard GetStandard (void) const;
514 
530  bool DefineChannelNumber (uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth);
531 
535  typedef std::pair<uint8_t, WifiPhyStandard> ChannelNumberStandardPair;
539  typedef std::pair<uint16_t, uint8_t> FrequencyWidthPair;
540 
546  virtual Ptr<Channel> GetChannel (void) const = 0;
547 
553  static WifiMode GetDsssRate1Mbps ();
559  static WifiMode GetDsssRate2Mbps ();
565  static WifiMode GetDsssRate5_5Mbps ();
571  static WifiMode GetDsssRate11Mbps ();
577  static WifiMode GetErpOfdmRate6Mbps ();
583  static WifiMode GetErpOfdmRate9Mbps ();
589  static WifiMode GetErpOfdmRate12Mbps ();
595  static WifiMode GetErpOfdmRate18Mbps ();
601  static WifiMode GetErpOfdmRate24Mbps ();
607  static WifiMode GetErpOfdmRate36Mbps ();
613  static WifiMode GetErpOfdmRate48Mbps ();
619  static WifiMode GetErpOfdmRate54Mbps ();
625  static WifiMode GetOfdmRate6Mbps ();
631  static WifiMode GetOfdmRate9Mbps ();
637  static WifiMode GetOfdmRate12Mbps ();
643  static WifiMode GetOfdmRate18Mbps ();
649  static WifiMode GetOfdmRate24Mbps ();
655  static WifiMode GetOfdmRate36Mbps ();
661  static WifiMode GetOfdmRate48Mbps ();
667  static WifiMode GetOfdmRate54Mbps ();
764 
770  static WifiMode GetHtMcs0 ();
776  static WifiMode GetHtMcs1 ();
782  static WifiMode GetHtMcs2 ();
788  static WifiMode GetHtMcs3 ();
794  static WifiMode GetHtMcs4 ();
800  static WifiMode GetHtMcs5 ();
806  static WifiMode GetHtMcs6 ();
812  static WifiMode GetHtMcs7 ();
818  static WifiMode GetHtMcs8 ();
824  static WifiMode GetHtMcs9 ();
830  static WifiMode GetHtMcs10 ();
836  static WifiMode GetHtMcs11 ();
842  static WifiMode GetHtMcs12 ();
848  static WifiMode GetHtMcs13 ();
854  static WifiMode GetHtMcs14 ();
860  static WifiMode GetHtMcs15 ();
866  static WifiMode GetHtMcs16 ();
872  static WifiMode GetHtMcs17 ();
878  static WifiMode GetHtMcs18 ();
884  static WifiMode GetHtMcs19 ();
890  static WifiMode GetHtMcs20 ();
896  static WifiMode GetHtMcs21 ();
902  static WifiMode GetHtMcs22 ();
908  static WifiMode GetHtMcs23 ();
914  static WifiMode GetHtMcs24 ();
920  static WifiMode GetHtMcs25 ();
926  static WifiMode GetHtMcs26 ();
932  static WifiMode GetHtMcs27 ();
938  static WifiMode GetHtMcs28 ();
944  static WifiMode GetHtMcs29 ();
950  static WifiMode GetHtMcs30 ();
956  static WifiMode GetHtMcs31 ();
957 
963  static WifiMode GetVhtMcs0 ();
969  static WifiMode GetVhtMcs1 ();
975  static WifiMode GetVhtMcs2 ();
981  static WifiMode GetVhtMcs3 ();
987  static WifiMode GetVhtMcs4 ();
993  static WifiMode GetVhtMcs5 ();
999  static WifiMode GetVhtMcs6 ();
1005  static WifiMode GetVhtMcs7 ();
1011  static WifiMode GetVhtMcs8 ();
1017  static WifiMode GetVhtMcs9 ();
1018 
1024  static WifiMode GetHeMcs0 ();
1030  static WifiMode GetHeMcs1 ();
1036  static WifiMode GetHeMcs2 ();
1042  static WifiMode GetHeMcs3 ();
1048  static WifiMode GetHeMcs4 ();
1054  static WifiMode GetHeMcs5 ();
1060  static WifiMode GetHeMcs6 ();
1066  static WifiMode GetHeMcs7 ();
1072  static WifiMode GetHeMcs8 ();
1078  static WifiMode GetHeMcs9 ();
1084  static WifiMode GetHeMcs10 ();
1090  static WifiMode GetHeMcs11 ();
1091 
1098  void NotifyTxBegin (Ptr<const Packet> packet);
1105  void NotifyTxEnd (Ptr<const Packet> packet);
1112  void NotifyTxDrop (Ptr<const Packet> packet);
1119  void NotifyRxBegin (Ptr<const Packet> packet);
1126  void NotifyRxEnd (Ptr<const Packet> packet);
1133  void NotifyRxDrop (Ptr<const Packet> packet);
1134 
1153  uint16_t channelFreqMhz,
1154  WifiTxVector txVector,
1155  MpduInfo aMpdu,
1156  SignalNoiseDbm signalNoise);
1157 
1178  uint16_t channelFreqMhz,
1179  WifiTxVector txVector,
1180  MpduInfo aMpdu,
1181  SignalNoiseDbm signalNoise);
1182 
1195  uint16_t channelFreqMhz,
1196  WifiTxVector txVector,
1197  MpduInfo aMpdu);
1198 
1211  typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet,
1212  uint16_t channelFreqMhz,
1213  WifiTxVector txVector,
1214  MpduInfo aMpdu);
1215 
1224  virtual int64_t AssignStreams (int64_t stream);
1225 
1233  void SetEdThreshold (double threshold);
1239  double GetEdThreshold (void) const;
1245  double GetEdThresholdW (void) const;
1253  void SetCcaMode1Threshold (double threshold);
1259  double GetCcaMode1Threshold (void) const;
1265  void SetRxNoiseFigure (double noiseFigureDb);
1271  double GetRxNoiseFigure (void) const;
1277  void SetTxPowerStart (double start);
1283  double GetTxPowerStart (void) const;
1289  void SetTxPowerEnd (double end);
1295  double GetTxPowerEnd (void) const;
1303  void SetNTxPower (uint8_t n);
1309  uint8_t GetNTxPower (void) const;
1315  void SetTxGain (double gain);
1321  double GetTxGain (void) const;
1327  void SetRxGain (double gain);
1333  double GetRxGain (void) const;
1334 
1340  void SetDevice (const Ptr<NetDevice> device);
1346  Ptr<NetDevice> GetDevice (void) const;
1367  Ptr<MobilityModel> GetMobility (void) const;
1368 
1372  virtual void SetFrequency (uint16_t freq);
1376  uint16_t GetFrequency (void) const;
1380  void SetNumberOfAntennas (uint8_t antennas);
1384  uint8_t GetNumberOfAntennas (void) const;
1388  void SetMaxSupportedTxSpatialStreams (uint8_t streams);
1392  uint8_t GetMaxSupportedTxSpatialStreams (void) const;
1396  void SetMaxSupportedRxSpatialStreams (uint8_t streams);
1400  uint8_t GetMaxSupportedRxSpatialStreams (void) const;
1406  void SetShortGuardInterval (bool shortGuardInterval);
1412  bool GetShortGuardInterval (void) const;
1416  void SetGuardInterval (Time guardInterval);
1420  Time GetGuardInterval (void) const;
1425  void SetLdpc (bool ldpc);
1431  bool GetLdpc (void) const;
1437  void SetStbc (bool stbc);
1443  bool GetStbc (void) const;
1449  void SetGreenfield (bool greenfield);
1455  bool GetGreenfield (void) const;
1461  void SetShortPlcpPreambleSupported (bool preamble);
1467  bool GetShortPlcpPreambleSupported (void) const;
1468 
1474  void SetErrorRateModel (const Ptr<ErrorRateModel> rate);
1481 
1487  void SetFrameCaptureModel (const Ptr<FrameCaptureModel> frameCaptureModel);
1494 
1500  void SetWifiRadioEnergyModel (const Ptr<WifiRadioEnergyModel> wifiRadioEnergyModel);
1501 
1505  uint8_t GetChannelWidth (void) const;
1509  virtual void SetChannelWidth (uint8_t channelwidth);
1513  void AddSupportedChannelWidth (uint8_t channelwidth);
1517  std::vector<uint8_t> GetSupportedChannelWidthSet (void) const;
1518 
1527  double GetPowerDbm (uint8_t power) const;
1528 
1529 
1530 protected:
1531  // Inherited
1532  virtual void DoInitialize (void);
1533  virtual void DoDispose (void);
1534 
1544  bool DoChannelSwitch (uint8_t id);
1554  bool DoFrequencySwitch (uint16_t frequency);
1555 
1562  void SwitchMaybeToCcaBusy (void);
1563 
1567 
1568  uint16_t m_mpdusNum;
1572 
1575 
1576 private:
1592  void Configure80211a (void);
1597  void Configure80211b (void);
1602  void Configure80211g (void);
1607  void Configure80211_10Mhz (void);
1612  void Configure80211_5Mhz ();
1617  void ConfigureHolland (void);
1622  void Configure80211n (void);
1627  void Configure80211ac (void);
1632  void Configure80211ax (void);
1637  void ConfigureHtDeviceMcsSet (void);
1655 
1662  uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint8_t width) const;
1669  FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyStandard standard) const;
1670 
1675  void AbortCurrentReception (void);
1676 
1680  void MaybeCcaBusyDuration (void);
1681 
1692  void StartRx (Ptr<Packet> packet,
1693  WifiTxVector txVector,
1694  MpduType mpdutype,
1695  double rxPowerW,
1696  Time rxDuration,
1698 
1706 
1714 
1722 
1730 
1738 
1745 
1759 
1773 
1812 
1813  std::vector<uint8_t> m_bssMembershipSelectorSet;
1814 
1820  uint8_t m_channelWidth;
1821 
1824  double m_txGainDb;
1825  double m_rxGainDb;
1828  uint8_t m_nTxPower;
1829 
1830  bool m_ldpc;
1831  bool m_stbc;
1835 
1837 
1841 
1842  typedef std::map<ChannelNumberStandardPair,FrequencyWidthPair> ChannelToFrequencyWidthMap;
1843  static ChannelToFrequencyWidthMap m_channelToFrequencyWidth;
1844 
1845  std::vector<uint8_t> m_supportedChannelWidthSet;
1848 
1850  uint32_t m_totalAmpduSize;
1852 
1855 
1859 
1861 };
1862 
1868 std::ostream& operator<< (std::ostream& os, WifiPhyState state);
1869 
1870 } //namespace ns3
1871 
1872 #endif /* WIFI_PHY_H */
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
Definition: wifi-phy.cc:1337
uint8_t GetNTxPower(void) const
Return the number of available transmission power levels.
Definition: wifi-phy.cc:543
MpduInfo structure.
Definition: wifi-phy.h:79
static WifiMode GetVhtMcs6()
Return MCS 6 from VHT MCS values.
Definition: wifi-phy.cc:3414
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3068
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1729
Ptr< NetDevice > m_device
Pointer to the device.
Definition: wifi-phy.h:1853
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:2759
uint32_t m_txMpduReferenceNumber
A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1570
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:2696
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1482
double signal
in dBm
Definition: wifi-phy.h:74
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:3504
std::pair< uint8_t, WifiPhyStandard > ChannelNumberStandardPair
A pair of a ChannelNumber and WifiPhyStandard.
Definition: wifi-phy.h:535
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:2771
The MPDU is not part of an A-MPDU.
Definition: wifi-phy.h:64
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:536
uint8_t m_channelNumber
Operating channel number.
Definition: wifi-phy.h:1846
double m_rxGainDb
Reception gain (dB)
Definition: wifi-phy.h:1825
static WifiMode GetVhtMcs8()
Return MCS 8 from VHT MCS values.
Definition: wifi-phy.cc:3430
double GetTxGain(void) const
Return the transmission gain (dB).
Definition: wifi-phy.cc:556
double GetRxNoiseFigure(void) const
Return the RX noise figure (dBm).
Definition: wifi-phy.cc:504
void SetShortPlcpPreambleSupported(bool preamble)
Enable or disable short PLCP preamble.
Definition: wifi-phy.cc:641
bool IsMcsSupported(WifiMode mcs) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3557
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:2822
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2969
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:2993
std::vector< uint8_t > m_supportedChannelWidthSet
Supported channel width.
Definition: wifi-phy.h:1845
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:1758
double m_txGainDb
Transmission gain (dB)
Definition: wifi-phy.h:1824
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3032
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
Definition: wifi-phy.cc:3366
void MaybeCcaBusyDuration(void)
Eventually switch to CCA busy.
Definition: wifi-phy.cc:2553
virtual ~WifiPhy()
Definition: wifi-phy.cc:375
void SetLdpc(bool ldpc)
Enable or disable LDPC.
Definition: wifi-phy.cc:575
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:2657
bool m_ldpc
Flag if LDPC is used.
Definition: wifi-phy.h:1830
void ResumeFromOff(void)
Resume from off mode.
Definition: wifi-phy.cc:1676
void ResumeFromSleep(void)
Resume from sleep mode.
Definition: wifi-phy.cc:1646
bool GetGreenfield(void) const
Return whether Greenfield is supported.
Definition: wifi-phy.cc:608
static WifiMode GetHeMcs5()
Return MCS 5 from HE MCS values.
Definition: wifi-phy.cc:3488
802.11 PHY layer model
Definition: wifi-phy.h:90
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:2747
void SetTxGain(double gain)
Sets the transmission gain (dB).
Definition: wifi-phy.cc:549
void Configure80211ax(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ax standard...
Definition: wifi-phy.cc:1017
handles interference calculations
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
Definition: wifi-phy.cc:3163
virtual void DoDispose(void)
Destructor implementation.
Definition: wifi-phy.cc:381
bool IsStateRx(void) const
Definition: wifi-phy.cc:3606
def start()
Definition: core.py:1790
Forward calls to a chain of Callback.
void SetStbc(bool stbc)
Enable or disable STBC.
Definition: wifi-phy.cc:588
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1772
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
Definition: wifi-phy.cc:3406
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
Definition: wifi-phy.cc:3283
uint8_t GetMaxSupportedRxSpatialStreams(void) const
Definition: wifi-phy.cc:1331
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
Definition: wifi-phy.cc:3219
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:2834
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1737
void EndReceive(Ptr< Packet > packet, WifiPreamble preamble, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
Definition: wifi-phy.cc:2606
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:412
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
Definition: wifi-phy.cc:3355
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
Definition: wifi-phy.cc:3275
bool IsStateCcaBusy(void) const
Definition: wifi-phy.cc:3594
uint8_t m_channelWidth
Channel width.
Definition: wifi-phy.h:1820
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
Definition: wifi-phy.cc:3347
std::vector< uint8_t > m_bssMembershipSelectorSet
the BSS membership selector set
Definition: wifi-phy.h:1813
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
Definition: wifi-phy.cc:3187
void StartReceivePreambleAndHeader(Ptr< Packet > packet, double rxPowerW, Time rxDuration)
Starting receiving the plcp of a packet (i.e.
Definition: wifi-phy.cc:2423
The MPDU is the last aggregate in an A-MPDU.
Definition: wifi-phy.h:68
Ptr< ErrorRateModel > GetErrorRateModel(void) const
Return the error rate model this PHY is using.
Definition: wifi-phy.cc:692
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
Definition: wifi-phy.cc:3315
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3008
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
Definition: wifi-phy.cc:3243
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
Definition: wifi-phy.cc:3299
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
Definition: wifi-phy.cc:621
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2921
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:2894
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:666
void UnregisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:424
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:496
static WifiMode GetHeMcs4()
Return MCS 4 from HE MCS values.
Definition: wifi-phy.cc:3480
void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, MpduType mpdutype=NORMAL_MPDU)
Definition: wifi-phy.cc:2355
void ConfigureHolland(void)
Configure WifiPhy with appropriate channel frequency and supported rates for holland.
Definition: wifi-phy.cc:899
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:3582
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:2319
void SetGreenfield(bool greenfield)
Enable or disable Greenfield support.
Definition: wifi-phy.cc:601
void Configure80211_10Mhz(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 10...
Definition: wifi-phy.cc:869
uint8_t m_nTxPower
Number of available transmission power levels.
Definition: wifi-phy.h:1828
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
Definition: wifi-phy.cc:3171
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
Definition: wifi-phy.cc:3251
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:2307
virtual void SetFrequency(uint16_t freq)
Definition: wifi-phy.cc:1203
Ptr< FrameCaptureModel > GetFrameCaptureModel(void) const
Return the frame capture model this PHY is using.
Definition: wifi-phy.cc:704
static WifiMode GetVhtMcs4()
Return MCS 4 from VHT MCS values.
Definition: wifi-phy.cc:3398
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
Definition: wifi-phy.cc:3323
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
Definition: wifi-phy.cc:698
bool IsStateSwitching(void) const
Definition: wifi-phy.cc:3618
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:1772
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1260
std::vector< uint8_t > GetSupportedChannelWidthSet(void) const
Definition: wifi-phy.cc:1414
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:97
bool IsModeSupported(WifiMode mode) const
Check if the given WifiMode is supported by the PHY.
Definition: wifi-phy.cc:3544
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:2870
uint8_t m_initialChannelNumber
Initial channel number.
Definition: wifi-phy.h:1847
static WifiMode GetVhtMcs7()
Return MCS 7 from VHT MCS values.
Definition: wifi-phy.cc:3422
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3056
bool GetStbc(void) const
Return whether STBC is supported.
Definition: wifi-phy.cc:595
static WifiMode GetVhtMcs3()
Return MCS 3 from VHT MCS values.
Definition: wifi-phy.cc:3390
void ConfigureDefaultsForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:746
static Time GetPlcpSigA1Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1787
WifiModeList m_deviceMcsSet
the device MCS set
Definition: wifi-phy.h:1811
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:1817
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:654
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
Definition: wifi-phy.cc:3235
bool GetLdpc(void) const
Return if LDPC is supported.
Definition: wifi-phy.cc:582
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:2795
uint16_t m_mpdusNum
carries the number of expected mpdus that are part of an A-MPDU
Definition: wifi-phy.h:1568
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
Definition: wifi-phy.cc:3339
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
Definition: wifi-phy.cc:3195
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:2337
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2301
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:1843
double GetPowerDbm(uint8_t power) const
Get the power of the given power level in dBm.
Definition: wifi-phy.cc:716
double GetEdThreshold(void) const
Return the energy detection threshold (dBm).
Definition: wifi-phy.cc:477
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
static Time GetPlcpSigA2Duration(WifiPreamble preamble)
Definition: wifi-phy.cc:1802
bool DoFrequencySwitch(uint16_t frequency)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1540
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
Definition: wifi-phy.cc:3123
tuple mobility
Definition: third.py:101
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Definition: wifi-phy.h:1854
virtual void StartTx(Ptr< Packet > packet, WifiTxVector txVector, Time txDuration)=0
static Time GetPlcpPreambleDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1949
receive notifications about phy events.
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the phy layer drops a packet as it tries to transmit it.
Definition: wifi-phy.h:1721
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:2343
bool m_shortPreamble
Flag if short PLCP preamble is supported.
Definition: wifi-phy.h:1834
static WifiMode GetHeMcs3()
Return MCS 3 from HE MCS values.
Definition: wifi-phy.cc:3472
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:1211
static Time GetPlcpSigBDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:1817
EventId m_endPlcpRxEvent
the end PLCP receive event
Definition: wifi-phy.h:1574
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
Definition: wifi-phy.cc:3203
Ptr< WifiRadioEnergyModel > m_wifiRadioEnergyModel
Wifi radio energy model.
Definition: wifi-phy.h:1858
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:2783
static Time CalculatePlcpPreambleAndHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:2279
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:523
Time GetGuardInterval(void) const
Definition: wifi-phy.cc:635
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3576
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2957
static WifiMode GetHeMcs11()
Return MCS 11 from HE MCS values.
Definition: wifi-phy.cc:3536
Time GetDelayUntilIdle(void)
Definition: wifi-phy.cc:3636
uint32_t m_rxMpduReferenceNumber
A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU...
Definition: wifi-phy.h:1571
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1744
double m_edThresholdW
Energy detection threshold in watts.
Definition: wifi-phy.h:1822
void Configure80211_5Mhz()
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard with 5M...
Definition: wifi-phy.cc:884
void StartReceivePacket(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, Ptr< InterferenceHelper::Event > event)
Starting receiving the payload of a packet (i.e.
Definition: wifi-phy.cc:2568
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:2325
bool IsStateSleep(void) const
Definition: wifi-phy.cc:3624
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:2846
void SetCapabilitiesChangedCallback(Callback< void > callback)
Definition: wifi-phy.cc:430
void SetOffMode(void)
Put in off mode.
Definition: wifi-phy.cc:1624
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2945
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3080
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:1177
WifiModeList GetMembershipSelectorModes(uint32_t selector)
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
Definition: wifi-phy.cc:1349
void AbortCurrentReception(void)
Due to newly arrived signal, the current reception cannot be continued and has to be aborted...
Definition: wifi-phy.cc:3665
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1705
static WifiMode GetVhtMcs1()
Return MCS 1 from VHT MCS values.
Definition: wifi-phy.cc:3374
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:2882
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:685
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:3520
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
Definition: wifi-phy.cc:3107
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:3588
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy.cc:147
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetChannelWidth(uint8_t channelwidth)
Definition: wifi-phy.cc:1266
double GetTxPowerEnd(void) const
Return the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:530
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
Definition: wifi-phy.cc:710
Time m_guardInterval
Supported HE guard interval.
Definition: wifi-phy.h:1836
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:2858
WifiPhyState
The state of the PHY layer.
static WifiMode GetHeMcs1()
Return MCS 1 from HE MCS values.
Definition: wifi-phy.cc:3456
std::pair< uint16_t, uint8_t > FrequencyWidthPair
A pair of a center Frequency and a ChannelWidth.
Definition: wifi-phy.h:539
void SetShortGuardInterval(bool shortGuardInterval)
Enable or disable support for HT/VHT short guard interval.
Definition: wifi-phy.cc:614
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
Definition: wifi-phy.cc:3211
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
Definition: wifi-phy.cc:3448
double CalculateSnr(WifiTxVector txVector, double ber) const
Definition: wifi-phy.cc:740
static WifiMode GetHeMcs10()
Return MCS 10 from HE MCS values.
Definition: wifi-phy.cc:3528
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
Definition: wifi-phy.cc:3267
static WifiMode GetHeMcs2()
Return MCS 2 from HE MCS values.
Definition: wifi-phy.cc:3464
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
Definition: wifi-phy.cc:3147
void SetMaxSupportedRxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1319
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm).
Definition: wifi-phy.cc:483
Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
Definition: wifi-phy.cc:3642
static WifiMode GetVhtMcs2()
Return MCS 2 from VHT MCS values.
Definition: wifi-phy.cc:3382
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard(uint8_t channelNumber, WifiPhyStandard standard) const
Lookup frequency/width pair for channelNumber/standard pair.
Definition: wifi-phy.cc:1420
virtual void SetChannelNumber(uint8_t id)
Set channel number.
Definition: wifi-phy.cc:1428
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:2684
void Configure80211ac(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11ac standard...
Definition: wifi-phy.cc:997
virtual void DoInitialize(void)
Initialize() implementation.
Definition: wifi-phy.cc:393
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3020
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:251
WifiPhyStandard m_standard
WifiPhyStandard.
Definition: wifi-phy.h:1815
void SetGuardInterval(Time guardInterval)
Definition: wifi-phy.cc:627
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:2723
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:2313
Ptr< UniformRandomVariable > m_random
Provides uniform random variables.
Definition: wifi-phy.h:1565
uint8_t m_txSpatialStreams
Number of supported TX spatial streams.
Definition: wifi-phy.h:1839
bool IsStateTx(void) const
Definition: wifi-phy.cc:3612
uint8_t GetMaxSupportedTxSpatialStreams(void) const
Definition: wifi-phy.cc:1313
void InitializeFrequencyChannelNumber(void)
post-construction setting of frequency and/or channel number
Definition: wifi-phy.cc:436
Ptr< FrameCaptureModel > m_frameCaptureModel
Frame capture model.
Definition: wifi-phy.h:1857
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
Definition: wifi-phy.cc:1343
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
Definition: wifi-phy.cc:660
void SetRxGain(double gain)
Sets the reception gain (dB).
Definition: wifi-phy.cc:562
uint8_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1280
void Configure80211b(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11b standard...
Definition: wifi-phy.cc:842
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:406
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:2711
void RegisterListener(WifiPhyListener *listener)
Definition: wifi-phy.cc:418
void ConfigureChannelForStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1087
void SetMaxSupportedTxSpatialStreams(uint8_t streams)
Definition: wifi-phy.cc:1300
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:2735
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:1569
bool m_greenfield
Flag if GreenField format is supported.
Definition: wifi-phy.h:1832
EventId m_endRxEvent
the end reeive event
Definition: wifi-phy.h:1573
Ptr< WifiPhyStateHelper > m_state
Pointer to WifiPhyStateHelper.
Definition: wifi-phy.h:1566
void SetEdThreshold(double threshold)
Sets the energy detection threshold (dBm).
Definition: wifi-phy.cc:464
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:2331
void Configure80211n(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11n standard...
Definition: wifi-phy.cc:980
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:510
double m_txPowerBaseDbm
Minimum transmission power (dBm)
Definition: wifi-phy.h:1826
An identifier for simulation events.
Definition: event-id.h:53
SignalNoiseDbm structure.
Definition: wifi-phy.h:72
uint32_t mpduRefNumber
MPDU ref number.
Definition: wifi-phy.h:82
bool m_frequencyChannelNumberInitialized
Store initialization state.
Definition: wifi-phy.h:1819
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
Definition: wifi-phy.cc:3259
InterferenceHelper m_interference
Pointer to InterferenceHelper.
Definition: wifi-phy.h:1564
bool m_isConstructed
true when ready to set frequency
Definition: wifi-phy.h:1816
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
Definition: wifi-phy.cc:3155
void ConfigureHtDeviceMcsSet(void)
Configure the device Mcs set with the appropriate HtMcs modes for the number of available transmit sp...
Definition: wifi-phy.cc:911
static WifiMode GetVhtPlcpHeaderMode()
Definition: wifi-phy.cc:1713
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:1851
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
Definition: wifi-phy.cc:3331
bool IsStateOff(void) const
Definition: wifi-phy.cc:3630
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
Definition: wifi-phy.cc:3179
Ptr< MobilityModel > GetMobility(void) const
Return the mobility model this PHY is associated with.
Definition: wifi-phy.cc:672
Time GetChannelSwitchDelay(void) const
Definition: wifi-phy.cc:734
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
Definition: wifi-phy.cc:3139
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
Definition: wifi-phy.cc:3307
static WifiMode GetHeMcs8()
Return MCS 8 from HE MCS values.
Definition: wifi-phy.cc:3512
void Configure80211g(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11g standard...
Definition: wifi-phy.cc:853
static WifiMode GetHePlcpHeaderMode()
Definition: wifi-phy.cc:1719
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1042
void SetSleepMode(void)
Put in sleep mode.
Definition: wifi-phy.cc:1592
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:1850
double noise
in dBm
Definition: wifi-phy.h:75
void StartRx(Ptr< Packet > packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr< InterferenceHelper::Event > event)
Starting receiving the packet after having detected the medium is idle or after a reception switch...
Definition: wifi-phy.cc:3683
WifiModeList m_deviceRateSet
This vector holds the set of transmission modes that this WifiPhy(-derived class) can support...
Definition: wifi-phy.h:1810
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:2349
Time GetPayloadDuration(uint32_t size, WifiTxVector txVector, uint16_t frequency)
Definition: wifi-phy.cc:2003
void SetNumberOfAntennas(uint8_t antennas)
Definition: wifi-phy.cc:1286
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
Definition: wifi-phy.cc:3115
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
Definition: wifi-phy.cc:3291
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:2669
static WifiMode GetVhtMcs9()
Return MCS 9 from VHT MCS values.
Definition: wifi-phy.cc:3438
virtual void ConfigureStandard(WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1137
void AddSupportedChannelWidth(uint8_t channelwidth)
Definition: wifi-phy.cc:1399
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2933
double GetEdThresholdW(void) const
Return the energy detection threshold.
Definition: wifi-phy.cc:471
double m_txPowerEndDbm
Maximum transmission power (dBm)
Definition: wifi-phy.h:1827
uint8_t GetNumberOfAntennas(void) const
Definition: wifi-phy.cc:1294
The MPDU is part of an A-MPDU, but is not the last aggregate.
Definition: wifi-phy.h:66
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
Definition: wifi-phy.cc:648
static WifiMode GetPlcpHeaderMode(WifiTxVector txVector)
Definition: wifi-phy.cc:1834
static Time GetPlcpTrainingSymbolDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1725
Ptr< InterferenceHelper::Event > m_currentEvent
Hold the current event.
Definition: wifi-phy.h:1856
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2981
MpduType type
type
Definition: wifi-phy.h:81
Time m_channelSwitchDelay
Time required to switch between channel.
Definition: wifi-phy.h:1849
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3092
double m_ccaMode1ThresholdW
Clear channel assessment (CCA) threshold in watts.
Definition: wifi-phy.h:1823
double GetCcaMode1Threshold(void) const
Return the CCA threshold (dBm).
Definition: wifi-phy.cc:490
uint8_t FindChannelNumberForFrequencyWidth(uint16_t frequency, uint8_t width) const
Look for channel number matching the frequency and width.
Definition: wifi-phy.cc:1059
bool IsStateIdle(void) const
Definition: wifi-phy.cc:3600
uint8_t m_numberOfAntennas
Number of transmitters.
Definition: wifi-phy.h:1838
static Time GetPlcpHeaderDuration(WifiTxVector txVector)
Definition: wifi-phy.cc:1880
a unique identifier for an interface.
Definition: type-id.h:58
MpduType
This enumeration defines the type of an MPDU.
Definition: wifi-phy.h:61
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
Definition: wifi-phy.cc:3227
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
Definition: wifi-phy.cc:3131
uint8_t m_rxSpatialStreams
Number of supported RX spatial streams.
Definition: wifi-phy.h:1840
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:2810
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
Definition: wifi-phy.cc:3648
bool m_shortGuardInterval
Flag if HT/VHT short guard interval is supported.
Definition: wifi-phy.h:1833
WifiPhyStandard GetStandard(void) const
Get the configured Wi-Fi standard.
Definition: wifi-phy.cc:1197
double GetRxGain(void) const
Return the reception gain (dB).
Definition: wifi-phy.cc:569
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:3759
static WifiMode GetHeMcs6()
Return MCS 6 from HE MCS values.
Definition: wifi-phy.cc:3496
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
Definition: wifi-phy.cc:3570
static WifiMode GetHtPlcpHeaderMode()
Definition: wifi-phy.cc:1707
double GetTxPowerStart(void) const
Return the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:517
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:3044
bool m_stbc
Flag if STBC is used.
Definition: wifi-phy.h:1831
Callback< void > m_capabilitiesChangedCallback
Callback when PHY capabilities changed.
Definition: wifi-phy.h:1860
void Configure80211a(void)
Configure WifiPhy with appropriate channel frequency and supported rates for 802.11a standard...
Definition: wifi-phy.cc:827
std::map< ChannelNumberStandardPair, FrequencyWidthPair > ChannelToFrequencyWidthMap
channel to frequency width map typedef
Definition: wifi-phy.h:1842
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:2909
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1713
uint16_t m_initialFrequency
Store frequency until initialization.
Definition: wifi-phy.h:1818
bool DoChannelSwitch(uint8_t id)
The default implementation does nothing and returns true.
Definition: wifi-phy.cc:1488