A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
edca-parameter-set.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Sébastien Deronne
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#ifndef EDCA_PARAMETER_SET_H
10#define EDCA_PARAMETER_SET_H
11
13
14#include "ns3/wifi-export.h"
15
16namespace ns3
17{
18
19/**
20 * @brief The EDCA Parameter Set
21 * @ingroup wifi
22 *
23 * This class knows how to serialize and deserialize the EDCA Parameter Set.
24 */
25class WIFI_EXPORT EdcaParameterSet : public WifiInformationElement
26{
27 public:
29
30 // Implementations of pure virtual methods of WifiInformationElement
31 WifiInformationElementId ElementId() const override;
32
33 /**
34 * Set the QoS Info field in the EdcaParameterSet information element.
35 *
36 * @param qosInfo the QoS Info field in the EdcaParameterSet information element
37 */
38 void SetQosInfo(uint8_t qosInfo);
39 /**
40 * Set the AC_BE AIFSN field in the EdcaParameterSet information element.
41 *
42 * @param aifsn the AC_BE AIFSN field in the EdcaParameterSet information element
43 */
44 void SetBeAifsn(uint8_t aifsn);
45 /**
46 * Set the AC_BE ACI field in the EdcaParameterSet information element.
47 *
48 * @param aci the AC_BE ACI field in the EdcaParameterSet information element
49 */
50 void SetBeAci(uint8_t aci);
51 /**
52 * Set the AC_BE CWmin field in the EdcaParameterSet information element.
53 *
54 * @param cwMin the AC_BE CWmin field in the EdcaParameterSet information element
55 */
56 void SetBeCWmin(uint32_t cwMin);
57 /**
58 * Set the AC_BE CWmax field in the EdcaParameterSet information element.
59 *
60 * @param cwMax the AC_BE CWmax field in the EdcaParameterSet information element
61 */
62 void SetBeCWmax(uint32_t cwMax);
63 /**
64 * Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
65 *
66 * @param txop the AC_BE TXOP Limit field in the EdcaParameterSet information element
67 */
68 void SetBeTxopLimit(uint16_t txop);
69 /**
70 * Set the AC_BK AIFSN field in the EdcaParameterSet information element.
71 *
72 * @param aifsn the AC_BB AIFSN field in the EdcaParameterSet information element
73 */
74 void SetBkAifsn(uint8_t aifsn);
75 /**
76 * Set the AC_BK ACI field in the EdcaParameterSet information element.
77 *
78 * @param aci the AC_BK ACI field in the EdcaParameterSet information element
79 */
80 void SetBkAci(uint8_t aci);
81 /**
82 * Set the AC_BK CWmin field in the EdcaParameterSet information element.
83 *
84 * @param cwMin the AC_BK CWmin field in the EdcaParameterSet information element
85 */
86 void SetBkCWmin(uint32_t cwMin);
87 /**
88 * Set the AC_BK CWmax field in the EdcaParameterSet information element.
89 *
90 * @param cwMax the AC_BK CWmax field in the EdcaParameterSet information element
91 */
92 void SetBkCWmax(uint32_t cwMax);
93 /**
94 * Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
95 *
96 * @param txop the AC_BK TXOP Limit field in the EdcaParameterSet information element
97 */
98 void SetBkTxopLimit(uint16_t txop);
99 /**
100 * Set the AC_VI AIFSN field in the EdcaParameterSet information element.
101 *
102 * @param aifsn the AC_VI AIFSN field in the EdcaParameterSet information element
103 */
104 void SetViAifsn(uint8_t aifsn);
105 /**
106 * Set the AC_VI ACI field in the EdcaParameterSet information element.
107 *
108 * @param aci the AC_VI ACI field in the EdcaParameterSet information element
109 */
110 void SetViAci(uint8_t aci);
111 /**
112 * Set the AC_VI CWmin field in the EdcaParameterSet information element.
113 *
114 * @param cwMin the AC_VI CWmin field in the EdcaParameterSet information element
115 */
116 void SetViCWmin(uint32_t cwMin);
117 /**
118 * Set the AC_VI CWmax field in the EdcaParameterSet information element.
119 *
120 * @param cwMax the AC_VI CWmax field in the EdcaParameterSet information element
121 */
122 void SetViCWmax(uint32_t cwMax);
123 /**
124 * Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
125 *
126 * @param txop the AC_VI TXOP Limit field in the EdcaParameterSet information element
127 */
128 void SetViTxopLimit(uint16_t txop);
129 /**
130 * Set the AC_VO AIFSN field in the EdcaParameterSet information element.
131 *
132 * @param aifsn the AC_VO AIFSN field in the EdcaParameterSet information element
133 */
134 void SetVoAifsn(uint8_t aifsn);
135 /**
136 * Set the AC_VO ACI field in the EdcaParameterSet information element.
137 *
138 * @param aci the AC_VO ACI field in the EdcaParameterSet information element
139 */
140 void SetVoAci(uint8_t aci);
141 /**
142 * Set the AC_VO CWmin field in the EdcaParameterSet information element.
143 *
144 * @param cwMin the AC_VO CWmin field in the EdcaParameterSet information element
145 */
146 void SetVoCWmin(uint32_t cwMin);
147 /**
148 * Set the AC_VO CWmax field in the EdcaParameterSet information element.
149 *
150 * @param cwMax the AC_VO CWmax field in the EdcaParameterSet information element
151 */
152 void SetVoCWmax(uint32_t cwMax);
153 /**
154 * Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
155 *
156 * @param txop the AC_VO TXOP Limit field in the EdcaParameterSet information element
157 */
158 void SetVoTxopLimit(uint16_t txop);
159
160 /**
161 * Return the QoS Info field in the EdcaParameterSet information element.
162 *
163 * @return the QoS Info field in the EdcaParameterSet information element
164 */
165 uint8_t GetQosInfo() const;
166 /**
167 * Return the AC_BE AIFSN field in the EdcaParameterSet information element.
168 *
169 * @return the AC_BE AIFSN field in the EdcaParameterSet information element
170 */
171 uint8_t GetBeAifsn() const;
172 /**
173 * Return the AC_BE CWmin field in the EdcaParameterSet information element.
174 *
175 * @return the AC_BE CWmin field in the EdcaParameterSet information element
176 */
177 uint32_t GetBeCWmin() const;
178 /**
179 * Return the AC_BE CWmax field in the EdcaParameterSet information element.
180 *
181 * @return the AC_BE CWmax field in the EdcaParameterSet information element
182 */
183 uint32_t GetBeCWmax() const;
184 /**
185 * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
186 *
187 * @return the AC_BE TXOP Limit field in the EdcaParameterSet information element
188 */
189 uint16_t GetBeTxopLimit() const;
190 /**
191 * Return the AC_BK AIFSN field in the EdcaParameterSet information element.
192 *
193 * @return the AC_BK AIFSN field in the EdcaParameterSet information element
194 */
195 uint8_t GetBkAifsn() const;
196 /**
197 * Return the AC_BK CWmin field in the EdcaParameterSet information element.
198 *
199 * @return the AC_BK CWmin field in the EdcaParameterSet information element
200 */
201 uint32_t GetBkCWmin() const;
202 /**
203 * Return the AC_BK CWmax field in the EdcaParameterSet information element.
204 *
205 * @return the AC_BK CWmax field in the EdcaParameterSet information element
206 */
207 uint32_t GetBkCWmax() const;
208 /**
209 * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
210 *
211 * @return the AC_BK TXOP Limit field in the EdcaParameterSet information element
212 */
213 uint16_t GetBkTxopLimit() const;
214 /**
215 * Return the AC_VI AIFSN field in the EdcaParameterSet information element.
216 *
217 * @return the AC_VI AIFSN field in the EdcaParameterSet information element
218 */
219 uint8_t GetViAifsn() const;
220 /**
221 * Return the AC_VI CWmin field in the EdcaParameterSet information element.
222 *
223 * @return the AC_VI CWmin field in the EdcaParameterSet information element
224 */
225 uint32_t GetViCWmin() const;
226 /**
227 * Return the AC_VI CWmax field in the EdcaParameterSet information element.
228 *
229 * @return the AC_VI CWmax field in the EdcaParameterSet information element
230 */
231 uint32_t GetViCWmax() const;
232 /**
233 * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
234 *
235 * @return the AC_VI TXOP Limit field in the EdcaParameterSet information element
236 */
237 uint16_t GetViTxopLimit() const;
238 /**
239 * Return the AC_VO AIFSN field in the EdcaParameterSet information element.
240 *
241 * @return the AC_VO AIFSN field in the EdcaParameterSet information element
242 */
243 uint8_t GetVoAifsn() const;
244 /**
245 * Return the AC_VO CWmin field in the EdcaParameterSet information element.
246 *
247 * @return the AC_VO CWmin field in the EdcaParameterSet information element
248 */
249 uint32_t GetVoCWmin() const;
250 /**
251 * Return the AC_VO CWmax field in the EdcaParameterSet information element.
252 *
253 * @return the AC_VO CWmax field in the EdcaParameterSet information element
254 */
255 uint32_t GetVoCWmax() const;
256 /**
257 * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
258 *
259 * @return the AC_VO TXOP Limit field in the EdcaParameterSet information element
260 */
261 uint16_t GetVoTxopLimit() const;
262
263 private:
264 uint16_t GetInformationFieldSize() const override;
265 void SerializeInformationField(Buffer::Iterator start) const override;
266 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
267 void Print(std::ostream& os) const override;
268
269 uint8_t m_qosInfo; ///< QOS info
270 uint8_t m_reserved; ///< reserved
271 uint32_t m_acBE; ///< AC_BE
272 uint32_t m_acBK; ///< AC_BK
273 uint32_t m_acVI; ///< AC_VI
274 uint32_t m_acVO; ///< AC_VO
275};
276
277} // namespace ns3
278
279#endif /* EDCA_PARAMETER_SET_H */
iterator in a Buffer instance
Definition buffer.h:109
void SetViTxopLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
void SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
uint8_t GetBeAifsn() const
Return the AC_BE AIFSN field in the EdcaParameterSet information element.
uint16_t GetViTxopLimit() const
Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets).
uint16_t GetBkTxopLimit() const
Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
uint16_t GetVoTxopLimit() const
Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
uint8_t GetViAifsn() const
Return the AC_VI AIFSN field in the EdcaParameterSet information element.
uint16_t GetBeTxopLimit() const
Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
uint32_t GetBeCWmax() const
Return the AC_BE CWmax field in the EdcaParameterSet information element.
uint32_t GetBeCWmin() const
Return the AC_BE CWmin field in the EdcaParameterSet information element.
uint32_t GetVoCWmax() const
Return the AC_VO CWmax field in the EdcaParameterSet information element.
void SetVoCWmax(uint32_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet information element.
void SetViCWmin(uint32_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
void SetVoTxopLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
uint8_t GetQosInfo() const
Return the QoS Info field in the EdcaParameterSet information element.
uint8_t GetVoAifsn() const
Return the AC_VO AIFSN field in the EdcaParameterSet information element.
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
void SetBkCWmin(uint32_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
uint32_t GetVoCWmin() const
Return the AC_VO CWmin field in the EdcaParameterSet information element.
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
void SetViCWmax(uint32_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
void SetVoCWmin(uint32_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
void SetBeTxopLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
void SetBeCWmax(uint32_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
void SetBkCWmax(uint32_t cwMax)
Set the AC_BK CWmax field in the EdcaParameterSet information element.
void SetBkTxopLimit(uint16_t txop)
Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
uint8_t GetBkAifsn() const
Return the AC_BK AIFSN field in the EdcaParameterSet information element.
void SetBeCWmin(uint32_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
uint32_t GetBkCWmin() const
Return the AC_BK CWmin field in the EdcaParameterSet information element.
uint32_t GetViCWmin() const
Return the AC_VI CWmin field in the EdcaParameterSet information element.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets).
uint32_t GetViCWmax() const
Return the AC_VI CWmax field in the EdcaParameterSet information element.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint32_t GetBkCWmax() const
Return the AC_BK CWmax field in the EdcaParameterSet information element.
void SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
Information element, as defined in 802.11-2007 standard.
void Print(ComponentCarrier cc)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.