A Discrete-Event Network Simulator
API
eht-phy.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 DERONNE SOFTWARE ENGINEERING
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18  */
19 
20 #include "eht-phy.h"
21 
22 #include "eht-ppdu.h"
23 
24 #include "ns3/interference-helper.h"
25 #include "ns3/wifi-phy.h"
26 #include "ns3/wifi-psdu.h"
27 #include "ns3/wifi-utils.h"
28 
29 namespace ns3
30 {
31 
32 NS_LOG_COMPONENT_DEFINE("EhtPhy");
33 
34 /*******************************************************
35  * EHT PHY (P802.11be/D1.5)
36  *******************************************************/
37 
38 // clang-format off
39 
41  { WIFI_PREAMBLE_EHT_MU, { WIFI_PPDU_FIELD_PREAMBLE, // L-STF + L-LTF
42  WIFI_PPDU_FIELD_NON_HT_HEADER, // L-SIG + RL-SIG
43  WIFI_PPDU_FIELD_U_SIG, // U-SIG
44  WIFI_PPDU_FIELD_EHT_SIG, // EHT-SIG
45  WIFI_PPDU_FIELD_TRAINING, // EHT-STF + EHT-LTFs
47  { WIFI_PREAMBLE_EHT_TB, { WIFI_PPDU_FIELD_PREAMBLE, // L-STF + L-LTF
48  WIFI_PPDU_FIELD_NON_HT_HEADER, // L-SIG + RL-SIG
49  WIFI_PPDU_FIELD_U_SIG, // U-SIG
50  WIFI_PPDU_FIELD_TRAINING, // EHT-STF + EHT-LTFs
52 };
53 
54 // clang-format on
55 
56 EhtPhy::EhtPhy(bool buildModeList /* = true */)
57  : HePhy(false) // don't add HE modes to list
58 {
59  NS_LOG_FUNCTION(this << buildModeList);
61  m_maxMcsIndexPerSs = 13;
63  if (buildModeList)
64  {
65  BuildModeList();
66  }
67 }
68 
70 {
71  NS_LOG_FUNCTION(this);
72 }
73 
74 void
76 {
77  NS_LOG_FUNCTION(this);
78  NS_ASSERT(m_modeList.empty());
80  for (uint8_t index = 0; index <= m_maxSupportedMcsIndexPerSs; ++index)
81  {
82  NS_LOG_LOGIC("Add EhtMcs" << +index << " to list");
83  m_modeList.emplace_back(CreateEhtMcs(index));
84  }
85 }
86 
88 EhtPhy::GetSigMode(WifiPpduField field, const WifiTxVector& txVector) const
89 {
90  switch (field)
91  {
93  return GetSigAMode(); // U-SIG is similar to SIG-A
95  return GetSigBMode(txVector); // EHT-SIG is similar to SIG-B
96  default:
97  return HePhy::GetSigMode(field, txVector);
98  }
99 }
100 
101 WifiMode
102 EhtPhy::GetSigBMode(const WifiTxVector& txVector) const
103 {
104  if (txVector.IsDlMu())
105  {
106  return HePhy::GetSigBMode(txVector);
107  }
108  // we get here in case of EHT SU transmission
109  // TODO fix the MCS used for EHT-SIG
110  auto smallestMcs = std::min<uint8_t>(5, txVector.GetMode().GetMcsValue());
111  return VhtPhy::GetVhtMcs(smallestMcs);
112 }
113 
114 Time
115 EhtPhy::GetDuration(WifiPpduField field, const WifiTxVector& txVector) const
116 {
117  switch (field)
118  {
120  return GetSigADuration(txVector.GetPreambleType()); // U-SIG is similar to SIG-A
122  return GetSigBDuration(txVector); // EHT-SIG is similar to SIG-B
124  [[fallthrough]];
126  return NanoSeconds(0);
127  default:
128  return HePhy::GetDuration(field, txVector);
129  }
130 }
131 
132 uint32_t
133 EhtPhy::GetSigBSize(const WifiTxVector& txVector) const
134 {
135  if (ns3::IsDlMu(txVector.GetPreambleType()) && ns3::IsEht(txVector.GetPreambleType()))
136  {
138  txVector.GetChannelWidth(),
139  txVector.GetRuAllocation(
141  txVector.GetEhtPpduType(),
142  txVector.IsSigBCompression(),
143  txVector.IsSigBCompression() ? txVector.GetHeMuUserInfoMap().size() : 0);
144  }
145  return HePhy::GetSigBSize(txVector);
146 }
147 
148 Time
150 {
151  Time duration = GetDuration(WIFI_PPDU_FIELD_PREAMBLE, txVector) +
154  return duration;
155 }
156 
157 Time
159 {
160  Time duration = GetDuration(WIFI_PPDU_FIELD_PREAMBLE, txVector) +
164  return duration;
165 }
166 
169 {
170  return m_ehtPpduFormats;
171 }
172 
174 EhtPhy::BuildPpdu(const WifiConstPsduMap& psdus, const WifiTxVector& txVector, Time ppduDuration)
175 {
176  NS_LOG_FUNCTION(this << psdus << txVector << ppduDuration);
177  return Create<EhtPpdu>(psdus,
178  txVector,
180  ppduDuration,
181  ObtainNextUid(txVector),
183 }
184 
187 {
188  NS_LOG_FUNCTION(this << field << *event);
189  switch (field)
190  {
192  [[fallthrough]];
194  return EndReceiveSig(event, field);
195  default:
196  return HePhy::DoEndReceiveField(field, event);
197  }
198 }
199 
202 {
203  NS_LOG_FUNCTION(this << *event << status << field);
204  switch (field)
205  {
207  return ProcessSigA(event, status); // U-SIG is similar to SIG-A
209  return ProcessSigB(event, status); // EHT-SIG is similar to SIG-B
210  default:
211  return HePhy::ProcessSig(event, status, field);
212  }
213  return status;
214 }
215 
218 {
219  switch (field)
220  {
222  return U_SIG_FAILURE;
224  return EHT_SIG_FAILURE;
225  default:
226  return HePhy::GetFailureReason(field);
227  }
228 }
229 
230 void
232 {
233  for (uint8_t i = 0; i <= 13; ++i)
234  {
235  GetEhtMcs(i);
236  }
237 }
238 
239 WifiMode
240 EhtPhy::GetEhtMcs(uint8_t index)
241 {
242 #define CASE(x) \
243  case x: \
244  return GetEhtMcs##x();
245 
246  switch (index)
247  {
248  CASE(0)
249  CASE(1)
250  CASE(2)
251  CASE(3)
252  CASE(4)
253  CASE(5)
254  CASE(6)
255  CASE(7)
256  CASE(8)
257  CASE(9)
258  CASE(10)
259  CASE(11)
260  CASE(12)
261  CASE(13)
262  default:
263  NS_ABORT_MSG("Inexistent index (" << +index << ") requested for EHT");
264  return WifiMode();
265  }
266 #undef CASE
267 }
268 
269 #define GET_EHT_MCS(x) \
270  WifiMode EhtPhy::GetEhtMcs##x() \
271  { \
272  static WifiMode mcs = CreateEhtMcs(x); \
273  return mcs; \
274  }
275 
276 GET_EHT_MCS(0)
277 GET_EHT_MCS(1)
278 GET_EHT_MCS(2)
279 GET_EHT_MCS(3)
280 GET_EHT_MCS(4)
281 GET_EHT_MCS(5)
282 GET_EHT_MCS(6)
283 GET_EHT_MCS(7)
284 GET_EHT_MCS(8)
285 GET_EHT_MCS(9)
286 GET_EHT_MCS(10)
287 GET_EHT_MCS(11)
288 GET_EHT_MCS(12)
289 GET_EHT_MCS(13)
290 #undef GET_EHT_MCS
291 
292 WifiMode
293 EhtPhy::CreateEhtMcs(uint8_t index)
294 {
295  NS_ASSERT_MSG(index <= 13, "EhtMcs index must be <= 13!");
296  return WifiModeFactory::CreateWifiMcs("EhtMcs" + std::to_string(index),
297  index,
299  false,
306 }
307 
309 EhtPhy::GetCodeRate(uint8_t mcsValue)
310 {
311  switch (mcsValue)
312  {
313  case 12:
314  return WIFI_CODE_RATE_3_4;
315  case 13:
316  return WIFI_CODE_RATE_5_6;
317  default:
318  return HePhy::GetCodeRate(mcsValue);
319  }
320 }
321 
322 uint16_t
324 {
325  switch (mcsValue)
326  {
327  case 12:
328  [[fallthrough]];
329  case 13:
330  return 4096;
331  default:
332  return HePhy::GetConstellationSize(mcsValue);
333  }
334 }
335 
336 uint64_t
337 EhtPhy::GetPhyRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
338 {
339  WifiCodeRate codeRate = GetCodeRate(mcsValue);
340  uint64_t dataRate = GetDataRate(mcsValue, channelWidth, guardInterval, nss);
341  return HtPhy::CalculatePhyRate(codeRate, dataRate);
342 }
343 
344 uint64_t
345 EhtPhy::GetPhyRateFromTxVector(const WifiTxVector& txVector, uint16_t staId /* = SU_STA_ID */)
346 {
347  uint16_t bw = txVector.GetChannelWidth();
348  if (txVector.IsMu())
349  {
350  bw = HeRu::GetBandwidth(txVector.GetRu(staId).GetRuType());
351  }
352  return EhtPhy::GetPhyRate(txVector.GetMode(staId).GetMcsValue(),
353  bw,
354  txVector.GetGuardInterval(),
355  txVector.GetNss(staId));
356 }
357 
358 uint64_t
359 EhtPhy::GetDataRateFromTxVector(const WifiTxVector& txVector, uint16_t staId /* = SU_STA_ID */)
360 {
361  uint16_t bw = txVector.GetChannelWidth();
362  if (txVector.IsMu())
363  {
364  bw = HeRu::GetBandwidth(txVector.GetRu(staId).GetRuType());
365  }
366  return EhtPhy::GetDataRate(txVector.GetMode(staId).GetMcsValue(),
367  bw,
368  txVector.GetGuardInterval(),
369  txVector.GetNss(staId));
370 }
371 
372 uint64_t
373 EhtPhy::GetDataRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
374 {
375  NS_ASSERT(guardInterval == 800 || guardInterval == 1600 || guardInterval == 3200);
376  NS_ASSERT(nss <= 8);
378  GetUsableSubcarriers(channelWidth),
379  static_cast<uint16_t>(log2(GetConstellationSize(mcsValue))),
380  HtPhy::GetCodeRatio(GetCodeRate(mcsValue)),
381  nss);
382 }
383 
384 uint64_t
386 {
387  WifiCodeRate codeRate = GetCodeRate(mcsValue);
388  uint16_t constellationSize = GetConstellationSize(mcsValue);
389  return CalculateNonHtReferenceRate(codeRate, constellationSize);
390 }
391 
392 uint64_t
393 EhtPhy::CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize)
394 {
395  uint64_t dataRate;
396  switch (constellationSize)
397  {
398  case 4096:
399  if (codeRate == WIFI_CODE_RATE_3_4 || codeRate == WIFI_CODE_RATE_5_6)
400  {
401  dataRate = 54000000;
402  }
403  else
404  {
405  NS_FATAL_ERROR("Trying to get reference rate for a MCS with wrong combination of "
406  "coding rate and modulation");
407  }
408  break;
409  default:
410  dataRate = HePhy::CalculateNonHtReferenceRate(codeRate, constellationSize);
411  }
412  return dataRate;
413 }
414 
415 } // namespace ns3
416 
417 namespace
418 {
419 
424 {
425  public:
427  {
429  ns3::WifiPhy::AddStaticPhyEntity(ns3::WIFI_MOD_CLASS_EHT, ns3::Create<ns3::EhtPhy>());
430  }
432 
433 } // namespace
Constructor class for EHT modes.
Definition: eht-phy.cc:424
static const PpduFormats m_ehtPpduFormats
EHT PPDU formats.
Definition: eht-phy.h:292
static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize)
Return the rate (in bps) of the non-HT Reference Rate which corresponds to the supplied code rate and...
Definition: eht-phy.cc:393
PhyFieldRxStatus ProcessSig(Ptr< Event > event, PhyFieldRxStatus status, WifiPpduField field) override
Process SIG-A or SIG-B, perform amendment-specific actions, and provide an updated status of the rece...
Definition: eht-phy.cc:201
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied EHT MCS index.
Definition: eht-phy.cc:309
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition: eht-phy.cc:88
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied EHT MCS index.
Definition: eht-phy.cc:323
WifiPhyRxfailureReason GetFailureReason(WifiPpduField field) const override
Get the failure reason corresponding to the unsuccessful processing of a given PPDU field.
Definition: eht-phy.cc:217
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the PHY rate corresponding to the supplied TXVECTOR for the STA-ID.
Definition: eht-phy.cc:345
static WifiMode GetEhtMcs(uint8_t index)
Return the EHT MCS corresponding to the provided index.
Definition: eht-phy.cc:240
void BuildModeList() override
Build mode list.
Definition: eht-phy.cc:75
static void InitializeModes()
Initialize all EHT modes.
Definition: eht-phy.cc:231
static WifiMode CreateEhtMcs(uint8_t index)
Create and return the EHT MCS corresponding to the provided index.
Definition: eht-phy.cc:293
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
Definition: eht-phy.cc:168
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId=SU_STA_ID)
Return the data rate corresponding to the supplied TXVECTOR for the STA-ID.
Definition: eht-phy.cc:359
~EhtPhy() override
Destructor for EHT PHY.
Definition: eht-phy.cc:69
uint32_t GetSigBSize(const WifiTxVector &txVector) const override
Definition: eht-phy.cc:133
Time CalculateNonHeDurationForHeTb(const WifiTxVector &txVector) const override
Definition: eht-phy.cc:149
EhtPhy(bool buildModeList=true)
Constructor for EHT PHY.
Definition: eht-phy.cc:56
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition: eht-phy.cc:174
static uint64_t GetNonHtReferenceRate(uint8_t mcsValue)
Calculate the rate in bps of the non-HT Reference Rate corresponding to the supplied HE MCS index.
Definition: eht-phy.cc:385
Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const override
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Definition: eht-phy.cc:115
static uint64_t GetDataRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the data rate corresponding to the supplied EHT MCS index, channel width, guard interval,...
Definition: eht-phy.cc:373
Time CalculateNonHeDurationForHeMu(const WifiTxVector &txVector) const override
Definition: eht-phy.cc:158
static uint64_t GetPhyRate(uint8_t mcsValue, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the PHY rate corresponding to the supplied EHT MCS index, channel width, guard interval,...
Definition: eht-phy.cc:337
WifiMode GetSigBMode(const WifiTxVector &txVector) const override
Definition: eht-phy.cc:102
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
Definition: eht-phy.cc:186
static uint32_t GetEhtSigFieldSize(uint16_t channelWidth, const std::vector< uint8_t > &ruAllocation, uint8_t ehtPpduType, bool compression, std::size_t numMuMimoUsers)
Get variable length EHT-SIG field size.
Definition: eht-ppdu.cc:203
PHY entity for HE (11ax)
Definition: he-phy.h:68
virtual PhyFieldRxStatus ProcessSigB(Ptr< Event > event, PhyFieldRxStatus status)
Process SIG-B, perform amendment-specific actions, and provide an updated status of the reception.
Definition: he-phy.cc:728
Time GetSigBDuration(const WifiTxVector &txVector) const override
Definition: he-phy.cc:236
virtual uint32_t GetSigBSize(const WifiTxVector &txVector) const
Definition: he-phy.cc:220
static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize)
Return the rate (in bps) of the non-HT Reference Rate which corresponds to the supplied code rate and...
Definition: he-phy.cc:1725
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HE MCS index.
Definition: he-phy.cc:1613
PhyFieldRxStatus ProcessSig(Ptr< Event > event, PhyFieldRxStatus status, WifiPpduField field) override
Process SIG-A or SIG-B, perform amendment-specific actions, and provide an updated status of the rece...
Definition: he-phy.cc:590
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition: he-phy.cc:117
uint64_t ObtainNextUid(const WifiTxVector &txVector) override
Obtain the next UID for the PPDU to transmit.
Definition: he-phy.cc:1272
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition: he-phy.cc:1748
static Time GetSymbolDuration(Time guardInterval)
Definition: he-phy.cc:1711
WifiMode GetSigBMode(const WifiTxVector &txVector) const override
Definition: he-phy.cc:146
virtual PhyFieldRxStatus ProcessSigA(Ptr< Event > event, PhyFieldRxStatus status)
Process SIG-A, perform amendment-specific actions, and provide an updated status of the reception.
Definition: he-phy.cc:607
WifiMode GetSigAMode() const override
Definition: he-phy.cc:140
Time GetSigADuration(WifiPreamble preamble) const override
Definition: he-phy.cc:212
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HE MCS index.
Definition: he-phy.cc:1627
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
Definition: he-ppdu.h:116
RuType GetRuType() const
Get the RU type.
Definition: he-ru.cc:454
static uint16_t GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition: he-ru.cc:763
static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate)
Return the PHY rate corresponding to the supplied code rate and data rate.
Definition: ht-phy.cc:657
uint8_t m_bssMembershipSelector
the BSS membership selector
Definition: ht-phy.h:561
uint8_t m_maxMcsIndexPerSs
the maximum MCS index per spatial stream as defined by the standard
Definition: ht-phy.h:559
static uint64_t CalculateDataRate(Time symbolDuration, uint16_t usableSubCarriers, uint16_t numberOfBitsPerSubcarrier, double codingRate, uint8_t nss)
Calculates data rate from the supplied parameters.
Definition: ht-phy.cc:705
static double GetCodeRatio(WifiCodeRate codeRate)
Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
Definition: ht-phy.cc:672
uint8_t m_maxSupportedMcsIndexPerSs
the maximum supported MCS index per spatial stream
Definition: ht-phy.h:560
static uint16_t GetUsableSubcarriers()
Definition: ofdm-phy.cc:631
Ptr< WifiPhy > m_wifiPhy
Pointer to the owning WifiPhy.
Definition: phy-entity.h:981
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition: phy-entity.h:561
std::list< WifiMode > m_modeList
the list of supported modes
Definition: phy-entity.h:985
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const override
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Definition: vht-phy.cc:173
PhyFieldRxStatus EndReceiveSig(Ptr< Event > event, WifiPpduField field)
End receiving the SIG-A or SIG-B, perform VHT-specific actions, and provide the status of the recepti...
Definition: vht-phy.cc:274
static WifiMode GetVhtMcs(uint8_t index)
Return the VHT MCS corresponding to the provided index.
Definition: vht-phy.cc:342
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
Definition: vht-phy.cc:259
virtual WifiPhyRxfailureReason GetFailureReason(WifiPpduField field) const
Get the failure reason corresponding to the unsuccessful processing of a given PPDU field.
Definition: vht-phy.cc:299
static WifiMode CreateWifiMcs(std::string uniqueName, uint8_t mcsValue, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, NonHtReferenceRateCallback nonHtReferenceRateCallback, AllowedCallback isAllowedCallback)
Definition: wifi-mode.cc:318
represent a single transmission mode
Definition: wifi-mode.h:51
uint8_t GetMcsValue() const
Definition: wifi-mode.cc:163
static void AddStaticPhyEntity(WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
Add the PHY entity to the map of implemented PHY entities for the given modulation class.
Definition: wifi-phy.cc:752
const WifiPhyOperatingChannel & GetOperatingChannel() const
Get a const reference to the operating channel.
Definition: wifi-phy.cc:1033
uint8_t GetPrimaryChannelIndex(uint16_t primaryChannelWidth) const
If the operating channel width is a multiple of 20 MHz, return the index of the primary channel of th...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint16_t GetGuardInterval() const
bool IsSigBCompression() const
Indicate whether the Common field is present in the HE-SIG-B field.
const RuAllocation & GetRuAllocation(uint8_t p20Index) const
Get RU_ALLOCATION field.
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
WifiPreamble GetPreambleType() const
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
bool IsDlMu() const
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
uint8_t GetEhtPpduType() const
Get the EHT_PPDU_TYPE parameter.
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
uint16_t GetChannelWidth() const
#define GET_EHT_MCS(x)
Definition: eht-phy.cc:269
#define CASE(x)
Declaration of ns3::EhtPhy class.
#define EHT_PHY
This defines the BSS membership value for EHT PHY.
Definition: eht-phy.h:37
Declaration of ns3::EhtPpdu class.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:49
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
Definition: callback.h:765
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1362
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
WifiPpduField
The type of PPDU field (grouped for convenience)
@ U_SIG_FAILURE
@ EHT_SIG_FAILURE
@ WIFI_PREAMBLE_EHT_TB
@ WIFI_PREAMBLE_EHT_MU
@ WIFI_MOD_CLASS_EHT
EHT (Clause 36)
@ WIFI_PPDU_FIELD_SIG_B
SIG-B field.
@ WIFI_PPDU_FIELD_TRAINING
STF + LTF fields (excluding those in preamble for HT-GF)
@ WIFI_PPDU_FIELD_NON_HT_HEADER
PHY header field for DSSS or ERP, short PHY header field for HR/DSSS or ERP, field not present for HT...
@ WIFI_PPDU_FIELD_EHT_SIG
EHT-SIG field.
@ WIFI_PPDU_FIELD_PREAMBLE
SYNC + SFD fields for DSSS or ERP, shortSYNC + shortSFD fields for HR/DSSS or ERP,...
@ WIFI_PPDU_FIELD_U_SIG
U-SIG field.
@ WIFI_PPDU_FIELD_DATA
data field
@ WIFI_PPDU_FIELD_SIG_A
SIG-A field.
class anonymous_namespace{eht-phy.cc}::ConstructorEht g_constructor_eht
the constructor for EHT modes
NLOHMANN_BASIC_JSON_TPL_DECLARATION std::string to_string(const NLOHMANN_BASIC_JSON_TPL &j)
user-defined to_string function for JSON values
Definition: json.h:25255
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:704
bool IsEht(WifiPreamble preamble)
Return true if a preamble corresponds to an EHT transmission.
bool IsDlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a downlink multi-user transmission.
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
@ WIFI_CODE_RATE_3_4
3/4 coding rate
@ WIFI_CODE_RATE_5_6
5/6 coding rate
Status of the reception of the PPDU field.
Definition: phy-entity.h:112