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
14namespace ns3
15{
16
17/**
18 * \brief The EDCA Parameter Set
19 * \ingroup wifi
20 *
21 * This class knows how to serialise and deserialise the EDCA Parameter Set.
22 */
24{
25 public:
27
28 // Implementations of pure virtual methods of WifiInformationElement
29 WifiInformationElementId ElementId() const override;
30
31 /**
32 * Set the QoS Info field in the EdcaParameterSet information element.
33 *
34 * \param qosInfo the QoS Info field in the EdcaParameterSet information element
35 */
36 void SetQosInfo(uint8_t qosInfo);
37 /**
38 * Set the AC_BE AIFSN field in the EdcaParameterSet information element.
39 *
40 * \param aifsn the AC_BE AIFSN field in the EdcaParameterSet information element
41 */
42 void SetBeAifsn(uint8_t aifsn);
43 /**
44 * Set the AC_BE ACI field in the EdcaParameterSet information element.
45 *
46 * \param aci the AC_BE ACI field in the EdcaParameterSet information element
47 */
48 void SetBeAci(uint8_t aci);
49 /**
50 * Set the AC_BE CWmin field in the EdcaParameterSet information element.
51 *
52 * \param cwMin the AC_BE CWmin field in the EdcaParameterSet information element
53 */
54 void SetBeCWmin(uint32_t cwMin);
55 /**
56 * Set the AC_BE CWmax field in the EdcaParameterSet information element.
57 *
58 * \param cwMax the AC_BE CWmax field in the EdcaParameterSet information element
59 */
60 void SetBeCWmax(uint32_t cwMax);
61 /**
62 * Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
63 *
64 * \param txop the AC_BE TXOP Limit field in the EdcaParameterSet information element
65 */
66 void SetBeTxopLimit(uint16_t txop);
67 /**
68 * Set the AC_BK AIFSN field in the EdcaParameterSet information element.
69 *
70 * \param aifsn the AC_BB AIFSN field in the EdcaParameterSet information element
71 */
72 void SetBkAifsn(uint8_t aifsn);
73 /**
74 * Set the AC_BK ACI field in the EdcaParameterSet information element.
75 *
76 * \param aci the AC_BK ACI field in the EdcaParameterSet information element
77 */
78 void SetBkAci(uint8_t aci);
79 /**
80 * Set the AC_BK CWmin field in the EdcaParameterSet information element.
81 *
82 * \param cwMin the AC_BK CWmin field in the EdcaParameterSet information element
83 */
84 void SetBkCWmin(uint32_t cwMin);
85 /**
86 * Set the AC_BK CWmax field in the EdcaParameterSet information element.
87 *
88 * \param cwMax the AC_BK CWmax field in the EdcaParameterSet information element
89 */
90 void SetBkCWmax(uint32_t cwMax);
91 /**
92 * Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
93 *
94 * \param txop the AC_BK TXOP Limit field in the EdcaParameterSet information element
95 */
96 void SetBkTxopLimit(uint16_t txop);
97 /**
98 * Set the AC_VI AIFSN field in the EdcaParameterSet information element.
99 *
100 * \param aifsn the AC_VI AIFSN field in the EdcaParameterSet information element
101 */
102 void SetViAifsn(uint8_t aifsn);
103 /**
104 * Set the AC_VI ACI field in the EdcaParameterSet information element.
105 *
106 * \param aci the AC_VI ACI field in the EdcaParameterSet information element
107 */
108 void SetViAci(uint8_t aci);
109 /**
110 * Set the AC_VI CWmin field in the EdcaParameterSet information element.
111 *
112 * \param cwMin the AC_VI CWmin field in the EdcaParameterSet information element
113 */
114 void SetViCWmin(uint32_t cwMin);
115 /**
116 * Set the AC_VI CWmax field in the EdcaParameterSet information element.
117 *
118 * \param cwMax the AC_VI CWmax field in the EdcaParameterSet information element
119 */
120 void SetViCWmax(uint32_t cwMax);
121 /**
122 * Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
123 *
124 * \param txop the AC_VI TXOP Limit field in the EdcaParameterSet information element
125 */
126 void SetViTxopLimit(uint16_t txop);
127 /**
128 * Set the AC_VO AIFSN field in the EdcaParameterSet information element.
129 *
130 * \param aifsn the AC_VO AIFSN field in the EdcaParameterSet information element
131 */
132 void SetVoAifsn(uint8_t aifsn);
133 /**
134 * Set the AC_VO ACI field in the EdcaParameterSet information element.
135 *
136 * \param aci the AC_VO ACI field in the EdcaParameterSet information element
137 */
138 void SetVoAci(uint8_t aci);
139 /**
140 * Set the AC_VO CWmin field in the EdcaParameterSet information element.
141 *
142 * \param cwMin the AC_VO CWmin field in the EdcaParameterSet information element
143 */
144 void SetVoCWmin(uint32_t cwMin);
145 /**
146 * Set the AC_VO CWmax field in the EdcaParameterSet information element.
147 *
148 * \param cwMax the AC_VO CWmax field in the EdcaParameterSet information element
149 */
150 void SetVoCWmax(uint32_t cwMax);
151 /**
152 * Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
153 *
154 * \param txop the AC_VO TXOP Limit field in the EdcaParameterSet information element
155 */
156 void SetVoTxopLimit(uint16_t txop);
157
158 /**
159 * Return the QoS Info field in the EdcaParameterSet information element.
160 *
161 * \return the QoS Info field in the EdcaParameterSet information element
162 */
163 uint8_t GetQosInfo() const;
164 /**
165 * Return the AC_BE AIFSN field in the EdcaParameterSet information element.
166 *
167 * \return the AC_BE AIFSN field in the EdcaParameterSet information element
168 */
169 uint8_t GetBeAifsn() const;
170 /**
171 * Return the AC_BE CWmin field in the EdcaParameterSet information element.
172 *
173 * \return the AC_BE CWmin field in the EdcaParameterSet information element
174 */
175 uint32_t GetBeCWmin() const;
176 /**
177 * Return the AC_BE CWmax field in the EdcaParameterSet information element.
178 *
179 * \return the AC_BE CWmax field in the EdcaParameterSet information element
180 */
181 uint32_t GetBeCWmax() const;
182 /**
183 * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
184 *
185 * \return the AC_BE TXOP Limit field in the EdcaParameterSet information element
186 */
187 uint16_t GetBeTxopLimit() const;
188 /**
189 * Return the AC_BK AIFSN field in the EdcaParameterSet information element.
190 *
191 * \return the AC_BK AIFSN field in the EdcaParameterSet information element
192 */
193 uint8_t GetBkAifsn() const;
194 /**
195 * Return the AC_BK CWmin field in the EdcaParameterSet information element.
196 *
197 * \return the AC_BK CWmin field in the EdcaParameterSet information element
198 */
199 uint32_t GetBkCWmin() const;
200 /**
201 * Return the AC_BK CWmax field in the EdcaParameterSet information element.
202 *
203 * \return the AC_BK CWmax field in the EdcaParameterSet information element
204 */
205 uint32_t GetBkCWmax() const;
206 /**
207 * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
208 *
209 * \return the AC_BK TXOP Limit field in the EdcaParameterSet information element
210 */
211 uint16_t GetBkTxopLimit() const;
212 /**
213 * Return the AC_VI AIFSN field in the EdcaParameterSet information element.
214 *
215 * \return the AC_VI AIFSN field in the EdcaParameterSet information element
216 */
217 uint8_t GetViAifsn() const;
218 /**
219 * Return the AC_VI CWmin field in the EdcaParameterSet information element.
220 *
221 * \return the AC_VI CWmin field in the EdcaParameterSet information element
222 */
223 uint32_t GetViCWmin() const;
224 /**
225 * Return the AC_VI CWmax field in the EdcaParameterSet information element.
226 *
227 * \return the AC_VI CWmax field in the EdcaParameterSet information element
228 */
229 uint32_t GetViCWmax() const;
230 /**
231 * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
232 *
233 * \return the AC_VI TXOP Limit field in the EdcaParameterSet information element
234 */
235 uint16_t GetViTxopLimit() const;
236 /**
237 * Return the AC_VO AIFSN field in the EdcaParameterSet information element.
238 *
239 * \return the AC_VO AIFSN field in the EdcaParameterSet information element
240 */
241 uint8_t GetVoAifsn() const;
242 /**
243 * Return the AC_VO CWmin field in the EdcaParameterSet information element.
244 *
245 * \return the AC_VO CWmin field in the EdcaParameterSet information element
246 */
247 uint32_t GetVoCWmin() const;
248 /**
249 * Return the AC_VO CWmax field in the EdcaParameterSet information element.
250 *
251 * \return the AC_VO CWmax field in the EdcaParameterSet information element
252 */
253 uint32_t GetVoCWmax() const;
254 /**
255 * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
256 *
257 * \return the AC_VO TXOP Limit field in the EdcaParameterSet information element
258 */
259 uint16_t GetVoTxopLimit() const;
260
261 private:
262 uint16_t GetInformationFieldSize() const override;
263 void SerializeInformationField(Buffer::Iterator start) const override;
264 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
265
266 uint8_t m_qosInfo; ///< QOS info
267 uint8_t m_reserved; ///< reserved
268 uint32_t m_acBE; ///< AC_BE
269 uint32_t m_acBK; ///< AC_BK
270 uint32_t m_acVI; ///< AC_VI
271 uint32_t m_acVO; ///< AC_VO
272};
273
274} // namespace ns3
275
276#endif /* EDCA_PARAMETER_SET_H */
iterator in a Buffer instance
Definition buffer.h:89
The EDCA Parameter Set.
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.
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.