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/**
44 * typedef for a pair of start and stop frequencies to represent a band
45 */
46using WifiSpectrumBandFrequencies = std::pair<Hz_u, Hz_u>;
47
48/// WifiSpectrumBandInfo structure containing info about a spectrum band
50{
51 std::vector<WifiSpectrumBandIndices>
52 indices; //!< the start and stop indices for each segment of the band
53 std::vector<WifiSpectrumBandFrequencies>
54 frequencies; //!< the start and stop frequencies for each segment of the band
55};
56
57/// vector of spectrum bands
58using WifiSpectrumBands = std::vector<WifiSpectrumBandInfo>;
59
60/**
61 * @ingroup wifi
62 * Compare two bands.
63 *
64 * @param lhs the band on the left of operator<
65 * @param rhs the band on the right of operator<
66 * @return true if the start/stop frequencies of the first segment of left are lower than the
67 * start/stop frequencies of the first segment of right. If the first segment is the same for left
68 * and right, it return true if the start/stop frequencies of the second segment of left are lower
69 * than the start/stop frequencies of the second segment of right. Otherwise, the function return
70 * false.
71 */
72inline bool
74{
75 if (lhs.frequencies.front() == rhs.frequencies.front())
76 {
77 return lhs.frequencies.back() < rhs.frequencies.back();
78 }
79 return lhs.frequencies.front() < rhs.frequencies.front();
80}
81
82/**
83 * @brief Stream insertion operator.
84 *
85 * @param os the stream
86 * @param band the band
87 * @returns a reference to the stream
88 */
89inline std::ostream&
90operator<<(std::ostream& os, const WifiSpectrumBandInfo& band)
91{
92 NS_ASSERT(band.indices.size() == band.frequencies.size());
93 for (std::size_t segmentIndex = 0; segmentIndex < band.indices.size(); ++segmentIndex)
94 {
95 os << "indices segment" << segmentIndex << ": [" << band.indices.at(segmentIndex).first
96 << "-" << band.indices.at(segmentIndex).second << "], frequencies segment"
97 << segmentIndex << ": [" << band.frequencies.at(segmentIndex).first << "Hz-"
98 << band.frequencies.at(segmentIndex).second << "Hz] ";
99 }
100 return os;
101}
102
103/**
104 * These constants define the various convolutional coding rates
105 * used for the OFDM transmission modes in the IEEE 802.11
106 * standard. DSSS (for example) rates which do not have an explicit
107 * coding stage in their generation should have this parameter set to
108 * WIFI_CODE_RATE_UNDEFINED.
109 */
110enum WifiCodeRate : uint16_t
111{
112 WIFI_CODE_RATE_UNDEFINED, //!< undefined coding rate
113 WIFI_CODE_RATE_1_2, //!< 1/2 coding rate
114 WIFI_CODE_RATE_2_3, //!< 2/3 coding rate
115 WIFI_CODE_RATE_3_4, //!< 3/4 coding rate
116 WIFI_CODE_RATE_5_6, //!< 5/6 coding rate
117 WIFI_CODE_RATE_5_8, //!< 5/8 coding rate
118 WIFI_CODE_RATE_13_16, //!< 13/16 coding rate
119 WIFI_CODE_RATE_1_4, //!< 1/4 coding rate
120 WIFI_CODE_RATE_13_28, //!< 13/28 coding rate
121 WIFI_CODE_RATE_13_21, //!< 13/21 coding rate
122 WIFI_CODE_RATE_52_63, //!< 52/63 coding rate
123 WIFI_CODE_RATE_13_14, //!< 13/14 coding rate
124 WIFI_CODE_RATE_7_8, //!< 7/8 coding rate
125};
126
127/**
128 * @brief Stream insertion operator.
129 *
130 * @param os the stream
131 * @param codeRate the code rate
132 * @returns a reference to the stream
133 */
134inline std::ostream&
135operator<<(std::ostream& os, const WifiCodeRate& codeRate)
136{
137 switch (codeRate)
138 {
140 return (os << "Code rate undefined");
142 return (os << "Code rate 1/2");
144 return (os << "Code rate 2/3");
146 return (os << "Code rate 3/4");
148 return (os << "Code rate 5/6");
150 return (os << "Code rate 5/8");
152 return (os << "Code rate 13/16");
154 return (os << "Code rate 1/4");
156 return (os << "Code rate 13/28");
158 return (os << "Code rate 13/21");
160 return (os << "Code rate 52/63");
162 return (os << "Code rate 13/14");
164 return (os << "Code rate 7/8");
165 default:
166 NS_FATAL_ERROR("Unknown code rate");
167 return (os << "Unknown");
168 }
169}
170
171/**
172 * @ingroup wifi
173 * The type of preamble to be used by an IEEE 802.11 transmission
174 */
192
193/**
194 * @brief Stream insertion operator.
195 *
196 * @param os the stream
197 * @param preamble the preamble
198 * @returns a reference to the stream
199 */
200inline std::ostream&
201operator<<(std::ostream& os, const WifiPreamble& preamble)
202{
203 switch (preamble)
204 {
206 return (os << "LONG");
208 return (os << "SHORT");
210 return (os << "HT_MF");
212 return (os << "VHT_SU");
214 return (os << "VHT_MU");
216 return (os << "DMG_CTRL");
218 return (os << "DMG_SC");
220 return (os << "DMG_OFDM");
222 return (os << "HE_SU");
224 return (os << "HE_ER_SU");
226 return (os << "HE_MU");
228 return (os << "HE_TB");
230 return (os << "EHT_MU");
232 return (os << "EHT_TB");
233 default:
234 NS_FATAL_ERROR("Invalid preamble");
235 return (os << "INVALID");
236 }
237}
238
239/**
240 * @ingroup wifi
241 * This enumeration defines the modulation classes per
242 * (Table 10-6 "Modulation classes"; IEEE 802.11-2016, with
243 * updated in 802.11ax/D6.0 as Table 10-9).
244 */
246{
247 /** Modulation class unknown or unspecified. A WifiMode with this
248 WifiModulationClass has not been properly initialized. */
250 WIFI_MOD_CLASS_DSSS, //!< DSSS (Clause 15)
251 WIFI_MOD_CLASS_HR_DSSS, //!< HR/DSSS (Clause 16)
252 WIFI_MOD_CLASS_ERP_OFDM, //!< ERP-OFDM (18.4)
253 WIFI_MOD_CLASS_OFDM, //!< OFDM (Clause 17)
254 WIFI_MOD_CLASS_HT, //!< HT (Clause 19)
255 WIFI_MOD_CLASS_VHT, //!< VHT (Clause 22)
256 WIFI_MOD_CLASS_DMG_CTRL, //!< DMG (Clause 21)
257 WIFI_MOD_CLASS_DMG_OFDM, //!< DMG (Clause 21)
258 WIFI_MOD_CLASS_DMG_SC, //!< DMG (Clause 21)
259 WIFI_MOD_CLASS_DMG_LP_SC, //!< DMG (Clause 21)
260 WIFI_MOD_CLASS_HE, //!< HE (Clause 27)
261 WIFI_MOD_CLASS_EHT //!< EHT (Clause 36)
263
264/**
265 * @brief Stream insertion operator.
266 *
267 * @param os the stream
268 * @param modulation the WifiModulationClass
269 * @returns a reference to the stream
270 */
271inline std::ostream&
272operator<<(std::ostream& os, const WifiModulationClass& modulation)
273{
274 switch (modulation)
275 {
277 return (os << "DSSS");
279 return (os << "HR/DSSS");
281 return (os << "ERP-OFDM");
283 return (os << "OFDM");
285 return (os << "HT");
287 return (os << "VHT");
289 return (os << "DMG_CTRL");
291 return (os << "DMG_OFDM");
293 return (os << "DMG_SC");
295 return (os << "DMG_LP_SC");
297 return (os << "HE");
299 return (os << "EHT");
300 default:
301 NS_FATAL_ERROR("Unknown modulation");
302 return (os << "unknown");
303 }
304}
305
306/**
307 * @ingroup wifi
308 * The type of PPDU field (grouped for convenience)
309 */
311{
312 /**
313 * SYNC + SFD fields for DSSS or ERP,
314 * shortSYNC + shortSFD fields for HR/DSSS or ERP,
315 * HT-GF-STF + HT-GF-LTF1 fields for HT-GF,
316 * L-STF + L-LTF fields otherwise.
317 */
319 /**
320 * PHY header field for DSSS or ERP,
321 * short PHY header field for HR/DSSS or ERP,
322 * field not present for HT-GF,
323 * L-SIG field or L-SIG + RL-SIG fields otherwise.
324 */
326 WIFI_PPDU_FIELD_HT_SIG, //!< HT-SIG field
327 WIFI_PPDU_FIELD_TRAINING, //!< STF + LTF fields (excluding those in preamble for HT-GF)
328 WIFI_PPDU_FIELD_SIG_A, //!< SIG-A field
329 WIFI_PPDU_FIELD_SIG_B, //!< SIG-B field
330 WIFI_PPDU_FIELD_U_SIG, //!< U-SIG field
331 WIFI_PPDU_FIELD_EHT_SIG, //!< EHT-SIG field
332 WIFI_PPDU_FIELD_DATA //!< data field
334
335/**
336 * @brief Stream insertion operator.
337 *
338 * @param os the stream
339 * @param field the PPDU field
340 * @returns a reference to the stream
341 */
342inline std::ostream&
343operator<<(std::ostream& os, const WifiPpduField& field)
344{
345 switch (field)
346 {
348 return (os << "preamble");
350 return (os << "non-HT header");
352 return (os << "HT-SIG");
354 return (os << "training");
356 return (os << "SIG-A");
358 return (os << "SIG-B");
360 return (os << "U-SIG");
362 return (os << "EHT-SIG");
364 return (os << "data");
365 default:
366 NS_FATAL_ERROR("Unknown field");
367 return (os << "unknown");
368 }
369}
370
371/**
372 * @ingroup wifi
373 * The type of PPDU (SU, DL MU, or UL MU)
374 */
381
382/**
383 * @brief Stream insertion operator.
384 *
385 * @param os the stream
386 * @param type the PPDU type
387 * @returns a reference to the stream
388 */
389inline std::ostream&
390operator<<(std::ostream& os, const WifiPpduType& type)
391{
392 switch (type)
393 {
395 return (os << "SU");
397 return (os << "DL MU");
399 return (os << "UL MU");
400 default:
401 NS_FATAL_ERROR("Unknown type");
402 return (os << "unknown");
403 }
404}
405
406/**
407 * @ingroup wifi
408 * Enumeration of the possible reception failure reasons.
409 */
438
439/**
440 * @brief Stream insertion operator.
441 *
442 * @param os the stream
443 * @param reason the failure reason
444 * @returns a reference to the stream
445 */
446inline std::ostream&
447operator<<(std::ostream& os, const WifiPhyRxfailureReason& reason)
448{
449 switch (reason)
450 {
452 return (os << "UNSUPPORTED_SETTINGS");
454 return (os << "CHANNEL_SWITCHING");
455 case RXING:
456 return (os << "RXING");
457 case TXING:
458 return (os << "TXING");
459 case SLEEPING:
460 return (os << "SLEEPING");
461 case POWERED_OFF:
462 return (os << "OFF");
463 case TRUNCATED_TX:
464 return (os << "TRUNCATED_TX");
466 return (os << "BUSY_DECODING_PREAMBLE");
468 return (os << "PREAMBLE_DETECT_FAILURE");
470 return (os << "RECEPTION_ABORTED_BY_TX");
471 case L_SIG_FAILURE:
472 return (os << "L_SIG_FAILURE");
473 case HT_SIG_FAILURE:
474 return (os << "HT_SIG_FAILURE");
475 case SIG_A_FAILURE:
476 return (os << "SIG_A_FAILURE");
477 case SIG_B_FAILURE:
478 return (os << "SIG_B_FAILURE");
479 case U_SIG_FAILURE:
480 return (os << "U_SIG_FAILURE");
481 case EHT_SIG_FAILURE:
482 return (os << "EHT_SIG_FAILURE");
484 return (os << "PREAMBLE_DETECTION_PACKET_SWITCH");
486 return (os << "FRAME_CAPTURE_PACKET_SWITCH");
488 return (os << "OBSS_PD_CCA_RESET");
489 case PPDU_TOO_LATE:
490 return (os << "PPDU_TOO_LATE");
491 case FILTERED:
492 return (os << "FILTERED");
494 return (os << "DMG_HEADER_FAILURE");
496 return (os << "DMG_ALLOCATION_ENDED");
498 return (os << "SIGNAL_DETECTION_ABORTED_BY_TX");
499 case UNKNOWN:
500 default:
501 NS_FATAL_ERROR("Unknown reason");
502 return (os << "UNKNOWN");
503 }
504}
505
506/**
507 * @ingroup wifi
508 * Enumeration of the possible channel-list parameter elements
509 * defined in Table 8-5 of IEEE 802.11-2016.
510 */
519
520/**
521 * @brief Stream insertion operator.
522 *
523 * @param os the stream
524 * @param type the wifi channel list type
525 * @returns a reference to the stream
526 */
527inline std::ostream&
528operator<<(std::ostream& os, WifiChannelListType type)
529{
530 switch (type)
531 {
533 return (os << "PRIMARY");
535 return (os << "SECONDARY");
537 return (os << "SECONDARY40");
539 return (os << "SECONDARY80");
541 return (os << "SECONDARY160");
542 default:
543 NS_FATAL_ERROR("Unknown wifi channel type " << +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 << "320MHz");
579 return (os << "2160MHz");
580 default:
582 return (os << "UNKNOWN");
583 }
584}
585
586/**
587 * Get the guard interval for a given WifiMode.
588 *
589 * @param mode the WifiMode
590 * @param device pointer to the WifiNetDevice object
591 *
592 * @return the guard interval duration to use for the mode
593 */
594Time GetGuardIntervalForMode(WifiMode mode, const Ptr<WifiNetDevice> device);
595
596/**
597 * Get the guard interval for a given WifiMode.
598 *
599 * @param mode the WifiMode
600 * @param htShortGuardInterval whether HT/VHT short guard interval is enabled
601 * @param heGuardInterval the HE guard interval duration
602 *
603 * @return the guard interval duration to use for the mode
604 */
605Time GetGuardIntervalForMode(WifiMode mode, bool htShortGuardInterval, Time heGuardInterval);
606
607/**
608 * Return the preamble to be used for the transmission.
609 *
610 * @param modulation the modulation selected for the transmission
611 * @param useShortPreamble whether short preamble should be used
612 *
613 * @return the preamble to be used for the transmission
614 */
615WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation,
616 bool useShortPreamble = false);
617
618/**
619 * Return the modulation class corresponding to the given preamble type.
620 * Only preamble types used by HT/VHT/HE/EHT can be passed to this function.
621 *
622 * @param preamble the given preamble type (must be one defined by HT standard or later)
623 * @return the modulation class corresponding to the given preamble type
624 */
625WifiModulationClass GetModulationClassForPreamble(WifiPreamble preamble);
626
627/**
628 * Return whether the modulation class of the selected mode for the
629 * control answer frame is allowed.
630 *
631 * @param modClassReq modulation class of the request frame
632 * @param modClassAnswer modulation class of the answer frame
633 *
634 * @return true if the modulation class of the selected mode for the
635 * control answer frame is allowed, false otherwise
636 */
637bool IsAllowedControlAnswerModulationClass(WifiModulationClass modClassReq,
638 WifiModulationClass modClassAnswer);
639
640/**
641 * Get the maximum PPDU duration (see Section 10.14 of 802.11-2016) for
642 * the PHY layers defining the aPPDUMaxTime characteristic (HT, VHT and HE).
643 * Return zero otherwise.
644 *
645 * @param preamble the preamble type
646 *
647 * @return the maximum PPDU duration, if defined, and zero otherwise
648 */
649Time GetPpduMaxTime(WifiPreamble preamble);
650
651/**
652 * Return true if a preamble corresponds to a multi-user transmission.
653 *
654 * @param preamble the preamble
655 * @return true if the provided preamble corresponds to a multi-user transmission
656 */
657bool IsMu(WifiPreamble preamble);
658
659/**
660 * Return true if a preamble corresponds to a downlink multi-user transmission.
661 *
662 * @param preamble the preamble
663 * @return true if the provided preamble corresponds to a downlink multi-user transmission
664 */
665bool IsDlMu(WifiPreamble preamble);
666
667/**
668 * Return true if a preamble corresponds to a uplink multi-user transmission.
669 *
670 * @param preamble the preamble
671 * @return true if the provided preamble corresponds to a uplink multi-user transmission
672 */
673bool IsUlMu(WifiPreamble preamble);
674
675/**
676 * Return the modulation class corresponding to a given standard.
677 *
678 * In the case of WIFI_STANDARD_80211b, two modulation classes are supported
679 * (WIFI_MOD_CLASS_DSSS and WIFI_MOD_CLASS_HR_DSSS); this method will return
680 * the latter.
681 *
682 * @param standard the standard
683 * @return the modulation class corresponding to the standard
684 */
685WifiModulationClass GetModulationClassForStandard(WifiStandard standard);
686
687/**
688 * Get the supported channel width set that can be advertised in PHY capabilities.
689 *
690 * @param standard the standard
691 * @param band the PHY band
692 * @return the supported channel width set that can be advertised for the given standard and band
693 */
694std::set<MHz_u> GetSupportedChannelWidthSet(WifiStandard standard, WifiPhyBand band);
695
696/**
697 * Get the maximum channel width allowed for the given modulation class.
698 *
699 * @param modulation the modulation class
700 * @return the maximum channel width allowed for the given modulation class
701 */
702MHz_u GetMaximumChannelWidth(WifiModulationClass modulation);
703
704/**
705 * Get the total channel width for the channel width type.
706 *
707 * @param width the channel width type
708 * @return the total channel width for the channel width type
709 */
711
712/**
713 * Return true if a preamble corresponds to an EHT transmission.
714 *
715 * @param preamble the preamble
716 * @return true if the provided preamble corresponds to an EHT transmission
717 */
718bool IsEht(WifiPreamble preamble);
719
720/**
721 * @brief map a given channel list type to the corresponding scaling factor
722 */
723const std::map<WifiChannelListType, dBm_u> channelTypeToScalingFactor{
729};
730
731} // namespace ns3
732
733#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_SECONDARY160
@ 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...
const std::map< WifiChannelListType, dBm_u > channelTypeToScalingFactor
map a given channel list type to the corresponding scaling factor
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.
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