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 <set>
23#include <vector>
24
25/**
26 * @file
27 * @ingroup wifi
28 * Declaration of the following enums:
29 * - ns3::WifiPreamble
30 * - ns3::WifiModulationClass
31 * - ns3::WifiPpduField
32 * - ns3::WifiPpduType
33 * - ns3::WifiPhyRxfailureReason
34 */
35
36namespace ns3
37{
38
39class WifiNetDevice;
40class WifiMode;
41class Time;
42
43/// maximum propagation delay
44static constexpr uint8_t MAX_PROPAGATION_DELAY_USEC = 1;
45
46/**
47 * typedef for a pair of start and stop frequencies to represent a band
48 */
49using WifiSpectrumBandFrequencies = std::pair<Hz_u, Hz_u>;
50
51/// WifiSpectrumBandInfo structure containing info about a spectrum band
53{
54 std::vector<WifiSpectrumBandIndices>
55 indices; //!< the start and stop indices for each segment of the band
56 std::vector<WifiSpectrumBandFrequencies>
57 frequencies; //!< the start and stop frequencies for each segment of the band
58};
59
60/// vector of spectrum bands
61using WifiSpectrumBands = std::vector<WifiSpectrumBandInfo>;
62
63/**
64 * @ingroup wifi
65 * Compare two bands.
66 *
67 * @param lhs the band on the left of operator<
68 * @param rhs the band on the right of operator<
69 * @return true if the start/stop frequencies of the first segment of left are lower than the
70 * start/stop frequencies of the first segment of right. If the first segment is the same for left
71 * and right, it return true if the start/stop frequencies of the second segment of left are lower
72 * than the start/stop frequencies of the second segment of right. Otherwise, the function return
73 * false.
74 */
75inline bool
77{
78 if (lhs.frequencies.front() == rhs.frequencies.front())
79 {
80 return lhs.frequencies.back() < rhs.frequencies.back();
81 }
82 return lhs.frequencies.front() < rhs.frequencies.front();
83}
84
85/**
86 * @brief Stream insertion operator.
87 *
88 * @param os the stream
89 * @param band the band
90 * @returns a reference to the stream
91 */
92inline std::ostream&
93operator<<(std::ostream& os, const WifiSpectrumBandInfo& band)
94{
95 NS_ASSERT(band.indices.size() == band.frequencies.size());
96 for (std::size_t segmentIndex = 0; segmentIndex < band.indices.size(); ++segmentIndex)
97 {
98 os << "indices segment" << segmentIndex << ": [" << band.indices.at(segmentIndex).first
99 << "-" << band.indices.at(segmentIndex).second << "], frequencies segment"
100 << segmentIndex << ": [" << band.frequencies.at(segmentIndex).first << "Hz-"
101 << band.frequencies.at(segmentIndex).second << "Hz] ";
102 }
103 return os;
104}
105
106/**
107 * These constants define the various convolutional coding rates
108 * used for the OFDM transmission modes in the IEEE 802.11
109 * standard. DSSS (for example) rates which do not have an explicit
110 * coding stage in their generation should have this parameter set to
111 * WIFI_CODE_RATE_UNDEFINED.
112 */
113enum WifiCodeRate : uint16_t
114{
115 WIFI_CODE_RATE_UNDEFINED, //!< undefined coding rate
116 WIFI_CODE_RATE_1_2, //!< 1/2 coding rate
117 WIFI_CODE_RATE_2_3, //!< 2/3 coding rate
118 WIFI_CODE_RATE_3_4, //!< 3/4 coding rate
119 WIFI_CODE_RATE_5_6, //!< 5/6 coding rate
120 WIFI_CODE_RATE_5_8, //!< 5/8 coding rate
121 WIFI_CODE_RATE_13_16, //!< 13/16 coding rate
122 WIFI_CODE_RATE_1_4, //!< 1/4 coding rate
123 WIFI_CODE_RATE_13_28, //!< 13/28 coding rate
124 WIFI_CODE_RATE_13_21, //!< 13/21 coding rate
125 WIFI_CODE_RATE_52_63, //!< 52/63 coding rate
126 WIFI_CODE_RATE_13_14, //!< 13/14 coding rate
127 WIFI_CODE_RATE_7_8, //!< 7/8 coding rate
128};
129
130/**
131 * @brief Stream insertion operator.
132 *
133 * @param os the stream
134 * @param codeRate the code rate
135 * @returns a reference to the stream
136 */
137inline std::ostream&
138operator<<(std::ostream& os, const WifiCodeRate& codeRate)
139{
140 switch (codeRate)
141 {
143 return (os << "Code rate undefined");
145 return (os << "Code rate 1/2");
147 return (os << "Code rate 2/3");
149 return (os << "Code rate 3/4");
151 return (os << "Code rate 5/6");
153 return (os << "Code rate 5/8");
155 return (os << "Code rate 13/16");
157 return (os << "Code rate 1/4");
159 return (os << "Code rate 13/28");
161 return (os << "Code rate 13/21");
163 return (os << "Code rate 52/63");
165 return (os << "Code rate 13/14");
167 return (os << "Code rate 7/8");
168 default:
169 NS_FATAL_ERROR("Unknown code rate");
170 return (os << "Unknown");
171 }
172}
173
174/**
175 * @ingroup wifi
176 * The type of preamble to be used by an IEEE 802.11 transmission
177 */
195
196/**
197 * @brief Stream insertion operator.
198 *
199 * @param os the stream
200 * @param preamble the preamble
201 * @returns a reference to the stream
202 */
203inline std::ostream&
204operator<<(std::ostream& os, const WifiPreamble& preamble)
205{
206 switch (preamble)
207 {
209 return (os << "LONG");
211 return (os << "SHORT");
213 return (os << "HT_MF");
215 return (os << "VHT_SU");
217 return (os << "VHT_MU");
219 return (os << "DMG_CTRL");
221 return (os << "DMG_SC");
223 return (os << "DMG_OFDM");
225 return (os << "HE_SU");
227 return (os << "HE_ER_SU");
229 return (os << "HE_MU");
231 return (os << "HE_TB");
233 return (os << "EHT_MU");
235 return (os << "EHT_TB");
236 default:
237 NS_FATAL_ERROR("Invalid preamble");
238 return (os << "INVALID");
239 }
240}
241
242/**
243 * @ingroup wifi
244 * This enumeration defines the modulation classes per
245 * (Table 10-6 "Modulation classes"; IEEE 802.11-2016, with
246 * updated in 802.11ax/D6.0 as Table 10-9).
247 */
249{
250 /** Modulation class unknown or unspecified. A WifiMode with this
251 WifiModulationClass has not been properly initialized. */
253 WIFI_MOD_CLASS_DSSS, //!< DSSS (Clause 15)
254 WIFI_MOD_CLASS_HR_DSSS, //!< HR/DSSS (Clause 16)
255 WIFI_MOD_CLASS_ERP_OFDM, //!< ERP-OFDM (18.4)
256 WIFI_MOD_CLASS_OFDM, //!< OFDM (Clause 17)
257 WIFI_MOD_CLASS_HT, //!< HT (Clause 19)
258 WIFI_MOD_CLASS_VHT, //!< VHT (Clause 22)
259 WIFI_MOD_CLASS_DMG_CTRL, //!< DMG (Clause 21)
260 WIFI_MOD_CLASS_DMG_OFDM, //!< DMG (Clause 21)
261 WIFI_MOD_CLASS_DMG_SC, //!< DMG (Clause 21)
262 WIFI_MOD_CLASS_DMG_LP_SC, //!< DMG (Clause 21)
263 WIFI_MOD_CLASS_HE, //!< HE (Clause 27)
264 WIFI_MOD_CLASS_EHT //!< EHT (Clause 36)
266
267/**
268 * @brief Stream insertion operator.
269 *
270 * @param os the stream
271 * @param modulation the WifiModulationClass
272 * @returns a reference to the stream
273 */
274inline std::ostream&
275operator<<(std::ostream& os, const WifiModulationClass& modulation)
276{
277 switch (modulation)
278 {
280 return (os << "DSSS");
282 return (os << "HR/DSSS");
284 return (os << "ERP-OFDM");
286 return (os << "OFDM");
288 return (os << "HT");
290 return (os << "VHT");
292 return (os << "DMG_CTRL");
294 return (os << "DMG_OFDM");
296 return (os << "DMG_SC");
298 return (os << "DMG_LP_SC");
300 return (os << "HE");
302 return (os << "EHT");
303 default:
304 NS_FATAL_ERROR("Unknown modulation");
305 return (os << "unknown");
306 }
307}
308
309/**
310 * @ingroup wifi
311 * The type of PPDU field (grouped for convenience)
312 */
314{
315 /**
316 * SYNC + SFD fields for DSSS or ERP,
317 * shortSYNC + shortSFD fields for HR/DSSS or ERP,
318 * HT-GF-STF + HT-GF-LTF1 fields for HT-GF,
319 * L-STF + L-LTF fields otherwise.
320 */
322 /**
323 * PHY header field for DSSS or ERP,
324 * short PHY header field for HR/DSSS or ERP,
325 * field not present for HT-GF,
326 * L-SIG field or L-SIG + RL-SIG fields otherwise.
327 */
329 WIFI_PPDU_FIELD_HT_SIG, //!< HT-SIG field
330 WIFI_PPDU_FIELD_TRAINING, //!< STF + LTF fields (excluding those in preamble for HT-GF)
331 WIFI_PPDU_FIELD_SIG_A, //!< SIG-A field
332 WIFI_PPDU_FIELD_SIG_B, //!< SIG-B field
333 WIFI_PPDU_FIELD_U_SIG, //!< U-SIG field
334 WIFI_PPDU_FIELD_EHT_SIG, //!< EHT-SIG field
335 WIFI_PPDU_FIELD_DATA //!< data field
337
338/**
339 * @brief Stream insertion operator.
340 *
341 * @param os the stream
342 * @param field the PPDU field
343 * @returns a reference to the stream
344 */
345inline std::ostream&
346operator<<(std::ostream& os, const WifiPpduField& field)
347{
348 switch (field)
349 {
351 return (os << "preamble");
353 return (os << "non-HT header");
355 return (os << "HT-SIG");
357 return (os << "training");
359 return (os << "SIG-A");
361 return (os << "SIG-B");
363 return (os << "U-SIG");
365 return (os << "EHT-SIG");
367 return (os << "data");
368 default:
369 NS_FATAL_ERROR("Unknown field");
370 return (os << "unknown");
371 }
372}
373
374/**
375 * @ingroup wifi
376 * The type of PPDU (SU, DL MU, or UL MU)
377 */
384
385/**
386 * @brief Stream insertion operator.
387 *
388 * @param os the stream
389 * @param type the PPDU type
390 * @returns a reference to the stream
391 */
392inline std::ostream&
393operator<<(std::ostream& os, const WifiPpduType& type)
394{
395 switch (type)
396 {
398 return (os << "SU");
400 return (os << "DL MU");
402 return (os << "UL MU");
403 default:
404 NS_FATAL_ERROR("Unknown type");
405 return (os << "unknown");
406 }
407}
408
409/**
410 * @ingroup wifi
411 * Enumeration of the possible reception failure reasons.
412 */
441
442/**
443 * @brief Stream insertion operator.
444 *
445 * @param os the stream
446 * @param reason the failure reason
447 * @returns a reference to the stream
448 */
449inline std::ostream&
450operator<<(std::ostream& os, const WifiPhyRxfailureReason& reason)
451{
452 switch (reason)
453 {
455 return (os << "UNSUPPORTED_SETTINGS");
457 return (os << "CHANNEL_SWITCHING");
458 case RXING:
459 return (os << "RXING");
460 case TXING:
461 return (os << "TXING");
462 case SLEEPING:
463 return (os << "SLEEPING");
464 case POWERED_OFF:
465 return (os << "OFF");
466 case TRUNCATED_TX:
467 return (os << "TRUNCATED_TX");
469 return (os << "BUSY_DECODING_PREAMBLE");
471 return (os << "PREAMBLE_DETECT_FAILURE");
473 return (os << "RECEPTION_ABORTED_BY_TX");
474 case L_SIG_FAILURE:
475 return (os << "L_SIG_FAILURE");
476 case HT_SIG_FAILURE:
477 return (os << "HT_SIG_FAILURE");
478 case SIG_A_FAILURE:
479 return (os << "SIG_A_FAILURE");
480 case SIG_B_FAILURE:
481 return (os << "SIG_B_FAILURE");
482 case U_SIG_FAILURE:
483 return (os << "U_SIG_FAILURE");
484 case EHT_SIG_FAILURE:
485 return (os << "EHT_SIG_FAILURE");
487 return (os << "PREAMBLE_DETECTION_PACKET_SWITCH");
489 return (os << "FRAME_CAPTURE_PACKET_SWITCH");
491 return (os << "OBSS_PD_CCA_RESET");
492 case PPDU_TOO_LATE:
493 return (os << "PPDU_TOO_LATE");
494 case FILTERED:
495 return (os << "FILTERED");
497 return (os << "DMG_HEADER_FAILURE");
499 return (os << "DMG_ALLOCATION_ENDED");
501 return (os << "SIGNAL_DETECTION_ABORTED_BY_TX");
502 case UNKNOWN:
503 default:
504 NS_FATAL_ERROR("Unknown reason");
505 return (os << "UNKNOWN");
506 }
507}
508
509/**
510 * @ingroup wifi
511 * Enumeration of the possible channel-list parameter elements
512 * defined in Table 8-5 of IEEE 802.11-2016.
513 */
521
522/**
523 * @brief Stream insertion operator.
524 *
525 * @param os the stream
526 * @param type the wifi channel list type
527 * @returns a reference to the stream
528 */
529inline std::ostream&
530operator<<(std::ostream& os, WifiChannelListType type)
531{
532 switch (type)
533 {
535 return (os << "PRIMARY");
537 return (os << "SECONDARY");
539 return (os << "SECONDARY40");
541 return (os << "SECONDARY80");
542 default:
543 NS_FATAL_ERROR("Unknown wifi channel type");
544 return (os << "UNKNOWN");
545 }
546}
547
548/**
549 * @brief Stream insertion operator.
550 *
551 * @param os the stream
552 * @param width the wifi channel width type
553 * @returns a reference to the stream
554 */
555inline std::ostream&
556operator<<(std::ostream& os, WifiChannelWidthType width)
557{
558 switch (width)
559 {
561 return (os << "20MHz");
563 return (os << "22MHz");
565 return (os << "5MHz");
567 return (os << "10MHz");
569 return (os << "40MHz");
571 return (os << "80MHz");
573 return (os << "160MHz");
575 return (os << "80+80MHz");
577 return (os << "2160MHz");
578 default:
580 return (os << "UNKNOWN");
581 }
582}
583
584/**
585 * Get the guard interval for a given WifiMode.
586 *
587 * @param mode the WifiMode
588 * @param device pointer to the WifiNetDevice object
589 *
590 * @return the guard interval duration to use for the mode
591 */
592Time GetGuardIntervalForMode(WifiMode mode, const Ptr<WifiNetDevice> device);
593
594/**
595 * Get the guard interval for a given WifiMode.
596 *
597 * @param mode the WifiMode
598 * @param htShortGuardInterval whether HT/VHT short guard interval is enabled
599 * @param heGuardInterval the HE guard interval duration
600 *
601 * @return the guard interval duration to use for the mode
602 */
603Time GetGuardIntervalForMode(WifiMode mode, bool htShortGuardInterval, Time heGuardInterval);
604
605/**
606 * Return the preamble to be used for the transmission.
607 *
608 * @param modulation the modulation selected for the transmission
609 * @param useShortPreamble whether short preamble should be used
610 *
611 * @return the preamble to be used for the transmission
612 */
613WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation,
614 bool useShortPreamble = false);
615
616/**
617 * Return the modulation class corresponding to the given preamble type.
618 * Only preamble types used by HT/VHT/HE/EHT can be passed to this function.
619 *
620 * @param preamble the given preamble type (must be one defined by HT standard or later)
621 * @return the modulation class corresponding to the given preamble type
622 */
623WifiModulationClass GetModulationClassForPreamble(WifiPreamble preamble);
624
625/**
626 * Return whether the modulation class of the selected mode for the
627 * control answer frame is allowed.
628 *
629 * @param modClassReq modulation class of the request frame
630 * @param modClassAnswer modulation class of the answer frame
631 *
632 * @return true if the modulation class of the selected mode for the
633 * control answer frame is allowed, false otherwise
634 */
635bool IsAllowedControlAnswerModulationClass(WifiModulationClass modClassReq,
636 WifiModulationClass modClassAnswer);
637
638/**
639 * Get the maximum PPDU duration (see Section 10.14 of 802.11-2016) for
640 * the PHY layers defining the aPPDUMaxTime characteristic (HT, VHT and HE).
641 * Return zero otherwise.
642 *
643 * @param preamble the preamble type
644 *
645 * @return the maximum PPDU duration, if defined, and zero otherwise
646 */
647Time GetPpduMaxTime(WifiPreamble preamble);
648
649/**
650 * Return true if a preamble corresponds to a multi-user transmission.
651 *
652 * @param preamble the preamble
653 * @return true if the provided preamble corresponds to a multi-user transmission
654 */
655bool IsMu(WifiPreamble preamble);
656
657/**
658 * Return true if a preamble corresponds to a downlink multi-user transmission.
659 *
660 * @param preamble the preamble
661 * @return true if the provided preamble corresponds to a downlink multi-user transmission
662 */
663bool IsDlMu(WifiPreamble preamble);
664
665/**
666 * Return true if a preamble corresponds to a uplink multi-user transmission.
667 *
668 * @param preamble the preamble
669 * @return true if the provided preamble corresponds to a uplink multi-user transmission
670 */
671bool IsUlMu(WifiPreamble preamble);
672
673/**
674 * Return the modulation class corresponding to a given standard.
675 *
676 * In the case of WIFI_STANDARD_80211b, two modulation classes are supported
677 * (WIFI_MOD_CLASS_DSSS and WIFI_MOD_CLASS_HR_DSSS); this method will return
678 * the latter.
679 *
680 * @param standard the standard
681 * @return the modulation class corresponding to the standard
682 */
683WifiModulationClass GetModulationClassForStandard(WifiStandard standard);
684
685/**
686 * Get the supported channel width set that can be advertised in PHY capabilities.
687 *
688 * @param standard the standard
689 * @param band the PHY band
690 * @return the supported channel width set that can be advertised for the given standard and band
691 */
692std::set<MHz_u> GetSupportedChannelWidthSet(WifiStandard standard, WifiPhyBand band);
693
694/**
695 * Get the maximum channel width allowed for the given modulation class.
696 *
697 * @param modulation the modulation class
698 * @return the maximum channel width allowed for the given modulation class
699 */
700MHz_u GetMaximumChannelWidth(WifiModulationClass modulation);
701
702/**
703 * Get the total channel width for the channel width type.
704 *
705 * @param width the channel width type
706 * @return the total channel width for the channel width type
707 */
709
710/**
711 * Return true if a preamble corresponds to an EHT transmission.
712 *
713 * @param preamble the preamble
714 * @return true if the provided preamble corresponds to an EHT transmission
715 */
716bool IsEht(WifiPreamble preamble);
717
718} // namespace ns3
719
720#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:28
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:865
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
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.
std::set< MHz_u > GetSupportedChannelWidthSet(WifiStandard standard, WifiPhyBand band)
Get the supported channel width set that can be advertised in PHY capabilities.
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
Return the preamble to be used for the 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