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  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #ifndef WIFI_PHY_H
22 #define WIFI_PHY_H
23 
24 #include <stdint.h>
25 #include "ns3/callback.h"
26 #include "ns3/packet.h"
27 #include "ns3/object.h"
28 #include "ns3/nstime.h"
29 #include "ns3/ptr.h"
30 #include "wifi-mode.h"
31 #include "wifi-preamble.h"
32 #include "wifi-phy-standard.h"
33 #include "ns3/traced-callback.h"
34 #include "wifi-tx-vector.h"
35 
36 namespace ns3 {
37 
38 class WifiChannel;
39 class NetDevice;
40 
45 {
46 public:
47  virtual ~WifiPhyListener ();
48 
61  virtual void NotifyRxStart (Time duration) = 0;
67  virtual void NotifyRxEndOk (void) = 0;
73  virtual void NotifyRxEndError (void) = 0;
84  virtual void NotifyTxStart (Time duration, double txPowerDbm) = 0;
85 
101  virtual void NotifyMaybeCcaBusyStart (Time duration) = 0;
109  virtual void NotifySwitchingStart (Time duration) = 0;
113  virtual void NotifySleep (void) = 0;
117  virtual void NotifyWakeup (void) = 0;
118 };
119 
120 
126 class WifiPhy : public Object
127 {
128 public:
132  enum State
133  {
145  TX,
149  RX,
158  };
159 
172 
173  static TypeId GetTypeId (void);
174 
175  WifiPhy ();
176  virtual ~WifiPhy ();
177 
183  virtual double GetTxPowerStart (void) const = 0;
189  virtual double GetTxPowerEnd (void) const = 0;
193  virtual uint32_t GetNTxPower (void) const = 0;
194 
199  virtual void SetReceiveOkCallback (RxOkCallback callback) = 0;
204  virtual void SetReceiveErrorCallback (RxErrorCallback callback) = 0;
205 
214  virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType) = 0;
215 
222  virtual void RegisterListener (WifiPhyListener *listener) = 0;
229  virtual void UnregisterListener (WifiPhyListener *listener) = 0;
230 
234  virtual void SetSleepMode (void) = 0;
238  virtual void ResumeFromSleep (void) = 0;
239 
243  virtual bool IsStateIdle (void) = 0;
247  virtual bool IsStateCcaBusy (void) = 0;
251  virtual bool IsStateBusy (void) = 0;
255  virtual bool IsStateRx (void) = 0;
259  virtual bool IsStateTx (void) = 0;
263  virtual bool IsStateSwitching (void) = 0;
267  virtual bool IsStateSleep (void) = 0;
271  virtual Time GetStateDuration (void) = 0;
278  virtual Time GetDelayUntilIdle (void) = 0;
279 
285  virtual Time GetLastRxStartTime (void) const = 0;
286 
297  Time CalculateTxDuration (uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag);
298 
304  Time CalculatePlcpDuration (WifiTxVector txvector, enum WifiPreamble preamble);
305 
312  static Time GetPlcpHtTrainingSymbolDuration (WifiPreamble preamble, WifiTxVector txvector);
319  static WifiMode GetMFPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
325  static Time GetPlcpHtSigHeaderDuration (WifiPreamble preamble);
326 
327 
334  static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
335 
342  static Time GetPlcpHeaderDuration (WifiMode payloadMode, WifiPreamble preamble);
343 
350  static Time GetPlcpPreambleDuration (WifiMode payloadMode, WifiPreamble preamble);
351 
362  Time GetPayloadDuration (uint32_t size, WifiTxVector txvector, WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag);
363 
381  virtual uint32_t GetNModes (void) const = 0;
400  virtual WifiMode GetMode (uint32_t mode) const = 0;
408  virtual bool IsModeSupported (WifiMode mode) const = 0;
415  virtual double CalculateSnr (WifiMode txMode, double ber) const = 0;
427  virtual uint32_t GetNBssMembershipSelectors (void) const=0;
428 
441  virtual uint32_t GetBssMembershipSelector (uint32_t selector) const=0;
456  virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)=0;
468  virtual uint8_t GetNMcs (void) const=0;
481  virtual uint8_t GetMcs (uint8_t mcs) const=0;
482 
490  virtual uint32_t WifiModeToMcs (WifiMode mode)=0;
498  virtual WifiMode McsToWifiMode (uint8_t mcs)=0;
499 
500 
511  virtual void SetChannelNumber (uint16_t id) = 0;
517  virtual uint16_t GetChannelNumber (void) const = 0;
521  virtual Time GetChannelSwitchDelay (void) const = 0;
522 
528  virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0;
529 
535  virtual Ptr<WifiChannel> GetChannel (void) const = 0;
536 
542  static WifiMode GetDsssRate1Mbps ();
548  static WifiMode GetDsssRate2Mbps ();
554  static WifiMode GetDsssRate5_5Mbps ();
560  static WifiMode GetDsssRate11Mbps ();
566  static WifiMode GetErpOfdmRate6Mbps ();
572  static WifiMode GetErpOfdmRate9Mbps ();
578  static WifiMode GetErpOfdmRate12Mbps ();
584  static WifiMode GetErpOfdmRate18Mbps ();
590  static WifiMode GetErpOfdmRate24Mbps ();
596  static WifiMode GetErpOfdmRate36Mbps ();
602  static WifiMode GetErpOfdmRate48Mbps ();
608  static WifiMode GetErpOfdmRate54Mbps ();
614  static WifiMode GetOfdmRate6Mbps ();
620  static WifiMode GetOfdmRate9Mbps ();
626  static WifiMode GetOfdmRate12Mbps ();
632  static WifiMode GetOfdmRate18Mbps ();
638  static WifiMode GetOfdmRate24Mbps ();
644  static WifiMode GetOfdmRate36Mbps ();
650  static WifiMode GetOfdmRate48Mbps ();
656  static WifiMode GetOfdmRate54Mbps ();
849  //Rates for clause 20 with short guard interval
948 
949 
956  void NotifyTxBegin (Ptr<const Packet> packet);
957 
964  void NotifyTxEnd (Ptr<const Packet> packet);
965 
972  void NotifyTxDrop (Ptr<const Packet> packet);
973 
980  void NotifyRxBegin (Ptr<const Packet> packet);
981 
988  void NotifyRxEnd (Ptr<const Packet> packet);
989 
996  void NotifyRxDrop (Ptr<const Packet> packet);
997 
1017  void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz,
1018  uint16_t channelNumber, uint32_t rate,
1019  bool isShortPreamble, double signalDbm,
1020  double noiseDbm);
1021 
1041  typedef void (* MonitorSnifferRxCallback)
1042  (Ptr<const Packet> packet, uint16_t channelFreqMhz,
1043  uint16_t channelNumber, uint32_t rate,
1044  bool isShortPreamble, double signalDbm,
1045  double noiseDbm);
1046 
1060  void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz,
1061  uint16_t channelNumber, uint32_t rate,
1062  bool isShortPreamble, uint8_t txPower);
1063 
1076  typedef void (* MonitorSnifferTxCallback)
1077  (const Ptr<const Packet> packet, uint16_t channelFreqMhz,
1078  uint16_t channelNumber, uint32_t rate,
1079  bool isShortPreamble, uint8_t txPower);
1080 
1081 
1090  virtual int64_t AssignStreams (int64_t stream) = 0;
1091 
1095  virtual void SetFrequency (uint32_t freq)=0;
1099  virtual uint32_t GetFrequency (void) const=0;
1103  virtual void SetNumberOfTransmitAntennas (uint32_t tx)=0;
1104 
1108  virtual uint32_t GetNumberOfTransmitAntennas (void) const=0;
1112  virtual void SetNumberOfReceiveAntennas (uint32_t rx)=0 ;
1116  virtual uint32_t GetNumberOfReceiveAntennas (void) const=0;
1120  virtual void SetGuardInterval (bool guardInterval)=0;
1124  virtual bool GetGuardInterval (void) const = 0;
1128  virtual void SetLdpc (bool ldpc)=0;
1132  virtual bool GetLdpc (void) const=0;
1136  virtual void SetStbc (bool stbc)=0;
1140  virtual bool GetStbc (void) const=0;
1141 
1145  virtual void SetGreenfield (bool greenfield)=0;
1149  virtual bool GetGreenfield (void) const=0;
1153  virtual bool GetChannelBonding (void) const = 0;
1157  virtual void SetChannelBonding (bool channelbonding) = 0 ;
1158 
1159 private:
1167 
1175 
1183 
1191 
1199 
1206 
1217  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool, double, double> m_phyMonitorSniffRxTrace;
1218 
1229  TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool,uint8_t> m_phyMonitorSniffTxTrace;
1230 
1232  uint32_t m_totalAmpduSize;
1233 };
1234 
1240 std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state);
1241 
1242 } // namespace ns3
1243 
1244 #endif /* WIFI_PHY_H */
static WifiMode GetOfdmRate9MbpsBW5MHz()
Return a WifiMode for OFDM at 9Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1092
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: wifi-phy.h:1190
static WifiMode GetErpOfdmRate24Mbps()
Return a WifiMode for ERP-OFDM at 24Mbps.
Definition: wifi-phy.cc:760
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for DSSS at 11Mbps.
Definition: wifi-phy.cc:692
virtual uint32_t GetFrequency(void) const =0
virtual uint32_t GetNumberOfTransmitAntennas(void) const =0
virtual Ptr< WifiChannel > GetChannel(void) const =0
Return the WifiChannel this WifiPhy is connected to.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
static WifiMode GetErpOfdmRate36Mbps()
Return a WifiMode for ERP-OFDM at 36Mbps.
Definition: wifi-phy.cc:773
static WifiMode GetOfdmRate26MbpsBW20MHz()
Return a WifiMode for OFDM at 26Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1210
virtual void ConfigureStandard(enum WifiPhyStandard standard)=0
Configure the PHY-level parameters for different Wi-Fi standard.
Callback template class.
Definition: callback.h:984
static WifiMode GetOfdmRate9Mbps()
Return a WifiMode for OFDM at 9Mbps.
Definition: wifi-phy.cc:828
static WifiMode GetOfdmRate7_2MbpsBW20MHz()
Return a WifiMode for OFDM at 7.2Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1145
static WifiMode GetOfdmRate18MbpsBW10MHz()
Return a WifiMode for OFDM at 18Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:986
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:1012
virtual void NotifyTxStart(Time duration, double txPowerDbm)=0
static WifiMode GetOfdmRate3MbpsBW5MHz()
Return a WifiMode for OFDM at 3Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1053
virtual void NotifyWakeup(void)=0
Notify listeners that we woke up.
virtual ~WifiPhy()
Definition: wifi-phy.cc:115
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1Mbps.
Definition: wifi-phy.cc:650
void NotifyMonitorSniffTx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower)
Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.
Definition: wifi-phy.cc:641
virtual uint32_t GetNModes(void) const =0
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
static WifiMode GetOfdmRate81MbpsBW40MHz()
Return a WifiMode for OFDM at 81Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1443
802.11 PHY layer model
Definition: wifi-phy.h:126
static WifiMode GetErpOfdmRate18Mbps()
Return a WifiMode for ERP-OFDM at 18Mbps.
Definition: wifi-phy.cc:747
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy.h:141
void(* MonitorSnifferTxCallback)(const Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower)
TracedCallback signature for monitor mode transmit events.
Definition: wifi-phy.h:1077
Forward calls to a chain of Callback.
static Time GetPlcpHtSigHeaderDuration(WifiPreamble preamble)
Definition: wifi-phy.cc:173
uint32_t m_totalAmpduNumSymbols
Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the ...
Definition: wifi-phy.h:1231
static WifiMode GetOfdmRate12Mbps()
Return a WifiMode for OFDM at 12Mbps.
Definition: wifi-phy.cc:841
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: wifi-phy.h:1198
virtual uint8_t GetNMcs(void) const =0
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
static WifiMode GetOfdmRate43_3MbpsBW20MHz()
Return a WifiMode for OFDM at 43.3Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1249
virtual double CalculateSnr(WifiMode txMode, double ber) const =0
static WifiMode GetOfdmRate60MbpsBW40MHz()
Return a WifiMode for OFDM at 60Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1430
static WifiMode GetOfdmRate1_5MbpsBW5MHz()
Return a WifiMode for OFDM at 1.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1027
The PHY layer is sleeping.
Definition: wifi-phy.h:157
static WifiMode GetOfdmRate4_5MbpsBW10MHz()
Return a WifiMode for OFDM at 4.5Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:934
static WifiMode GetMFPlcpHeaderMode(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:122
static WifiMode GetOfdmRate54Mbps()
Return a WifiMode for OFDM at 54Mbps.
Definition: wifi-phy.cc:906
virtual void SetLdpc(bool ldpc)=0
virtual void SetNumberOfReceiveAntennas(uint32_t rx)=0
virtual bool GetLdpc(void) const =0
virtual uint8_t GetMcs(uint8_t mcs) const =0
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
void NotifyTxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyTxDrop trace.
Definition: wifi-phy.cc:611
static WifiMode GetOfdmRate108MbpsBW40MHz()
Return a WifiMode for OFDM at 108Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1468
Callback< void, Ptr< Packet >, double, WifiTxVector, enum WifiPreamble > RxOkCallback
arg1: packet received successfully arg2: snr of packet arg3: TXVECTOR of packet arg4: type of preambl...
Definition: wifi-phy.h:166
static WifiMode GetOfdmRate21_7MbpsBW20MHz()
Return a WifiMode for OFDM at 21.7Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1196
void NotifyTxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyTxBegin trace.
Definition: wifi-phy.cc:599
virtual uint32_t WifiModeToMcs(WifiMode mode)=0
For a given WifiMode finds the corresponding MCS value and returns it as defined in the IEEE 802...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:93
static WifiMode GetOfdmRate135MbpsBW40MHz()
Return a WifiMode for OFDM at 135Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1516
static WifiMode GetOfdmRate36Mbps()
Return a WifiMode for OFDM at 36Mbps.
Definition: wifi-phy.cc:880
static WifiMode GetOfdmRate6MbpsBW5MHz()
Return a WifiMode for OFDM at 6Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1079
virtual bool IsStateCcaBusy(void)=0
virtual void RegisterListener(WifiPhyListener *listener)=0
virtual void NotifySwitchingStart(Time duration)=0
virtual void ResumeFromSleep(void)=0
Resume from sleep mode.
virtual bool IsStateIdle(void)=0
static WifiMode GetErpOfdmRate54Mbps()
Return a WifiMode for ERP-OFDM at 54Mbps.
Definition: wifi-phy.cc:799
void NotifyRxDrop(Ptr< const Packet > packet)
Public method used to fire a PhyRxDrop trace.
Definition: wifi-phy.cc:629
virtual bool IsStateSleep(void)=0
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:29
static WifiMode GetOfdmRate6_5MbpsBW20MHz()
Return a WifiMode for OFDM at 6.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1133
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
virtual bool GetStbc(void) const =0
Callback< void, Ptr< const Packet >, double > RxErrorCallback
arg1: packet received unsuccessfully arg2: snr of packet
Definition: wifi-phy.h:171
virtual void NotifyRxEndOk(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
static WifiMode GetOfdmRate135MbpsBW40MHzShGi()
Return a WifiMode for OFDM at 135Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1504
virtual void SetFrequency(uint32_t freq)=0
virtual void SetReceiveErrorCallback(RxErrorCallback callback)=0
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, bool, uint8_t > m_phyMonitorSniffTxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being transmitted...
Definition: wifi-phy.h:1229
receive notifications about phy events.
Definition: wifi-phy.h:44
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:1182
virtual void SetGuardInterval(bool guardInterval)=0
The PHY layer is IDLE.
Definition: wifi-phy.h:137
static WifiMode GetErpOfdmRate48Mbps()
Return a WifiMode for ERP-OFDM at 48Mbps.
Definition: wifi-phy.cc:786
static WifiMode GetPlcpHeaderMode(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:190
virtual Time GetDelayUntilIdle(void)=0
virtual void SendPacket(Ptr< const Packet > packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType)=0
static WifiMode GetOfdmRate12MbpsBW10MHz()
Return a WifiMode for OFDM at 12Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:973
The PHY layer is receiving a packet.
Definition: wifi-phy.h:149
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: wifi-phy.h:1205
virtual bool IsModeSupported(WifiMode mode) const =0
Check if the given WifiMode is supported by the PHY.
virtual bool GetGuardInterval(void) const =0
virtual ~WifiPhyListener()
Definition: wifi-phy.cc:43
virtual void SetNumberOfTransmitAntennas(uint32_t tx)=0
void NotifyRxBegin(Ptr< const Packet > packet)
Public method used to fire a PhyRxBegin trace.
Definition: wifi-phy.cc:617
static WifiMode GetOfdmRate19_5MbpsBW20MHz()
Return a WifiMode for OFDM at 19.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1183
The PHY layer is sending a packet.
Definition: wifi-phy.h:145
static WifiMode GetOfdmRate18Mbps()
Return a WifiMode for OFDM at 18Mbps.
Definition: wifi-phy.cc:854
Time CalculateTxDuration(uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag)
Definition: wifi-phy.cc:577
static WifiMode GetOfdmRate9MbpsBW10MHz()
Return a WifiMode for OFDM at 9Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:960
TracedCallback< Ptr< const Packet >, uint16_t, uint16_t, uint32_t, bool, double, double > m_phyMonitorSniffRxTrace
A trace source that emulates a wifi device in monitor mode sniffing a packet being received...
Definition: wifi-phy.h:1217
static WifiMode GetOfdmRate12MbpsBW5MHz()
Return a WifiMode for OFDM at 12Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1105
virtual uint32_t GetNBssMembershipSelectors(void) const =0
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
static WifiMode GetOfdmRate52MbpsBW20MHz()
Return a WifiMode for OFDM at 52Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1262
The PHY layer is switching to other channel.
Definition: wifi-phy.h:153
static WifiMode GetOfdmRate40_5MbpsBW40MHz()
Return a WifiMode for OFDM at 40.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1392
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: wifi-phy.h:1166
virtual bool IsStateSwitching(void)=0
static WifiMode GetOfdmRate72_2MbpsBW20MHz()
Return a WifiMode for OFDM at 72.2Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1328
static WifiMode GetOfdmRate65MbpsBW20MHzShGi()
Return a WifiMode for OFDM at 65Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1302
virtual bool IsStateBusy(void)=0
static WifiMode GetOfdmRate48Mbps()
Return a WifiMode for OFDM at 48Mbps.
Definition: wifi-phy.cc:893
virtual void NotifySleep(void)=0
Notify listeners that we went to sleep.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
static Time GetPlcpHeaderDuration(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:263
void NotifyMonitorSniffRx(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
Public method used to fire a MonitorSniffer trace for a wifi packet being received.
Definition: wifi-phy.cc:635
virtual Time GetChannelSwitchDelay(void) const =0
static TypeId GetTypeId(void)
Definition: wifi-phy.cc:54
static Time GetPlcpHtTrainingSymbolDuration(WifiPreamble preamble, WifiTxVector txvector)
Definition: wifi-phy.cc:136
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static WifiMode GetOfdmRate57_8MbpsBW20MHz()
Return a WifiMode for OFDM at 57.8Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1275
virtual void UnregisterListener(WifiPhyListener *listener)=0
static WifiMode GetOfdmRate24Mbps()
Return a WifiMode for OFDM at 24Mbps.
Definition: wifi-phy.cc:867
virtual uint32_t GetBssMembershipSelector(uint32_t selector) const =0
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
static WifiMode GetOfdmRate13MbpsBW20MHz()
Return a WifiMode for OFDM at 13Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1158
virtual bool IsStateRx(void)=0
virtual void SetGreenfield(bool greenfield)=0
virtual Time GetStateDuration(void)=0
static WifiMode GetOfdmRate65MbpsBW20MHz()
Return a WifiMode for OFDM at 65Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1315
virtual uint16_t GetChannelNumber(void) const =0
Return current channel number.
static WifiMode GetOfdmRate58_5MbpsBW20MHz()
Return a WifiMode for OFDM at 58.5Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1289
virtual WifiMode GetMode(uint32_t mode) const =0
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for DSSS at 5.5Mbps.
Definition: wifi-phy.cc:679
virtual void SetStbc(bool stbc)=0
static WifiMode GetOfdmRate2_25MbpsBW5MHz()
Return a WifiMode for OFDM at 2.25Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1040
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes...
Definition: wifi-mode.h:177
static WifiMode GetErpOfdmRate9Mbps()
Return a WifiMode for ERP-OFDM at 9Mbps.
Definition: wifi-phy.cc:721
void NotifyTxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyTxEnd trace.
Definition: wifi-phy.cc:605
virtual void SetChannelNumber(uint16_t id)=0
Set channel number.
virtual bool IsStateTx(void)=0
virtual void NotifyRxStart(Time duration)=0
virtual void NotifyRxEndError(void)=0
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
virtual double GetTxPowerEnd(void) const =0
Return the maximum available transmission power level (dBm).
static WifiMode GetOfdmRate15MbpsBW40MHz()
Return a WifiMode for OFDM at 15Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1354
static WifiMode GetOfdmRate121_5MbpsBW40MHz()
Return a WifiMode for OFDM at 121.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1492
static WifiMode GetOfdmRate28_9MbpsBW20MHz()
Return a WifiMode for OFDM at 28.9Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1223
static WifiMode GetErpOfdmRate6Mbps()
Return a WifiMode for ERP-OFDM at 6Mbps.
Definition: wifi-phy.cc:708
virtual double GetTxPowerStart(void) const =0
Return the minimum available transmission power level (dBm).
virtual bool GetChannelBonding(void) const =0
static WifiMode GetErpOfdmRate12Mbps()
Return a WifiMode for ERP-OFDM at 12Mbps.
Definition: wifi-phy.cc:734
void NotifyRxEnd(Ptr< const Packet > packet)
Public method used to fire a PhyRxEnd trace.
Definition: wifi-phy.cc:623
static WifiMode GetOfdmRate13_5MbpsBW40MHz()
Return a WifiMode for OFDM at 13.5Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1341
static WifiMode GetOfdmRate30MbpsBW40MHz()
Return a WifiMode for OFDM at 30Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1379
virtual uint32_t GetNTxPower(void) const =0
static WifiMode GetOfdmRate54MbpsBW40MHz()
Return a WifiMode for OFDM at 54Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1417
virtual void SetSleepMode(void)=0
Put in sleep mode.
virtual void SetReceiveOkCallback(RxOkCallback callback)=0
Time CalculatePlcpDuration(WifiTxVector txvector, enum WifiPreamble preamble)
Definition: wifi-phy.cc:588
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model...
virtual void SetChannelBonding(bool channelbonding)=0
static WifiMode GetOfdmRate90MbpsBW40MHz()
Return a WifiMode for OFDM at 90Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1455
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:1232
static WifiMode GetOfdmRate45MbpsBW40MHz()
Return a WifiMode for OFDM at 45Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1404
static WifiMode GetOfdmRate120MbpsBW40MHz()
Return a WifiMode for OFDM at 120Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1480
static WifiMode GetOfdmRate39MbpsBW20MHz()
Return a WifiMode for OFDM at 39Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1236
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:663
static WifiMode GetOfdmRate6MbpsBW10MHz()
Return a WifiMode for OFDM at 6Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:947
State
The state of the PHY layer.
Definition: wifi-phy.h:132
static WifiMode GetOfdmRate24MbpsBW10MHz()
Return a WifiMode for OFDM at 24Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:999
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)=0
The WifiPhy::GetMembershipSelectorModes() method is used (e.g., by a WifiRemoteStationManager) to det...
static WifiMode GetOfdmRate13_5MbpsBW5MHz()
Return a WifiMode for OFDM at 13.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1118
virtual Time GetLastRxStartTime(void) const =0
Return the start time of the last received packet.
a unique identifier for an interface.
Definition: type-id.h:57
virtual WifiMode McsToWifiMode(uint8_t mcs)=0
For a given MCS finds the corresponding WifiMode and returns it as defined in the IEEE 802...
Time GetPayloadDuration(uint32_t size, WifiTxVector txvector, WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag)
Definition: wifi-phy.cc:383
void(* MonitorSnifferRxCallback)(Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
TracedCallback signature for monitor mode receive events.
Definition: wifi-phy.h:1042
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6Mbps.
Definition: wifi-phy.cc:815
static WifiMode GetOfdmRate27MbpsBW40MHz()
Return a WifiMode for OFDM at 27Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1367
virtual bool GetGreenfield(void) const =0
virtual uint32_t GetNumberOfReceiveAntennas(void) const =0
static WifiMode GetOfdmRate4_5MbpsBW5MHz()
Return a WifiMode for OFDM at 4.5Mbps with 5MHz channel spacing.
Definition: wifi-phy.cc:1066
static WifiMode GetOfdmRate14_4MbpsBW20MHz()
Return a WifiMode for OFDM at 14.4Mbps with 20MHz channel spacing.
Definition: wifi-phy.cc:1171
static WifiMode GetOfdmRate3MbpsBW10MHz()
Return a WifiMode for OFDM at 3Mbps with 10MHz channel spacing.
Definition: wifi-phy.cc:921
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium. ...
Definition: wifi-phy.h:1174
virtual void NotifyMaybeCcaBusyStart(Time duration)=0
static WifiMode GetOfdmRate150MbpsBW40MHz()
Return a WifiMode for OFDM at 150Mbps with 40MHz channel spacing.
Definition: wifi-phy.cc:1529
static Time GetPlcpPreambleDuration(WifiMode payloadMode, WifiPreamble preamble)
Definition: wifi-phy.cc:330