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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18 */
19
20#ifndef EDCA_PARAMETER_SET_H
21#define EDCA_PARAMETER_SET_H
22
24
25namespace ns3
26{
27
28/**
29 * \brief The EDCA Parameter Set
30 * \ingroup wifi
31 *
32 * This class knows how to serialise and deserialise the EDCA Parameter Set.
33 */
35{
36 public:
38
39 // Implementations of pure virtual methods of WifiInformationElement
40 WifiInformationElementId ElementId() const override;
41
42 /**
43 * Set the QoS Info field in the EdcaParameterSet information element.
44 *
45 * \param qosInfo the QoS Info field in the EdcaParameterSet information element
46 */
47 void SetQosInfo(uint8_t qosInfo);
48 /**
49 * Set the AC_BE AIFSN field in the EdcaParameterSet information element.
50 *
51 * \param aifsn the AC_BE AIFSN field in the EdcaParameterSet information element
52 */
53 void SetBeAifsn(uint8_t aifsn);
54 /**
55 * Set the AC_BE ACI field in the EdcaParameterSet information element.
56 *
57 * \param aci the AC_BE ACI field in the EdcaParameterSet information element
58 */
59 void SetBeAci(uint8_t aci);
60 /**
61 * Set the AC_BE CWmin field in the EdcaParameterSet information element.
62 *
63 * \param cwMin the AC_BE CWmin field in the EdcaParameterSet information element
64 */
65 void SetBeCWmin(uint32_t cwMin);
66 /**
67 * Set the AC_BE CWmax field in the EdcaParameterSet information element.
68 *
69 * \param cwMax the AC_BE CWmax field in the EdcaParameterSet information element
70 */
71 void SetBeCWmax(uint32_t cwMax);
72 /**
73 * Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
74 *
75 * \param txop the AC_BE TXOP Limit field in the EdcaParameterSet information element
76 */
77 void SetBeTxopLimit(uint16_t txop);
78 /**
79 * Set the AC_BK AIFSN field in the EdcaParameterSet information element.
80 *
81 * \param aifsn the AC_BB AIFSN field in the EdcaParameterSet information element
82 */
83 void SetBkAifsn(uint8_t aifsn);
84 /**
85 * Set the AC_BK ACI field in the EdcaParameterSet information element.
86 *
87 * \param aci the AC_BK ACI field in the EdcaParameterSet information element
88 */
89 void SetBkAci(uint8_t aci);
90 /**
91 * Set the AC_BK CWmin field in the EdcaParameterSet information element.
92 *
93 * \param cwMin the AC_BK CWmin field in the EdcaParameterSet information element
94 */
95 void SetBkCWmin(uint32_t cwMin);
96 /**
97 * Set the AC_BK CWmax field in the EdcaParameterSet information element.
98 *
99 * \param cwMax the AC_BK CWmax field in the EdcaParameterSet information element
100 */
101 void SetBkCWmax(uint32_t cwMax);
102 /**
103 * Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
104 *
105 * \param txop the AC_BK TXOP Limit field in the EdcaParameterSet information element
106 */
107 void SetBkTxopLimit(uint16_t txop);
108 /**
109 * Set the AC_VI AIFSN field in the EdcaParameterSet information element.
110 *
111 * \param aifsn the AC_VI AIFSN field in the EdcaParameterSet information element
112 */
113 void SetViAifsn(uint8_t aifsn);
114 /**
115 * Set the AC_VI ACI field in the EdcaParameterSet information element.
116 *
117 * \param aci the AC_VI ACI field in the EdcaParameterSet information element
118 */
119 void SetViAci(uint8_t aci);
120 /**
121 * Set the AC_VI CWmin field in the EdcaParameterSet information element.
122 *
123 * \param cwMin the AC_VI CWmin field in the EdcaParameterSet information element
124 */
125 void SetViCWmin(uint32_t cwMin);
126 /**
127 * Set the AC_VI CWmax field in the EdcaParameterSet information element.
128 *
129 * \param cwMax the AC_VI CWmax field in the EdcaParameterSet information element
130 */
131 void SetViCWmax(uint32_t cwMax);
132 /**
133 * Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
134 *
135 * \param txop the AC_VI TXOP Limit field in the EdcaParameterSet information element
136 */
137 void SetViTxopLimit(uint16_t txop);
138 /**
139 * Set the AC_VO AIFSN field in the EdcaParameterSet information element.
140 *
141 * \param aifsn the AC_VO AIFSN field in the EdcaParameterSet information element
142 */
143 void SetVoAifsn(uint8_t aifsn);
144 /**
145 * Set the AC_VO ACI field in the EdcaParameterSet information element.
146 *
147 * \param aci the AC_VO ACI field in the EdcaParameterSet information element
148 */
149 void SetVoAci(uint8_t aci);
150 /**
151 * Set the AC_VO CWmin field in the EdcaParameterSet information element.
152 *
153 * \param cwMin the AC_VO CWmin field in the EdcaParameterSet information element
154 */
155 void SetVoCWmin(uint32_t cwMin);
156 /**
157 * Set the AC_VO CWmax field in the EdcaParameterSet information element.
158 *
159 * \param cwMax the AC_VO CWmax field in the EdcaParameterSet information element
160 */
161 void SetVoCWmax(uint32_t cwMax);
162 /**
163 * Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
164 *
165 * \param txop the AC_VO TXOP Limit field in the EdcaParameterSet information element
166 */
167 void SetVoTxopLimit(uint16_t txop);
168
169 /**
170 * Return the QoS Info field in the EdcaParameterSet information element.
171 *
172 * \return the QoS Info field in the EdcaParameterSet information element
173 */
174 uint8_t GetQosInfo() const;
175 /**
176 * Return the AC_BE AIFSN field in the EdcaParameterSet information element.
177 *
178 * \return the AC_BE AIFSN field in the EdcaParameterSet information element
179 */
180 uint8_t GetBeAifsn() const;
181 /**
182 * Return the AC_BE CWmin field in the EdcaParameterSet information element.
183 *
184 * \return the AC_BE CWmin field in the EdcaParameterSet information element
185 */
186 uint32_t GetBeCWmin() const;
187 /**
188 * Return the AC_BE CWmax field in the EdcaParameterSet information element.
189 *
190 * \return the AC_BE CWmax field in the EdcaParameterSet information element
191 */
192 uint32_t GetBeCWmax() const;
193 /**
194 * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
195 *
196 * \return the AC_BE TXOP Limit field in the EdcaParameterSet information element
197 */
198 uint16_t GetBeTxopLimit() const;
199 /**
200 * Return the AC_BK AIFSN field in the EdcaParameterSet information element.
201 *
202 * \return the AC_BK AIFSN field in the EdcaParameterSet information element
203 */
204 uint8_t GetBkAifsn() const;
205 /**
206 * Return the AC_BK CWmin field in the EdcaParameterSet information element.
207 *
208 * \return the AC_BK CWmin field in the EdcaParameterSet information element
209 */
210 uint32_t GetBkCWmin() const;
211 /**
212 * Return the AC_BK CWmax field in the EdcaParameterSet information element.
213 *
214 * \return the AC_BK CWmax field in the EdcaParameterSet information element
215 */
216 uint32_t GetBkCWmax() const;
217 /**
218 * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
219 *
220 * \return the AC_BK TXOP Limit field in the EdcaParameterSet information element
221 */
222 uint16_t GetBkTxopLimit() const;
223 /**
224 * Return the AC_VI AIFSN field in the EdcaParameterSet information element.
225 *
226 * \return the AC_VI AIFSN field in the EdcaParameterSet information element
227 */
228 uint8_t GetViAifsn() const;
229 /**
230 * Return the AC_VI CWmin field in the EdcaParameterSet information element.
231 *
232 * \return the AC_VI CWmin field in the EdcaParameterSet information element
233 */
234 uint32_t GetViCWmin() const;
235 /**
236 * Return the AC_VI CWmax field in the EdcaParameterSet information element.
237 *
238 * \return the AC_VI CWmax field in the EdcaParameterSet information element
239 */
240 uint32_t GetViCWmax() const;
241 /**
242 * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
243 *
244 * \return the AC_VI TXOP Limit field in the EdcaParameterSet information element
245 */
246 uint16_t GetViTxopLimit() const;
247 /**
248 * Return the AC_VO AIFSN field in the EdcaParameterSet information element.
249 *
250 * \return the AC_VO AIFSN field in the EdcaParameterSet information element
251 */
252 uint8_t GetVoAifsn() const;
253 /**
254 * Return the AC_VO CWmin field in the EdcaParameterSet information element.
255 *
256 * \return the AC_VO CWmin field in the EdcaParameterSet information element
257 */
258 uint32_t GetVoCWmin() const;
259 /**
260 * Return the AC_VO CWmax field in the EdcaParameterSet information element.
261 *
262 * \return the AC_VO CWmax field in the EdcaParameterSet information element
263 */
264 uint32_t GetVoCWmax() const;
265 /**
266 * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
267 *
268 * \return the AC_VO TXOP Limit field in the EdcaParameterSet information element
269 */
270 uint16_t GetVoTxopLimit() const;
271
272 private:
273 uint16_t GetInformationFieldSize() const override;
274 void SerializeInformationField(Buffer::Iterator start) const override;
275 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
276
277 uint8_t m_qosInfo; ///< QOS info
278 uint8_t m_reserved; ///< reserved
279 uint32_t m_acBE; ///< AC_BE
280 uint32_t m_acBK; ///< AC_BK
281 uint32_t m_acVI; ///< AC_VI
282 uint32_t m_acVO; ///< AC_VO
283};
284
285} // namespace ns3
286
287#endif /* EDCA_PARAMETER_SET_H */
iterator in a Buffer instance
Definition: buffer.h:100
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.
uint8_t m_reserved
reserved
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 m_qosInfo
QOS info.
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.