A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ht-phy.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Rediet <getachew.redieteab@orange.com>
7 * Sébastien Deronne <sebastien.deronne@gmail.com> (for logic ported from wifi-phy)
8 */
9
10#ifndef HT_PHY_H
11#define HT_PHY_H
12
13#include "ns3/ofdm-phy.h"
14
15/**
16 * \file
17 * \ingroup wifi
18 * Declaration of ns3::HtPhy class.
19 */
20
21namespace ns3
22{
23
24/**
25 * This defines the BSS membership value for HT PHY.
26 */
27#define HT_PHY 127
28
29/// Maximum number of supported NSS by HT PHY
30constexpr uint8_t HT_MAX_NSS = 4;
31
32/**
33 * \brief PHY entity for HT (11n)
34 * \ingroup wifi
35 *
36 * HT PHY is based on OFDM PHY.
37 * Only HT-Mixed is supported (support for HT-Greenfield has been removed).
38 * Only HT MCSs up to 31 are supported.
39 *
40 * Refer to IEEE 802.11-2016, clause 19.
41 */
42class HtPhy : public OfdmPhy
43{
44 public:
45 /**
46 * Constructor for HT PHY
47 *
48 * \param maxNss the maximum number of spatial streams
49 * \param buildModeList flag used to add HT modes to list (disabled
50 * by child classes to only add child classes' modes)
51 */
52 HtPhy(uint8_t maxNss = 1, bool buildModeList = true);
53 /**
54 * Destructor for HT PHY
55 */
56 ~HtPhy() override;
57
58 WifiMode GetMcs(uint8_t index) const override;
59 bool IsMcsSupported(uint8_t index) const override;
60 bool HandlesMcsModes() const override;
61 WifiMode GetSigMode(WifiPpduField field, const WifiTxVector& txVector) const override;
62 const PpduFormats& GetPpduFormats() const override;
63 Time GetDuration(WifiPpduField field, const WifiTxVector& txVector) const override;
65 const WifiTxVector& txVector,
66 WifiPhyBand band,
67 MpduType mpdutype,
68 bool incFlag,
69 uint32_t& totalAmpduSize,
70 double& totalAmpduNumSymbols,
71 uint16_t staId) const override;
73 const WifiTxVector& txVector,
74 Time ppduDuration) override;
75
76 /**
77 * \return the WifiMode used for the L-SIG (non-HT header) field
78 */
79 static WifiMode GetLSigMode();
80 /**
81 * \return the WifiMode used for the HT-SIG field
82 */
83 virtual WifiMode GetHtSigMode() const;
84
85 /**
86 * \return the BSS membership selector for this PHY entity
87 */
88 uint8_t GetBssMembershipSelector() const;
89
90 /**
91 * Set the maximum supported MCS index __per spatial stream__.
92 * For HT, this results in non-continuous indices for supported MCSs.
93 *
94 * \return the maximum MCS index per spatial stream supported by this entity
95 */
96 uint8_t GetMaxSupportedMcsIndexPerSs() const;
97 /**
98 * Set the maximum supported MCS index __per spatial stream__.
99 * For HT, this results in non-continuous indices for supported MCSs.
100 *
101 * \param maxIndex the maximum MCS index per spatial stream supported by this entity
102 *
103 * The provided value should not be greater than maximum standard-defined value.
104 */
105 void SetMaxSupportedMcsIndexPerSs(uint8_t maxIndex);
106 /**
107 * Configure the maximum number of spatial streams supported
108 * by this HT PHY.
109 *
110 * \param maxNss the maximum number of spatial streams
111 */
112 void SetMaxSupportedNss(uint8_t maxNss);
113
114 /**
115 * \param preamble the type of preamble
116 * \return the duration of the L-SIG (non-HT header) field
117 *
118 * \see WIFI_PPDU_FIELD_NON_HT_HEADER
119 */
120 virtual Time GetLSigDuration(WifiPreamble preamble) const;
121 /**
122 * \param txVector the transmission parameters
123 * \param nDataLtf the number of data LTF fields (excluding those in preamble)
124 * \param nExtensionLtf the number of extension LTF fields
125 * \return the duration of the training field
126 *
127 * \see WIFI_PPDU_FIELD_TRAINING
128 */
129 virtual Time GetTrainingDuration(const WifiTxVector& txVector,
130 uint8_t nDataLtf,
131 uint8_t nExtensionLtf = 0) const;
132 /**
133 * \return the duration of the HT-SIG field
134 */
135 virtual Time GetHtSigDuration() const;
136
137 /**
138 * Initialize all HT modes.
139 */
140 static void InitializeModes();
141 /**
142 * Return the HT MCS corresponding to
143 * the provided index.
144 *
145 * \param index the index of the MCS
146 * \return an HT MCS
147 */
148 static WifiMode GetHtMcs(uint8_t index);
149
150 /**
151 * Return MCS 0 from HT MCS values.
152 *
153 * \return MCS 0 from HT MCS values
154 */
156 /**
157 * Return MCS 1 from HT MCS values.
158 *
159 * \return MCS 1 from HT MCS values
160 */
162 /**
163 * Return MCS 2 from HT MCS values.
164 *
165 * \return MCS 2 from HT MCS values
166 */
168 /**
169 * Return MCS 3 from HT MCS values.
170 *
171 * \return MCS 3 from HT MCS values
172 */
174 /**
175 * Return MCS 4 from HT MCS values.
176 *
177 * \return MCS 4 from HT MCS values
178 */
180 /**
181 * Return MCS 5 from HT MCS values.
182 *
183 * \return MCS 5 from HT MCS values
184 */
186 /**
187 * Return MCS 6 from HT MCS values.
188 *
189 * \return MCS 6 from HT MCS values
190 */
192 /**
193 * Return MCS 7 from HT MCS values.
194 *
195 * \return MCS 7 from HT MCS values
196 */
198 /**
199 * Return MCS 8 from HT MCS values.
200 *
201 * \return MCS 8 from HT MCS values
202 */
204 /**
205 * Return MCS 9 from HT MCS values.
206 *
207 * \return MCS 9 from HT MCS values
208 */
210 /**
211 * Return MCS 10 from HT MCS values.
212 *
213 * \return MCS 10 from HT MCS values
214 */
216 /**
217 * Return MCS 11 from HT MCS values.
218 *
219 * \return MCS 11 from HT MCS values
220 */
222 /**
223 * Return MCS 12 from HT MCS values.
224 *
225 * \return MCS 12 from HT MCS values
226 */
228 /**
229 * Return MCS 13 from HT MCS values.
230 *
231 * \return MCS 13 from HT MCS values
232 */
234 /**
235 * Return MCS 14 from HT MCS values.
236 *
237 * \return MCS 14 from HT MCS values
238 */
240 /**
241 * Return MCS 15 from HT MCS values.
242 *
243 * \return MCS 15 from HT MCS values
244 */
246 /**
247 * Return MCS 16 from HT MCS values.
248 *
249 * \return MCS 16 from HT MCS values
250 */
252 /**
253 * Return MCS 17 from HT MCS values.
254 *
255 * \return MCS 17 from HT MCS values
256 */
258 /**
259 * Return MCS 18 from HT MCS values.
260 *
261 * \return MCS 18 from HT MCS values
262 */
264 /**
265 * Return MCS 19 from HT MCS values.
266 *
267 * \return MCS 19 from HT MCS values
268 */
270 /**
271 * Return MCS 20 from HT MCS values.
272 *
273 * \return MCS 20 from HT MCS values
274 */
276 /**
277 * Return MCS 21 from HT MCS values.
278 *
279 * \return MCS 21 from HT MCS values
280 */
282 /**
283 * Return MCS 22 from HT MCS values.
284 *
285 * \return MCS 22 from HT MCS values
286 */
288 /**
289 * Return MCS 23 from HT MCS values.
290 *
291 * \return MCS 23 from HT MCS values
292 */
294 /**
295 * Return MCS 24 from HT MCS values.
296 *
297 * \return MCS 24 from HT MCS values
298 */
300 /**
301 * Return MCS 25 from HT MCS values.
302 *
303 * \return MCS 25 from HT MCS values
304 */
306 /**
307 * Return MCS 26 from HT MCS values.
308 *
309 * \return MCS 26 from HT MCS values
310 */
312 /**
313 * Return MCS 27 from HT MCS values.
314 *
315 * \return MCS 27 from HT MCS values
316 */
318 /**
319 * Return MCS 28 from HT MCS values.
320 *
321 * \return MCS 28 from HT MCS values
322 */
324 /**
325 * Return MCS 29 from HT MCS values.
326 *
327 * \return MCS 29 from HT MCS values
328 */
330 /**
331 * Return MCS 30 from HT MCS values.
332 *
333 * \return MCS 30 from HT MCS values
334 */
336 /**
337 * Return MCS 31 from HT MCS values.
338 *
339 * \return MCS 31 from HT MCS values
340 */
342
343 /**
344 * Return the coding rate corresponding to
345 * the supplied HT MCS index. This function calls
346 * GetCodeRate and is used as a callback for
347 * WifiMode operation.
348 *
349 * \param mcsValue the MCS index
350 * \return the coding rate.
351 */
352 static WifiCodeRate GetHtCodeRate(uint8_t mcsValue);
353 /**
354 * Return the coding rate corresponding to
355 * the supplied HT MCS index between 0 and 7,
356 * since HT MCS index > 8 is used for higher NSS.
357 * This function is reused by child classes.
358 *
359 * \param mcsValue the MCS index
360 * \return the coding rate.
361 */
362 static WifiCodeRate GetCodeRate(uint8_t mcsValue);
363 /**
364 * Return the constellation size corresponding
365 * to the supplied HT MCS index.
366 *
367 * \param mcsValue the MCS index
368 * \return the size of modulation constellation.
369 */
370 static uint16_t GetHtConstellationSize(uint8_t mcsValue);
371 /**
372 * Return the constellation size corresponding
373 * to the supplied HT MCS index between 0 and 7,
374 * since HT MCS index > 8 is used for higher NSS.
375 * This function is reused by child classes.
376 *
377 * \param mcsValue the MCS index
378 * \return the size of modulation constellation.
379 */
380 static uint16_t GetConstellationSize(uint8_t mcsValue);
381 /**
382 * Return the PHY rate corresponding to the supplied HT MCS
383 * index, channel width, guard interval, and number of
384 * spatial stream. This function calls CalculatePhyRate
385 * and is mainly used as a callback for WifiMode operation.
386 *
387 * \param mcsValue the HT MCS index
388 * \param channelWidth the considered channel width
389 * \param guardInterval the considered guard interval duration
390 * \param nss the considered number of stream
391 *
392 * \return the physical bit rate of this signal in bps.
393 */
394 static uint64_t GetPhyRate(uint8_t mcsValue,
395 MHz_u channelWidth,
396 Time guardInterval,
397 uint8_t nss);
398 /**
399 * Return the PHY rate corresponding to
400 * the supplied TXVECTOR.
401 * This function is mainly used as a callback
402 * for WifiMode operation.
403 *
404 * \param txVector the TXVECTOR used for the transmission
405 * \param staId the station ID (only here to have a common signature for all callbacks)
406 * \return the physical bit rate of this signal in bps.
407 */
408 static uint64_t GetPhyRateFromTxVector(const WifiTxVector& txVector, uint16_t staId);
409 /**
410 * Return the data rate corresponding to
411 * the supplied TXVECTOR.
412 * This function is mainly used as a callback
413 * for WifiMode operation.
414 *
415 * \param txVector the TXVECTOR used for the transmission
416 * \param staId the station ID (only here to have a common signature for all callbacks)
417 * \return the data bit rate in bps.
418 */
419 static uint64_t GetDataRateFromTxVector(const WifiTxVector& txVector, uint16_t staId);
420 /**
421 * Return the data rate corresponding to the supplied HT
422 * MCS index, channel width, guard interval, and number
423 * of spatial streams. This function is mainly used as a
424 * callback for WifiMode operation.
425 *
426 * \param mcsValue the HT MCS index
427 * \param channelWidth the channel width
428 * \param guardInterval the guard interval duration in nanoseconds
429 * \param nss the number of spatial streams
430 * \return the data bit rate in bps.
431 */
432 static uint64_t GetDataRate(uint8_t mcsValue,
433 MHz_u channelWidth,
434 Time guardInterval,
435 uint8_t nss);
436 /**
437 * Calculate the rate in bps of the non-HT Reference Rate corresponding
438 * to the supplied HT MCS index. This function calls CalculateNonHtReferenceRate
439 * and is used as a callback for WifiMode operation.
440 *
441 * \param mcsValue the HT MCS index
442 * \return the rate in bps of the non-HT Reference Rate.
443 */
444 static uint64_t GetNonHtReferenceRate(uint8_t mcsValue);
445 /**
446 * Check whether the combination in TXVECTOR is allowed.
447 * This function is used as a callback for WifiMode operation.
448 *
449 * \param txVector the TXVECTOR
450 * \returns true if this combination is allowed, false otherwise.
451 */
452 static bool IsAllowed(const WifiTxVector& txVector);
453
454 protected:
456 bool IsAllConfigSupported(WifiPpduField field, Ptr<const WifiPpdu> ppdu) const override;
457 bool IsConfigSupported(Ptr<const WifiPpdu> ppdu) const override;
459 Ptr<const WifiPpdu> ppdu) const override;
460 uint32_t GetMaxPsduSize() const override;
462
463 /**
464 * Build mode list.
465 * Should be redone whenever the maximum MCS index per spatial stream
466 * ,or any other important parameter having an impact on the MCS index
467 * (e.g. number of spatial streams for HT), changes.
468 */
469 virtual void BuildModeList();
470
471 /**
472 * \param txVector the transmission parameters
473 * \return the number of BCC encoders used for data encoding
474 */
475 virtual uint8_t GetNumberBccEncoders(const WifiTxVector& txVector) const;
476 /**
477 * \param txVector the transmission parameters
478 * \return the symbol duration (including GI)
479 */
480 virtual Time GetSymbolDuration(const WifiTxVector& txVector) const;
481
482 /**
483 * Return the PHY rate corresponding to
484 * the supplied code rate and data rate.
485 *
486 * \param codeRate the code rate
487 * \param dataRate the data rate in bps
488 * \return the data bit rate in bps.
489 */
490 static uint64_t CalculatePhyRate(WifiCodeRate codeRate, uint64_t dataRate);
491 /**
492 * Return the rate (in bps) of the non-HT Reference Rate
493 * which corresponds to the supplied code rate and
494 * constellation size.
495 *
496 * \param codeRate the convolutional coding rate
497 * \param constellationSize the size of modulation constellation
498 * \returns the rate in bps.
499 *
500 * To convert an HT MCS to its corresponding non-HT Reference Rate
501 * use the modulation and coding rate of the HT MCS
502 * and lookup in Table 10-7 of IEEE 802.11-2016s.
503 */
504 static uint64_t CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellationSize);
505 /**
506 * Convert WifiCodeRate to a ratio, e.g., code ratio of WIFI_CODE_RATE_1_2 is 0.5.
507 *
508 * \param codeRate the code rate
509 * \return the code rate in ratio.
510 */
511 static double GetCodeRatio(WifiCodeRate codeRate);
512 /**
513 * Calculates data rate from the supplied parameters.
514 *
515 * \param symbolDuration the symbol duration
516 * \param usableSubCarriers the number of usable subcarriers for data
517 * \param numberOfBitsPerSubcarrier the number of data bits per subcarrier
518 * \param codingRate the coding rate
519 * \param nss the considered number of streams
520 *
521 * \return the data bit rate of this signal in bps.
522 */
523 static uint64_t CalculateDataRate(Time symbolDuration,
524 uint16_t usableSubCarriers,
525 uint16_t numberOfBitsPerSubcarrier,
526 double codingRate,
527 uint8_t nss);
528
529 /**
530 * \param channelWidth the channel width
531 * \return the number of usable subcarriers for data
532 */
533 static uint16_t GetUsableSubcarriers(MHz_u channelWidth);
534
535 /**
536 * \param guardInterval the guard interval duration
537 * \return the symbol duration
538 */
539 static Time GetSymbolDuration(Time guardInterval);
540
541 uint8_t
542 m_maxMcsIndexPerSs; //!< the maximum MCS index per spatial stream as defined by the standard
543 uint8_t m_maxSupportedMcsIndexPerSs; //!< the maximum supported MCS index per spatial stream
544 uint8_t m_bssMembershipSelector; //!< the BSS membership selector
545
546 private:
547 /**
548 * End receiving the HT-SIG, perform HT-specific actions, and
549 * provide the status of the reception.
550 *
551 * \param event the event holding incoming PPDU's information
552 * \return status of the reception of the HT-SIG
553 */
555
556 /**
557 * Return the HT MCS corresponding to
558 * the provided index.
559 * This method binds all the callbacks used by WifiMode.
560 *
561 * \param index the index of the MCS
562 * \return an HT MCS
563 */
564 static WifiMode CreateHtMcs(uint8_t index);
565
566 uint8_t m_maxSupportedNss; //!< Maximum supported number of spatial streams (used to build HT
567 //!< MCS indices)
568
569 static const PpduFormats m_htPpduFormats; //!< HT PPDU formats
570}; // class HtPhy
571
572} // namespace ns3
573
574#endif /* HT_PHY_H */
PHY entity for HT (11n)
Definition ht-phy.h:43
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:651
CcaIndication GetCcaIndication(const Ptr< const WifiPpdu > ppdu) override
Get CCA end time and its corresponding channel list type when a new signal has been received by the P...
Definition ht-phy.cc:817
static uint16_t GetConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HT MCS index between 0 and 7,...
Definition ht-phy.cc:621
static WifiMode GetHtMcs3()
Return MCS 3 from HT MCS values.
static WifiMode GetHtMcs29()
Return MCS 29 from HT MCS values.
uint8_t m_bssMembershipSelector
the BSS membership selector
Definition ht-phy.h:544
static WifiMode GetHtMcs13()
Return MCS 13 from HT MCS values.
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 ht-phy.cc:383
Ptr< SpectrumValue > GetTxPowerSpectralDensity(Watt_u txPower, Ptr< const WifiPpdu > ppdu) const override
Definition ht-phy.cc:453
~HtPhy() override
Destructor for HT PHY.
Definition ht-phy.cc:61
static WifiMode GetHtMcs1()
Return MCS 1 from HT MCS values.
static WifiMode GetLSigMode()
Definition ht-phy.cc:146
static WifiMode GetHtMcs14()
Return MCS 14 from HT MCS values.
static WifiMode GetHtMcs11()
Return MCS 11 from HT MCS values.
static WifiMode GetHtMcs19()
Return MCS 19 from HT MCS values.
static uint16_t GetHtConstellationSize(uint8_t mcsValue)
Return the constellation size corresponding to the supplied HT MCS index.
Definition ht-phy.cc:615
static WifiMode GetHtMcs4()
Return MCS 4 from HT MCS values.
uint8_t m_maxMcsIndexPerSs
the maximum MCS index per spatial stream as defined by the standard
Definition ht-phy.h:542
static WifiMode GetHtMcs27()
Return MCS 27 from HT MCS values.
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
bool IsAllConfigSupported(WifiPpduField field, Ptr< const WifiPpdu > ppdu) const override
Checks if the signaled configuration (including bandwidth) is supported by the PHY.
Definition ht-phy.cc:425
HtPhy(uint8_t maxNss=1, bool buildModeList=true)
Constructor for HT PHY.
Definition ht-phy.cc:45
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
Definition ht-phy.cc:678
static void InitializeModes()
Initialize all HT modes.
Definition ht-phy.cc:473
static WifiCodeRate GetHtCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HT MCS index.
Definition ht-phy.cc:587
static WifiMode GetHtMcs8()
Return MCS 8 from HT MCS values.
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 ht-phy.cc:733
virtual Time GetTrainingDuration(const WifiTxVector &txVector, uint8_t nDataLtf, uint8_t nExtensionLtf=0) const
Definition ht-phy.cc:248
static WifiMode GetHtMcs5()
Return MCS 5 from HT MCS values.
bool IsMcsSupported(uint8_t index) const override
Check if the WifiMode corresponding to the given MCS index is supported.
Definition ht-phy.cc:103
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 ht-phy.cc:202
Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
Definition ht-phy.cc:269
uint8_t GetBssMembershipSelector() const
Definition ht-phy.cc:158
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition ht-phy.cc:805
static uint64_t GetPhyRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the PHY rate corresponding to the supplied TXVECTOR.
Definition ht-phy.cc:657
static WifiMode GetHtMcs20()
Return MCS 20 from HT MCS values.
static WifiMode GetHtMcs17()
Return MCS 17 from HT MCS values.
WifiMode GetMcs(uint8_t index) const override
Get the WifiMode corresponding to the given MCS index.
Definition ht-phy.cc:87
static WifiMode GetHtMcs9()
Return MCS 9 from HT MCS values.
virtual uint8_t GetNumberBccEncoders(const WifiTxVector &txVector) const
Definition ht-phy.cc:349
static uint64_t GetNonHtReferenceRate(uint8_t mcsValue)
Calculate the rate in bps of the non-HT Reference Rate corresponding to the supplied HT MCS index.
Definition ht-phy.cc:725
static WifiMode GetHtMcs24()
Return MCS 24 from HT MCS values.
static WifiMode GetHtMcs22()
Return MCS 22 from HT MCS values.
static WifiMode GetHtMcs12()
Return MCS 12 from HT MCS values.
virtual Time GetLSigDuration(WifiPreamble preamble) const
Definition ht-phy.cc:242
static WifiMode GetHtMcs2()
Return MCS 2 from HT MCS values.
static WifiMode GetHtMcs15()
Return MCS 15 from HT MCS values.
static uint64_t GetPhyRate(uint8_t mcsValue, MHz_u channelWidth, Time guardInterval, uint8_t nss)
Return the PHY rate corresponding to the supplied HT MCS index, channel width, guard interval,...
Definition ht-phy.cc:643
void SetMaxSupportedMcsIndexPerSs(uint8_t maxIndex)
Set the maximum supported MCS index per spatial stream.
Definition ht-phy.cc:164
static WifiMode GetHtMcs(uint8_t index)
Return the HT MCS corresponding to the provided index.
Definition ht-phy.cc:482
static WifiMode GetHtMcs6()
Return MCS 6 from HT MCS values.
static WifiMode GetHtMcs28()
Return MCS 28 from HT MCS values.
static WifiMode CreateHtMcs(uint8_t index)
Return the HT MCS corresponding to the provided index.
Definition ht-phy.cc:571
uint32_t GetMaxPsduSize() const override
Get the maximum PSDU size in bytes.
Definition ht-phy.cc:811
static WifiMode GetHtMcs30()
Return MCS 30 from HT MCS values.
static WifiCodeRate GetCodeRate(uint8_t mcsValue)
Return the coding rate corresponding to the supplied HT MCS index between 0 and 7,...
Definition ht-phy.cc:593
virtual WifiMode GetHtSigMode() const
Definition ht-phy.cc:152
static WifiMode GetHtMcs21()
Return MCS 21 from HT MCS values.
static WifiMode GetHtMcs23()
Return MCS 23 from HT MCS values.
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition ht-phy.cc:128
static WifiMode GetHtMcs16()
Return MCS 16 from HT MCS values.
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:700
uint8_t GetMaxSupportedMcsIndexPerSs() const
Set the maximum supported MCS index per spatial stream.
Definition ht-phy.cc:181
static WifiMode GetHtMcs7()
Return MCS 7 from HT MCS values.
bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const override
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Definition ht-phy.cc:435
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition ht-phy.cc:372
uint8_t m_maxSupportedNss
Maximum supported number of spatial streams (used to build HT MCS indices)
Definition ht-phy.h:566
virtual void BuildModeList()
Build mode list.
Definition ht-phy.cc:67
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:666
static WifiMode GetHtMcs26()
Return MCS 26 from HT MCS values.
bool HandlesMcsModes() const override
Check if the WifiModes handled by this PHY are MCSs.
Definition ht-phy.cc:116
static WifiMode GetHtMcs25()
Return MCS 25 from HT MCS values.
static WifiMode GetHtMcs18()
Return MCS 18 from HT MCS values.
static const PpduFormats m_htPpduFormats
HT PPDU formats.
Definition ht-phy.h:569
static WifiMode GetHtMcs31()
Return MCS 31 from HT MCS values.
void SetMaxSupportedNss(uint8_t maxNss)
Configure the maximum number of spatial streams supported by this HT PHY.
Definition ht-phy.cc:187
PhyFieldRxStatus EndReceiveHtSig(Ptr< Event > event)
End receiving the HT-SIG, perform HT-specific actions, and provide the status of the reception.
Definition ht-phy.cc:400
virtual Time GetHtSigDuration() const
Definition ht-phy.cc:263
static WifiMode GetHtMcs10()
Return MCS 10 from HT MCS values.
uint8_t m_maxSupportedMcsIndexPerSs
the maximum supported MCS index per spatial stream
Definition ht-phy.h:543
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
Definition ht-phy.cc:122
virtual Time GetSymbolDuration(const WifiTxVector &txVector) const
Definition ht-phy.cc:363
static uint64_t GetDataRate(uint8_t mcsValue, MHz_u channelWidth, Time guardInterval, uint8_t nss)
Return the data rate corresponding to the supplied HT MCS index, channel width, guard interval,...
Definition ht-phy.cc:687
PHY entity for OFDM (11a)
Definition ofdm-phy.h:50
static uint16_t GetUsableSubcarriers()
Definition ofdm-phy.cc:624
std::optional< std::pair< Time, WifiChannelListType > > CcaIndication
CCA end time and its corresponding channel list type (can be std::nullopt if IDLE)
Definition phy-entity.h:924
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition phy-entity.h:529
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
represent a single transmission mode
Definition wifi-mode.h:40
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
WifiPhyBand
Identifies the PHY band.
WifiPpduField
The type of PPDU field (grouped for convenience)
MpduType
The type of an MPDU.
Definition wifi-types.h:41
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.
constexpr uint8_t HT_MAX_NSS
Maximum number of supported NSS by HT PHY.
Definition ht-phy.h:30
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
Status of the reception of the PPDU field.
Definition phy-entity.h:80