A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-phy-common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006,2007 INRIA
3 * Copyright (c) 2020 Orange Labs
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8 * Rediet <getachew.redieteab@orange.com>
9 */
10
11#ifndef WIFI_PHY_COMMON_H
12#define WIFI_PHY_COMMON_H
13
15#include "wifi-standards.h"
16#include "wifi-types.h"
17
18#include "ns3/fatal-error.h"
19#include "ns3/ptr.h"
20
21#include <ostream>
22#include <vector>
23
24/**
25 * \file
26 * \ingroup wifi
27 * Declaration of the following enums:
28 * - ns3::WifiPreamble
29 * - ns3::WifiModulationClass
30 * - ns3::WifiPpduField
31 * - ns3::WifiPpduType
32 * - ns3::WifiPhyRxfailureReason
33 */
34
35namespace ns3
36{
37
38class WifiNetDevice;
39class WifiMode;
40class Time;
41
42/// maximum propagation delay
43static constexpr uint8_t MAX_PROPAGATION_DELAY_USEC = 1;
44
45/**
46 * typedef for a pair of start and stop frequencies to represent a band
47 */
48using WifiSpectrumBandFrequencies = std::pair<Hz_u, Hz_u>;
49
50/// WifiSpectrumBandInfo structure containing info about a spectrum band
52{
53 std::vector<WifiSpectrumBandIndices>
54 indices; //!< the start and stop indices for each segment of the band
55 std::vector<WifiSpectrumBandFrequencies>
56 frequencies; //!< the start and stop frequencies for each segment of the band
57};
58
59/// vector of spectrum bands
60using WifiSpectrumBands = std::vector<WifiSpectrumBandInfo>;
61
62/**
63 * \ingroup wifi
64 * Compare two bands.
65 *
66 * \param lhs the band on the left of operator<
67 * \param rhs the band on the right of operator<
68 * \return true if the start/stop frequencies of the first segment of left are lower than the
69 * start/stop frequencies of the first segment of right. If the first segment is the same for left
70 * and right, it return true if the start/stop frequencies of the second segment of left are lower
71 * than the start/stop frequencies of the second segment of right. Otherwise, the function return
72 * false.
73 */
74inline bool
76{
77 if (lhs.frequencies.front() == rhs.frequencies.front())
78 {
79 return lhs.frequencies.back() < rhs.frequencies.back();
80 }
81 return lhs.frequencies.front() < rhs.frequencies.front();
82}
83
84/**
85 * \brief Stream insertion operator.
86 *
87 * \param os the stream
88 * \param band the band
89 * \returns a reference to the stream
90 */
91inline std::ostream&
92operator<<(std::ostream& os, const WifiSpectrumBandInfo& band)
93{
94 NS_ASSERT(band.indices.size() == band.frequencies.size());
95 for (std::size_t segmentIndex = 0; segmentIndex < band.indices.size(); ++segmentIndex)
96 {
97 os << "indices segment" << segmentIndex << ": [" << band.indices.at(segmentIndex).first
98 << "-" << band.indices.at(segmentIndex).second << "], frequencies segment"
99 << segmentIndex << ": [" << band.frequencies.at(segmentIndex).first << "Hz-"
100 << band.frequencies.at(segmentIndex).second << "Hz] ";
101 }
102 return os;
103}
104
105/**
106 * These constants define the various convolutional coding rates
107 * used for the OFDM transmission modes in the IEEE 802.11
108 * standard. DSSS (for example) rates which do not have an explicit
109 * coding stage in their generation should have this parameter set to
110 * WIFI_CODE_RATE_UNDEFINED.
111 */
112enum WifiCodeRate : uint16_t
113{
114 WIFI_CODE_RATE_UNDEFINED, //!< undefined coding rate
115 WIFI_CODE_RATE_1_2, //!< 1/2 coding rate
116 WIFI_CODE_RATE_2_3, //!< 2/3 coding rate
117 WIFI_CODE_RATE_3_4, //!< 3/4 coding rate
118 WIFI_CODE_RATE_5_6, //!< 5/6 coding rate
119 WIFI_CODE_RATE_5_8, //!< 5/8 coding rate
120 WIFI_CODE_RATE_13_16, //!< 13/16 coding rate
121 WIFI_CODE_RATE_1_4, //!< 1/4 coding rate
122 WIFI_CODE_RATE_13_28, //!< 13/28 coding rate
123 WIFI_CODE_RATE_13_21, //!< 13/21 coding rate
124 WIFI_CODE_RATE_52_63, //!< 52/63 coding rate
125 WIFI_CODE_RATE_13_14, //!< 13/14 coding rate
126 WIFI_CODE_RATE_7_8, //!< 7/8 coding rate
127};
128
129/**
130 * \brief Stream insertion operator.
131 *
132 * \param os the stream
133 * \param codeRate the code rate
134 * \returns a reference to the stream
135 */
136inline std::ostream&
137operator<<(std::ostream& os, const WifiCodeRate& codeRate)
138{
139 switch (codeRate)
140 {
142 return (os << "Code rate undefined");
144 return (os << "Code rate 1/2");
146 return (os << "Code rate 2/3");
148 return (os << "Code rate 3/4");
150 return (os << "Code rate 5/6");
152 return (os << "Code rate 5/8");
154 return (os << "Code rate 13/16");
156 return (os << "Code rate 1/4");
158 return (os << "Code rate 13/28");
160 return (os << "Code rate 13/21");
162 return (os << "Code rate 52/63");
164 return (os << "Code rate 13/14");
166 return (os << "Code rate 7/8");
167 default:
168 NS_FATAL_ERROR("Unknown code rate");
169 return (os << "Unknown");
170 }
171}
172
173/**
174 * \ingroup wifi
175 * The type of preamble to be used by an IEEE 802.11 transmission
176 */
194
195/**
196 * \brief Stream insertion operator.
197 *
198 * \param os the stream
199 * \param preamble the preamble
200 * \returns a reference to the stream
201 */
202inline std::ostream&
203operator<<(std::ostream& os, const WifiPreamble& preamble)
204{
205 switch (preamble)
206 {
208 return (os << "LONG");
210 return (os << "SHORT");
212 return (os << "HT_MF");
214 return (os << "VHT_SU");
216 return (os << "VHT_MU");
218 return (os << "DMG_CTRL");
220 return (os << "DMG_SC");
222 return (os << "DMG_OFDM");
224 return (os << "HE_SU");
226 return (os << "HE_ER_SU");
228 return (os << "HE_MU");
230 return (os << "HE_TB");
232 return (os << "EHT_MU");
234 return (os << "EHT_TB");
235 default:
236 NS_FATAL_ERROR("Invalid preamble");
237 return (os << "INVALID");
238 }
239}
240
241/**
242 * \ingroup wifi
243 * This enumeration defines the modulation classes per
244 * (Table 10-6 "Modulation classes"; IEEE 802.11-2016, with
245 * updated in 802.11ax/D6.0 as Table 10-9).
246 */
248{
249 /** Modulation class unknown or unspecified. A WifiMode with this
250 WifiModulationClass has not been properly initialized. */
252 WIFI_MOD_CLASS_DSSS, //!< DSSS (Clause 15)
253 WIFI_MOD_CLASS_HR_DSSS, //!< HR/DSSS (Clause 16)
254 WIFI_MOD_CLASS_ERP_OFDM, //!< ERP-OFDM (18.4)
255 WIFI_MOD_CLASS_OFDM, //!< OFDM (Clause 17)
256 WIFI_MOD_CLASS_HT, //!< HT (Clause 19)
257 WIFI_MOD_CLASS_VHT, //!< VHT (Clause 22)
258 WIFI_MOD_CLASS_DMG_CTRL, //!< DMG (Clause 21)
259 WIFI_MOD_CLASS_DMG_OFDM, //!< DMG (Clause 21)
260 WIFI_MOD_CLASS_DMG_SC, //!< DMG (Clause 21)
261 WIFI_MOD_CLASS_DMG_LP_SC, //!< DMG (Clause 21)
262 WIFI_MOD_CLASS_HE, //!< HE (Clause 27)
263 WIFI_MOD_CLASS_EHT //!< EHT (Clause 36)
265
266/**
267 * \brief Stream insertion operator.
268 *
269 * \param os the stream
270 * \param modulation the WifiModulationClass
271 * \returns a reference to the stream
272 */
273inline std::ostream&
274operator<<(std::ostream& os, const WifiModulationClass& modulation)
275{
276 switch (modulation)
277 {
279 return (os << "DSSS");
281 return (os << "HR/DSSS");
283 return (os << "ERP-OFDM");
285 return (os << "OFDM");
287 return (os << "HT");
289 return (os << "VHT");
291 return (os << "DMG_CTRL");
293 return (os << "DMG_OFDM");
295 return (os << "DMG_SC");
297 return (os << "DMG_LP_SC");
299 return (os << "HE");
301 return (os << "EHT");
302 default:
303 NS_FATAL_ERROR("Unknown modulation");
304 return (os << "unknown");
305 }
306}
307
308/**
309 * \ingroup wifi
310 * The type of PPDU field (grouped for convenience)
311 */
313{
314 /**
315 * SYNC + SFD fields for DSSS or ERP,
316 * shortSYNC + shortSFD fields for HR/DSSS or ERP,
317 * HT-GF-STF + HT-GF-LTF1 fields for HT-GF,
318 * L-STF + L-LTF fields otherwise.
319 */
321 /**
322 * PHY header field for DSSS or ERP,
323 * short PHY header field for HR/DSSS or ERP,
324 * field not present for HT-GF,
325 * L-SIG field or L-SIG + RL-SIG fields otherwise.
326 */
328 WIFI_PPDU_FIELD_HT_SIG, //!< HT-SIG field
329 WIFI_PPDU_FIELD_TRAINING, //!< STF + LTF fields (excluding those in preamble for HT-GF)
330 WIFI_PPDU_FIELD_SIG_A, //!< SIG-A field
331 WIFI_PPDU_FIELD_SIG_B, //!< SIG-B field
332 WIFI_PPDU_FIELD_U_SIG, //!< U-SIG field
333 WIFI_PPDU_FIELD_EHT_SIG, //!< EHT-SIG field
334 WIFI_PPDU_FIELD_DATA //!< data field
336
337/**
338 * \brief Stream insertion operator.
339 *
340 * \param os the stream
341 * \param field the PPDU field
342 * \returns a reference to the stream
343 */
344inline std::ostream&
345operator<<(std::ostream& os, const WifiPpduField& field)
346{
347 switch (field)
348 {
350 return (os << "preamble");
352 return (os << "non-HT header");
354 return (os << "HT-SIG");
356 return (os << "training");
358 return (os << "SIG-A");
360 return (os << "SIG-B");
362 return (os << "U-SIG");
364 return (os << "EHT-SIG");
366 return (os << "data");
367 default:
368 NS_FATAL_ERROR("Unknown field");
369 return (os << "unknown");
370 }
371}
372
373/**
374 * \ingroup wifi
375 * The type of PPDU (SU, DL MU, or UL MU)
376 */
383
384/**
385 * \brief Stream insertion operator.
386 *
387 * \param os the stream
388 * \param type the PPDU type
389 * \returns a reference to the stream
390 */
391inline std::ostream&
392operator<<(std::ostream& os, const WifiPpduType& type)
393{
394 switch (type)
395 {
397 return (os << "SU");
399 return (os << "DL MU");
401 return (os << "UL MU");
402 default:
403 NS_FATAL_ERROR("Unknown type");
404 return (os << "unknown");
405 }
406}
407
408/**
409 * \ingroup wifi
410 * Enumeration of the possible reception failure reasons.
411 */
440
441/**
442 * \brief Stream insertion operator.
443 *
444 * \param os the stream
445 * \param reason the failure reason
446 * \returns a reference to the stream
447 */
448inline std::ostream&
449operator<<(std::ostream& os, const WifiPhyRxfailureReason& reason)
450{
451 switch (reason)
452 {
454 return (os << "UNSUPPORTED_SETTINGS");
456 return (os << "CHANNEL_SWITCHING");
457 case RXING:
458 return (os << "RXING");
459 case TXING:
460 return (os << "TXING");
461 case SLEEPING:
462 return (os << "SLEEPING");
463 case POWERED_OFF:
464 return (os << "OFF");
465 case TRUNCATED_TX:
466 return (os << "TRUNCATED_TX");
468 return (os << "BUSY_DECODING_PREAMBLE");
470 return (os << "PREAMBLE_DETECT_FAILURE");
472 return (os << "RECEPTION_ABORTED_BY_TX");
473 case L_SIG_FAILURE:
474 return (os << "L_SIG_FAILURE");
475 case HT_SIG_FAILURE:
476 return (os << "HT_SIG_FAILURE");
477 case SIG_A_FAILURE:
478 return (os << "SIG_A_FAILURE");
479 case SIG_B_FAILURE:
480 return (os << "SIG_B_FAILURE");
481 case U_SIG_FAILURE:
482 return (os << "U_SIG_FAILURE");
483 case EHT_SIG_FAILURE:
484 return (os << "EHT_SIG_FAILURE");
486 return (os << "PREAMBLE_DETECTION_PACKET_SWITCH");
488 return (os << "FRAME_CAPTURE_PACKET_SWITCH");
490 return (os << "OBSS_PD_CCA_RESET");
491 case PPDU_TOO_LATE:
492 return (os << "PPDU_TOO_LATE");
493 case FILTERED:
494 return (os << "FILTERED");
496 return (os << "DMG_HEADER_FAILURE");
498 return (os << "DMG_ALLOCATION_ENDED");
500 return (os << "SIGNAL_DETECTION_ABORTED_BY_TX");
501 case UNKNOWN:
502 default:
503 NS_FATAL_ERROR("Unknown reason");
504 return (os << "UNKNOWN");
505 }
506}
507
508/**
509 * \ingroup wifi
510 * Enumeration of the possible channel-list parameter elements
511 * defined in Table 8-5 of IEEE 802.11-2016.
512 */
520
521/**
522 * \brief Stream insertion operator.
523 *
524 * \param os the stream
525 * \param type the wifi channel list type
526 * \returns a reference to the stream
527 */
528inline std::ostream&
529operator<<(std::ostream& os, WifiChannelListType type)
530{
531 switch (type)
532 {
534 return (os << "PRIMARY");
536 return (os << "SECONDARY");
538 return (os << "SECONDARY40");
540 return (os << "SECONDARY80");
541 default:
542 NS_FATAL_ERROR("Unknown wifi channel type");
543 return (os << "UNKNOWN");
544 }
545}
546
547/**
548 * \brief Stream insertion operator.
549 *
550 * \param os the stream
551 * \param width the wifi channel width type
552 * \returns a reference to the stream
553 */
554inline std::ostream&
555operator<<(std::ostream& os, WifiChannelWidthType width)
556{
557 switch (width)
558 {
560 return (os << "20MHz");
562 return (os << "22MHz");
564 return (os << "5MHz");
566 return (os << "10MHz");
568 return (os << "40MHz");
570 return (os << "80MHz");
572 return (os << "160MHz");
574 return (os << "80+80MHz");
576 return (os << "2160MHz");
577 default:
579 return (os << "UNKNOWN");
580 }
581}
582
583/**
584 * Get the guard interval for a given WifiMode.
585 *
586 * \param mode the WifiMode
587 * \param device pointer to the WifiNetDevice object
588 *
589 * \return the guard interval duration to use for the mode
590 */
591Time GetGuardIntervalForMode(WifiMode mode, const Ptr<WifiNetDevice> device);
592
593/**
594 * Get the guard interval for a given WifiMode.
595 *
596 * \param mode the WifiMode
597 * \param htShortGuardInterval whether HT/VHT short guard interval is enabled
598 * \param heGuardInterval the HE guard interval duration
599 *
600 * \return the guard interval duration to use for the mode
601 */
602Time GetGuardIntervalForMode(WifiMode mode, bool htShortGuardInterval, Time heGuardInterval);
603
604/**
605 * Return the preamble to be used for the transmission.
606 *
607 * \param modulation the modulation selected for the transmission
608 * \param useShortPreamble whether short preamble should be used
609 *
610 * \return the preamble to be used for the transmission
611 */
612WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble);
613
614/**
615 * Return the modulation class corresponding to the given preamble type.
616 * Only preamble types used by HT/VHT/HE/EHT can be passed to this function.
617 *
618 * \param preamble the given preamble type (must be one defined by HT standard or later)
619 * \return the modulation class corresponding to the given preamble type
620 */
621WifiModulationClass GetModulationClassForPreamble(WifiPreamble preamble);
622
623/**
624 * Return whether the modulation class of the selected mode for the
625 * control answer frame is allowed.
626 *
627 * \param modClassReq modulation class of the request frame
628 * \param modClassAnswer modulation class of the answer frame
629 *
630 * \return true if the modulation class of the selected mode for the
631 * control answer frame is allowed, false otherwise
632 */
633bool IsAllowedControlAnswerModulationClass(WifiModulationClass modClassReq,
634 WifiModulationClass modClassAnswer);
635
636/**
637 * Get the maximum PPDU duration (see Section 10.14 of 802.11-2016) for
638 * the PHY layers defining the aPPDUMaxTime characteristic (HT, VHT and HE).
639 * Return zero otherwise.
640 *
641 * \param preamble the preamble type
642 *
643 * \return the maximum PPDU duration, if defined, and zero otherwise
644 */
645Time GetPpduMaxTime(WifiPreamble preamble);
646
647/**
648 * Return true if a preamble corresponds to a multi-user transmission.
649 *
650 * \param preamble the preamble
651 * \return true if the provided preamble corresponds to a multi-user transmission
652 */
653bool IsMu(WifiPreamble preamble);
654
655/**
656 * Return true if a preamble corresponds to a downlink multi-user transmission.
657 *
658 * \param preamble the preamble
659 * \return true if the provided preamble corresponds to a downlink multi-user transmission
660 */
661bool IsDlMu(WifiPreamble preamble);
662
663/**
664 * Return true if a preamble corresponds to a uplink multi-user transmission.
665 *
666 * \param preamble the preamble
667 * \return true if the provided preamble corresponds to a uplink multi-user transmission
668 */
669bool IsUlMu(WifiPreamble preamble);
670
671/**
672 * Return the modulation class corresponding to a given standard.
673 *
674 * In the case of WIFI_STANDARD_80211b, two modulation classes are supported
675 * (WIFI_MOD_CLASS_DSSS and WIFI_MOD_CLASS_HR_DSSS); this method will return
676 * the latter.
677 *
678 * \param standard the standard
679 * \return the modulation class corresponding to the standard
680 */
681WifiModulationClass GetModulationClassForStandard(WifiStandard standard);
682
683/**
684 * Get the maximum channel width allowed for the given modulation class.
685 *
686 * \param modulation the modulation class
687 * \return the maximum channel width allowed for the given modulation class
688 */
689MHz_u GetMaximumChannelWidth(WifiModulationClass modulation);
690
691/**
692 * Get the total channel width for the channel width type.
693 *
694 * \param width the channel width type
695 * \return the total channel width for the channel width type
696 */
698
699/**
700 * Return true if a preamble corresponds to an EHT transmission.
701 *
702 * \param preamble the preamble
703 * \return true if the provided preamble corresponds to an EHT transmission
704 */
705bool IsEht(WifiPreamble preamble);
706
707} // namespace ns3
708
709#endif /* WIFI_PHY_COMMON_H */
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
WifiChannelWidthType
Enumeration of the possible channel widths.
Definition wifi-types.h:22
WifiChannelListType
Enumeration of the possible channel-list parameter elements defined in Table 8-5 of IEEE 802....
WifiPpduField
The type of PPDU field (grouped for convenience)
@ OBSS_PD_CCA_RESET
@ PREAMBLE_DETECT_FAILURE
@ FRAME_CAPTURE_PACKET_SWITCH
@ UNSUPPORTED_SETTINGS
@ L_SIG_FAILURE
@ SIGNAL_DETECTION_ABORTED_BY_TX
@ DMG_HEADER_FAILURE
@ RECEPTION_ABORTED_BY_TX
@ SIG_A_FAILURE
@ CHANNEL_SWITCHING
@ DMG_ALLOCATION_ENDED
@ U_SIG_FAILURE
@ BUSY_DECODING_PREAMBLE
@ SIG_B_FAILURE
@ HT_SIG_FAILURE
@ PPDU_TOO_LATE
@ EHT_SIG_FAILURE
@ PREAMBLE_DETECTION_PACKET_SWITCH
@ WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_EHT_TB
@ WIFI_PREAMBLE_HE_ER_SU
@ WIFI_PREAMBLE_HE_TB
@ WIFI_PREAMBLE_DMG_CTRL
@ WIFI_PREAMBLE_EHT_MU
@ WIFI_PREAMBLE_HE_MU
@ WIFI_PREAMBLE_HE_SU
@ WIFI_PREAMBLE_VHT_MU
@ WIFI_PREAMBLE_VHT_SU
@ WIFI_PREAMBLE_SHORT
@ WIFI_PREAMBLE_HT_MF
@ WIFI_PREAMBLE_DMG_SC
@ WIFI_PREAMBLE_DMG_OFDM
@ WIFI_PPDU_TYPE_DL_MU
@ WIFI_PPDU_TYPE_UL_MU
@ WIFI_PPDU_TYPE_SU
@ WIFI_MOD_CLASS_DMG_OFDM
DMG (Clause 21)
@ WIFI_MOD_CLASS_DMG_CTRL
DMG (Clause 21)
@ WIFI_MOD_CLASS_OFDM
OFDM (Clause 17)
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
@ WIFI_MOD_CLASS_UNKNOWN
Modulation class unknown or unspecified.
@ WIFI_MOD_CLASS_DMG_SC
DMG (Clause 21)
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
@ WIFI_MOD_CLASS_EHT
EHT (Clause 36)
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
@ WIFI_MOD_CLASS_DMG_LP_SC
DMG (Clause 21)
@ WIFI_MOD_CLASS_DSSS
DSSS (Clause 15)
@ WIFI_MOD_CLASS_ERP_OFDM
ERP-OFDM (18.4)
@ WIFI_CHANLIST_PRIMARY
@ WIFI_CHANLIST_SECONDARY40
@ WIFI_CHANLIST_SECONDARY
@ WIFI_CHANLIST_SECONDARY80
@ 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_HT_SIG
HT-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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:828
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time GetPpduMaxTime(WifiPreamble preamble)
Get the maximum PPDU duration (see Section 10.14 of 802.11-2016) for the PHY layers defining the aPPD...
bool IsEht(WifiPreamble preamble)
Return true if a preamble corresponds to an EHT transmission.
Time GetGuardIntervalForMode(WifiMode mode, const Ptr< WifiNetDevice > device)
Get the guard interval for a given WifiMode.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition angles.cc:148
bool IsAllowedControlAnswerModulationClass(WifiModulationClass modClassReq, WifiModulationClass modClassAnswer)
Return whether the modulation class of the selected mode for the control answer frame is allowed.
bool IsMu(WifiPreamble preamble)
Return true if a preamble corresponds to a multi-user transmission.
std::vector< WifiSpectrumBandInfo > WifiSpectrumBands
vector of spectrum bands
double MHz_u
MHz weak type.
Definition wifi-units.h:31
WifiModulationClass GetModulationClassForPreamble(WifiPreamble preamble)
Return the modulation class corresponding to the given preamble type.
std::pair< Hz_u, Hz_u > WifiSpectrumBandFrequencies
typedef for a pair of start and stop frequencies to represent a band
MHz_u GetMaximumChannelWidth(WifiModulationClass modulation)
Get the maximum channel width allowed for the given modulation class.
bool operator<(const EventId &a, const EventId &b)
Definition event-id.h:168
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
Return the preamble to be used for the transmission.
MHz_u GetChannelWidthInMhz(WifiChannelWidthType width)
Get the total channel width for the channel width type.
WifiModulationClass GetModulationClassForStandard(WifiStandard standard)
Return the modulation class corresponding to a given standard.
bool IsDlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a downlink multi-user transmission.
static constexpr uint8_t MAX_PROPAGATION_DELAY_USEC
maximum propagation delay
bool IsUlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a uplink multi-user transmission.
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
@ WIFI_CODE_RATE_2_3
2/3 coding rate
@ WIFI_CODE_RATE_13_21
13/21 coding rate
@ WIFI_CODE_RATE_1_2
1/2 coding rate
@ WIFI_CODE_RATE_3_4
3/4 coding rate
@ WIFI_CODE_RATE_1_4
1/4 coding rate
@ WIFI_CODE_RATE_UNDEFINED
undefined coding rate
@ WIFI_CODE_RATE_7_8
7/8 coding rate
@ WIFI_CODE_RATE_52_63
52/63 coding rate
@ WIFI_CODE_RATE_13_14
13/14 coding rate
@ WIFI_CODE_RATE_13_28
13/28 coding rate
@ WIFI_CODE_RATE_5_6
5/6 coding rate
@ WIFI_CODE_RATE_5_8
5/8 coding rate
@ WIFI_CODE_RATE_13_16
13/16 coding rate
WifiSpectrumBandInfo structure containing info about a spectrum band.
std::vector< WifiSpectrumBandFrequencies > frequencies
the start and stop frequencies for each segment of the band
std::vector< WifiSpectrumBandIndices > indices
the start and stop indices for each segment of the band