A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-standard-constants.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 DERONNE SOFTWARE ENGINEERING
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#ifndef WIFI_STANDARD_CONSTANTS_H
10#define WIFI_STANDARD_CONSTANTS_H
11
12#include "ns3/nstime.h"
13#include "ns3/wifi-export.h"
14
15/**
16 * @file
17 * @ingroup wifi
18 * Declaration of the constants used across wifi module
19 */
20
21namespace ns3
22{
23
24/// Wi-Fi Time Unit value in microseconds (see IEEE 802.11-2020 sec. 3.1)
25/// Used to initialize WIFI_TU
26WIFI_EXPORT extern const Time WIFI_TU;
27
28/// aRxPHYStartDelay value to use when waiting for a new frame in the context of EMLSR operations
29/// (Sec. 35.3.17 of 802.11be D3.1)
31
32/// aSIFSTime value for OFDM (20 MHz channel spacing)
33/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
34extern const Time OFDM_SIFS_TIME_20MHZ;
35
36/// aSlotTime duration for OFDM (20 MHz channel spacing)
37/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
38extern const Time OFDM_SLOT_TIME_20MHZ;
39
40/// aSIFSTime value for OFDM (10 MHz channel spacing)
41/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
42extern const Time OFDM_SIFS_TIME_10MHZ;
43
44/// aSlotTime duration for OFDM (10 MHz channel spacing)
45/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
46extern const Time OFDM_SLOT_TIME_10MHZ;
47
48/// aSIFSTime value for OFDM (5 MHz channel spacing)
49/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
50extern const Time OFDM_SIFS_TIME_5MHZ;
51
52/// aSlotTime duration for OFDM (5 MHz channel spacing)
53/// (Table 17-21 "OFDM PHY characteristics" of 802.11-2020)
54extern const Time OFDM_SLOT_TIME_5MHZ;
55
56/// aSIFSTime duration for DSSS (Table 16-4 "HR/DSSS PHY characteristics" of 802.11-2020)
57extern const Time DSSS_SIFS_TIME;
58
59/// aSlotTime duration for DSSS (Table 16-4 "HR/DSSS PHY characteristics" of 802.11-2020)
60extern const Time DSSS_SLOT_TIME;
61
62/// maximum propagation delay
63WIFI_EXPORT extern const Time MAX_PROPAGATION_DELAY;
64
65/// The aMediumSyncThreshold defined by Sec. 35.3.16.18.1 of 802.11be D4.0
66WIFI_EXPORT extern const Time MEDIUM_SYNC_THRESHOLD;
67
68/// minimum TX power level value
69static constexpr uint8_t WIFI_MIN_TX_PWR_LEVEL{1};
70
71/// Subcarrier frequency spacing in Hz (Table 19-6 "Timing-related constants" of 802.11-2020)
72static constexpr uint32_t SUBCARRIER_FREQUENCY_SPACING{312500};
73
74/// Subcarrier frequency spacing for the HE modulated fields in Hz (Table 27-12 "Timing-related
75/// constants" of 802.11ax-2021)
77
78/// Size of the space of sequence numbers
79static constexpr uint16_t SEQNO_SPACE_SIZE{4096};
80
81/// Size of the half the space of sequence numbers (used to determine old packets)
82static constexpr uint16_t SEQNO_SPACE_HALF_SIZE{SEQNO_SPACE_SIZE / 2};
83
84/// This value conforms to the 802.11 specification
85static constexpr uint16_t MAX_MSDU_SIZE{2304};
86
87/// The length in octets of the IEEE 802.11 MAC FCS field
88static constexpr uint16_t WIFI_MAC_FCS_LENGTH{4};
89
90/// The value for aPSDUMaxLength in Table 15-5 (DSSS PHY characteristics), Table 17-21 (OFDM PHY
91/// characteristics) and Table 18-5 (ERP characteristics) of 802.11-2020
92static constexpr uint32_t WIFI_PSDU_MAX_LENGTH{4095};
93
94/// The value for aPSDUMaxLength in Table 19-25 (HT PHY characteristics) of 802.11-2020
95static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HT{65'535};
96
97/// The value for aPSDUMaxLength in Table 21-28 (VHT PHY characteristics) of 802.11-2020
98static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_VHT{4'692'480};
99
100/// The value for aPSDUMaxLength in Table 27-54 (HE PHY characteristics) of 802.11ax-2021
101static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HE{6'500'631};
102
103/// The value for aPSDUMaxLength in Table 36-70 (EHT PHY characteristics) of 802.11be D7.0
104static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_EHT{15'523'200};
105
106/// The minimum value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
108
109/// The maximum value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
110static constexpr uint32_t WIFI_MAX_RTS_THRESHOLD{4692480};
111
112/// The default value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
114
115/// The minimum value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
116static constexpr uint32_t WIFI_MIN_FRAG_THRESHOLD{256};
117
118/// The maximum value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
119static constexpr uint32_t WIFI_MAX_FRAG_THRESHOLD{65535};
120
121/// The default value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
123
124/// STA_ID to identify a single user (SU)
125static constexpr uint16_t SU_STA_ID{65535};
126
127/// Empty 242-tone RU identifier for HE (Section 26.11.7 802.11ax-2021)
128static constexpr uint8_t EMPTY_242_TONE_HE_RU{113};
129
130/// The minimum value for the association ID (Sec. 9.4.1.8 of 802.11-2020)
131static constexpr uint16_t MIN_AID{1};
132
133/// The maximum value for the association ID (Sec. 9.4.1.8 of 802.11-2020)
134static constexpr uint16_t MAX_AID{2007};
135
136/// STA_ID for a RU that is intended for no user (Section 26.11.1 802.11ax-2021)
137static constexpr uint16_t NO_USER_STA_ID{2046};
138
139/// Unassigned 242-tone RU identifier for EHT (Table Table 36-34 IEEE 802.11be D7.0)
140static constexpr uint8_t UNASSIGNED_242_TONE_EHT_RU{27};
141
142/// The maximum value for the association ID updated since 802.11be (Sec. 9.4.1.8 of 802.11be D7.0)
143static constexpr uint16_t EHT_MAX_AID{2006};
144
145/// AID value for Special User Info field in trigger frames (Sec. 9.3.1.22.3 of 802.11be D7.0)
146static constexpr uint16_t AID_SPECIAL_USER{2007};
147
148} // namespace ns3
149
150#endif /* WIFI_STANDARD_CONSTANTS_H */
Simulation virtual time values and global simulation resolution.
Definition nstime.h:96
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static constexpr uint16_t SEQNO_SPACE_HALF_SIZE
Size of the half the space of sequence numbers (used to determine old packets).
const Time DSSS_SIFS_TIME
aSIFSTime duration for DSSS (Table 16-4 "HR/DSSS PHY characteristics" of 802.11-2020)
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH
The value for aPSDUMaxLength in Table 15-5 (DSSS PHY characteristics), Table 17-21 (OFDM PHY characte...
static constexpr uint8_t EMPTY_242_TONE_HE_RU
Empty 242-tone RU identifier for HE (Section 26.11.7 802.11ax-2021).
const Time WIFI_TU
Wi-Fi Time Unit value in microseconds (see IEEE 802.11-2020 sec.
static constexpr uint32_t WIFI_DEFAULT_FRAG_THRESHOLD
The default value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802....
const Time DSSS_SLOT_TIME
aSlotTime duration for DSSS (Table 16-4 "HR/DSSS PHY characteristics" of 802.11-2020)
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HE
The value for aPSDUMaxLength in Table 27-54 (HE PHY characteristics) of 802.11ax-2021.
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HT
The value for aPSDUMaxLength in Table 19-25 (HT PHY characteristics) of 802.11-2020.
static constexpr uint16_t WIFI_MAC_FCS_LENGTH
The length in octets of the IEEE 802.11 MAC FCS field.
const Time OFDM_SIFS_TIME_10MHZ
aSIFSTime value for OFDM (10 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
const Time OFDM_SLOT_TIME_20MHZ
aSlotTime duration for OFDM (20 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
static constexpr uint8_t WIFI_MIN_TX_PWR_LEVEL
minimum TX power level value
static constexpr uint8_t UNASSIGNED_242_TONE_EHT_RU
Unassigned 242-tone RU identifier for EHT (Table Table 36-34 IEEE 802.11be D7.0).
const Time OFDM_SIFS_TIME_5MHZ
aSIFSTime value for OFDM (5 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
static constexpr uint32_t WIFI_MIN_RTS_THRESHOLD
The minimum value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020).
static constexpr uint16_t NO_USER_STA_ID
STA_ID for a RU that is intended for no user (Section 26.11.1 802.11ax-2021).
static constexpr uint32_t WIFI_MIN_FRAG_THRESHOLD
The minimum value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802....
static constexpr uint32_t WIFI_MAX_FRAG_THRESHOLD
The maximum value for dot11FragmentationThreshold (C.3 MIB detail in IEEE Std 802....
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_VHT
The value for aPSDUMaxLength in Table 21-28 (VHT PHY characteristics) of 802.11-2020.
const Time OFDM_SLOT_TIME_5MHZ
aSlotTime duration for OFDM (5 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
static constexpr uint32_t SUBCARRIER_FREQUENCY_SPACING
Subcarrier frequency spacing in Hz (Table 19-6 "Timing-related constants" of 802.11-2020).
static constexpr uint16_t SEQNO_SPACE_SIZE
Size of the space of sequence numbers.
const Time MEDIUM_SYNC_THRESHOLD
The aMediumSyncThreshold defined by Sec. 35.3.16.18.1 of 802.11be D4.0.
static constexpr uint32_t WIFI_DEFAULT_RTS_THRESHOLD
The default value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020).
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_EHT
The value for aPSDUMaxLength in Table 36-70 (EHT PHY characteristics) of 802.11be D7....
const Time MAX_PROPAGATION_DELAY
maximum propagation delay
static constexpr uint32_t SUBCARRIER_FREQUENCY_SPACING_HE
Subcarrier frequency spacing for the HE modulated fields in Hz (Table 27-12 "Timing-relatedconstants"...
static constexpr uint16_t MAX_MSDU_SIZE
This value conforms to the 802.11 specification.
static constexpr uint16_t MIN_AID
The minimum value for the association ID (Sec. 9.4.1.8 of 802.11-2020).
static constexpr uint32_t WIFI_MAX_RTS_THRESHOLD
The maximum value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020).
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU).
const Time OFDM_SIFS_TIME_20MHZ
aSIFSTime value for OFDM (20 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
const Time OFDM_SLOT_TIME_10MHZ
aSlotTime duration for OFDM (10 MHz channel spacing) (Table 17-21 "OFDM PHY characteristics" of 802....
static constexpr uint16_t MAX_AID
The maximum value for the association ID (Sec. 9.4.1.8 of 802.11-2020).
const Time EMLSR_RX_PHY_START_DELAY
aRxPHYStartDelay value to use when waiting for a new frame in the context of EMLSR operations (Sec.
static constexpr uint16_t EHT_MAX_AID
The maximum value for the association ID updated since 802.11be (Sec. 9.4.1.8 of 802....
static constexpr uint16_t AID_SPECIAL_USER
AID value for Special User Info field in trigger frames (Sec. 9.3.1.22.3 of 802.11be D7....