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