A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
he-configuration.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 University of Washington
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#include "he-configuration.h"
9
10#include "ns3/log.h"
11#include "ns3/nstime.h"
12#include "ns3/uinteger.h"
13#include "ns3/wifi-utils.h"
14
15namespace ns3
16{
17
18NS_LOG_COMPONENT_DEFINE("HeConfiguration");
20
25
28{
29 static ns3::TypeId tid =
30 ns3::TypeId("ns3::HeConfiguration")
32 .SetGroupName("Wifi")
33 .AddConstructor<HeConfiguration>()
34 .AddAttribute("GuardInterval",
35 "Specify the shortest guard interval duration that can be used for HE "
36 "transmissions."
37 "Possible values are 800ns, 1600ns or 3200ns.",
42 .AddAttribute("BssColor",
43 "The BSS color",
47 .AddAttribute("MaxTbPpduDelay",
48 "If positive, the value of this attribute specifies the maximum "
49 "delay with which a TB PPDU can be received after the reception of "
50 "the first TB PPDU. If the delay is higher than this value, the "
51 "TB PPDU is dropped and considered interference. The maximum delay "
52 "is anyway capped at the duration of the training fields in the PPDU. "
53 "This attribute is only valid for APs.",
57 .AddAttribute("MuBeAifsn",
58 "AIFSN used by BE EDCA when the MU EDCA Timer is running. "
59 "It must be either zero (EDCA disabled) or a value from 2 to 15.",
63 .AddAttribute("MuBkAifsn",
64 "AIFSN used by BK EDCA when the MU EDCA Timer is running. "
65 "It must be either zero (EDCA disabled) or a value from 2 to 15.",
69 .AddAttribute("MuViAifsn",
70 "AIFSN used by VI EDCA when the MU EDCA Timer is running. "
71 "It must be either zero (EDCA disabled) or a value from 2 to 15.",
75 .AddAttribute("MuVoAifsn",
76 "AIFSN used by VO EDCA when the MU EDCA Timer is running. "
77 "It must be either zero (EDCA disabled) or a value from 2 to 15.",
81 .AddAttribute("MuBeCwMin",
82 "CWmin used by BE EDCA when the MU EDCA Timer is running. "
83 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
84 UintegerValue(15),
87 .AddAttribute("MuBkCwMin",
88 "CWmin used by BK EDCA when the MU EDCA Timer is running. "
89 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
90 UintegerValue(15),
93 .AddAttribute("MuViCwMin",
94 "CWmin used by VI EDCA when the MU EDCA Timer is running. "
95 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
96 UintegerValue(15),
99 .AddAttribute("MuVoCwMin",
100 "CWmin used by VO EDCA when the MU EDCA Timer is running. "
101 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
102 UintegerValue(15),
105 .AddAttribute("MuBeCwMax",
106 "CWmax used by BE EDCA when the MU EDCA Timer is running. "
107 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
108 UintegerValue(1023),
111 .AddAttribute("MuBkCwMax",
112 "CWmax used by BK EDCA when the MU EDCA Timer is running. "
113 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
114 UintegerValue(1023),
117 .AddAttribute("MuViCwMax",
118 "CWmax used by VI EDCA when the MU EDCA Timer is running. "
119 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
120 UintegerValue(1023),
123 .AddAttribute("MuVoCwMax",
124 "CWmax used by VO EDCA when the MU EDCA Timer is running. "
125 "It must be a power of 2 minus 1 in the range from 0 to 32767.",
126 UintegerValue(1023),
129 .AddAttribute("BeMuEdcaTimer",
130 "The MU EDCA Timer used by BE EDCA. It must be a multiple of "
131 "8192 us and must be in the range from 8.192 ms to 2088.96 ms. "
132 "0 is a reserved value, but we allow to use this value to indicate "
133 "that an MU EDCA Parameter Set element must not be sent. Therefore, "
134 "0 can only be used if the MU EDCA Timer for all ACs is set to 0.",
138 .AddAttribute("BkMuEdcaTimer",
139 "The MU EDCA Timer used by BK EDCA. It must be a multiple of "
140 "8192 us and must be in the range from 8.192 ms to 2088.96 ms."
141 "0 is a reserved value, but we allow to use this value to indicate "
142 "that an MU EDCA Parameter Set element must not be sent. Therefore, "
143 "0 can only be used if the MU EDCA Timer for all ACs is set to 0.",
147 .AddAttribute("ViMuEdcaTimer",
148 "The MU EDCA Timer used by VI EDCA. It must be a multiple of "
149 "8192 us and must be in the range from 8.192 ms to 2088.96 ms."
150 "0 is a reserved value, but we allow to use this value to indicate "
151 "that an MU EDCA Parameter Set element must not be sent. Therefore, "
152 "0 can only be used if the MU EDCA Timer for all ACs is set to 0.",
156 .AddAttribute("VoMuEdcaTimer",
157 "The MU EDCA Timer used by VO EDCA. It must be a multiple of "
158 "8192 us and must be in the range from 8.192 ms to 2088.96 ms."
159 "0 is a reserved value, but we allow to use this value to indicate "
160 "that an MU EDCA Parameter Set element must not be sent. Therefore, "
161 "0 can only be used if the MU EDCA Timer for all ACs is set to 0.",
165 return tid;
166}
167
168void
170{
171 NS_LOG_FUNCTION(this << guardInterval);
173 "Invalid HE guard interval " << guardInterval.As(Time::NS));
174 m_guardInterval = guardInterval;
175}
176
177Time
182
183void
185{
186 NS_LOG_FUNCTION(this << +bssColor);
187 m_bssColor = bssColor;
188}
189
190uint8_t
192{
193 return m_bssColor;
194}
195
196Time
201
202void
204{
205 m_maxTbPpduDelay = maxTbPpduDelay;
206}
207
208} // namespace ns3
HE configuration.
uint16_t m_muBkCwMin
CWmin for BK in MU EDCA Parameter Set.
uint16_t m_muBkCwMax
CWmax for BK in MU EDCA Parameter Set.
uint16_t m_muVoCwMin
CWmin for VO in MU EDCA Parameter Set.
static TypeId GetTypeId()
Get the type ID.
uint16_t m_muViCwMin
CWmin for VI in MU EDCA Parameter Set.
uint8_t m_muBeAifsn
AIFSN for BE in MU EDCA Parameter Set.
uint16_t m_muViCwMax
CWmax for VI in MU EDCA Parameter Set.
uint8_t m_muViAifsn
AIFSN for VI in MU EDCA Parameter Set.
uint16_t m_muBeCwMin
CWmin for BE in MU EDCA Parameter Set.
uint8_t m_muVoAifsn
AIFSN for VO in MU EDCA Parameter Set.
Time m_bkMuEdcaTimer
Timer for BK in MU EDCA Parameter Set.
Time m_viMuEdcaTimer
Timer for VI in MU EDCA Parameter Set.
void SetBssColor(uint8_t bssColor)
uint16_t m_muBeCwMax
CWmax for BE in MU EDCA Parameter Set.
void SetMaxTbPpduDelay(Time maxTbPpduDelay)
uint16_t m_muVoCwMax
CWmax for VO in MU EDCA Parameter Set.
Time m_beMuEdcaTimer
Timer for BE in MU EDCA Parameter Set.
Time m_guardInterval
Supported HE guard interval.
void SetGuardInterval(Time guardInterval)
uint8_t m_bssColor
BSS color.
Time m_voMuEdcaTimer
Timer for VO in MU EDCA Parameter Set.
uint8_t m_muBkAifsn
AIFSN for BK in MU EDCA Parameter Set.
Time m_maxTbPpduDelay
Max TB PPDU delay.
uint8_t GetBssColor() const
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
Simulation virtual time values and global simulation resolution.
Definition nstime.h:95
@ NS
nanosecond
Definition nstime.h:109
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition time.cc:422
a unique identifier for an interface.
Definition type-id.h:50
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1003
Hold an unsigned integer type.
Definition uinteger.h:34
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition assert.h:76
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:201
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1347
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1364
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1313
@ WIFI_STANDARD_80211ax
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeUintegerChecker()
Definition uinteger.h:85
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition nstime.h:1416
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition uinteger.h:35
bool IsValidGuardInterval(Time gi, WifiStandard standard)
Check whether a guard interval duration is valid for a given standard.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition nstime.h:1436