A Discrete-Event Network Simulator
API
edca-parameter-set.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 Sébastien Deronne
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #ifndef EDCA_PARAMETER_SET_H
22 #define EDCA_PARAMETER_SET_H
23 
24 #include <stdint.h>
25 #include <ostream>
26 #include "ns3/buffer.h"
27 #include "ns3/wifi-information-element.h"
28 
29 namespace ns3 {
30 
38 {
39 public:
41  void SetQosSupported (uint8_t qosSupported);
42 
48  void SetQosInfo (uint8_t qosInfo);
54  void SetBeAifsn (uint8_t aifsn);
60  void SetBeAcm (uint8_t acm);
66  void SetBeAci (uint8_t aci);
72  void SetBeCWmin (uint8_t cwMin);
78  void SetBeCWmax (uint8_t cwMax);
84  void SetBeTXOPLimit (uint16_t txop);
90  void SetBkAifsn (uint8_t aifsn);
96  void SetBkAcm (uint8_t acm);
102  void SetBkAci (uint8_t aci);
108  void SetBkCWmin (uint8_t cwMin);
114  void SetBkCWmax (uint8_t cwMax);
120  void SetBkTXOPLimit (uint16_t txop);
126  void SetViAifsn (uint8_t aifsn);
132  void SetViAcm (uint8_t acm);
138  void SetViAci (uint8_t aci);
144  void SetViCWmin (uint8_t cwMin);
150  void SetViCWmax (uint8_t cwMax);
156  void SetViTXOPLimit (uint16_t txop);
162  void SetVoAifsn (uint8_t aifsn);
168  void SetVoAcm (uint8_t acm);
174  void SetVoAci (uint8_t aci);
180  void SetVoCWmin (uint8_t cwMin);
186  void SetVoCWmax (uint8_t cwMax);
192  void SetVoTXOPLimit (uint16_t txop);
193 
194  /*
195  * Return the QoS Info field in the EdcaParameterSet information element.
196  *
197  * \return the QoS Info field in the EdcaParameterSet information element
198  */
199  uint8_t GetQosInfo (void) const;
200  /*
201  * Return the AC_BE AIFSN field in the EdcaParameterSet information element.
202  *
203  * \return the AC_BE AIFSN field in the EdcaParameterSet information element
204  */
205  uint8_t GetBeAifsn (void) const;
206  /*
207  * Return the AC_BE ACM field in the EdcaParameterSet information element.
208  *
209  * \return the AC_BE ACM field in the EdcaParameterSet information element
210  */
211  uint8_t GetBeAcm (void) const;
212  /*
213  * Return the AC_BE ACI field in the EdcaParameterSet information element.
214  *
215  * \return the AC_BE ACI field in the EdcaParameterSet information element
216  */
217  uint8_t GetBeAci (void) const;
218  /*
219  * Return the AC_BE CWmin field in the EdcaParameterSet information element.
220  *
221  * \return the AC_BE CWmin field in the EdcaParameterSet information element
222  */
223  uint8_t GetBeCWmin (void) const;
224  /*
225  * Return the AC_BE CWmax field in the EdcaParameterSet information element.
226  *
227  * \return the AC_BE CWmax field in the EdcaParameterSet information element
228  */
229  uint8_t GetBeCWmax (void) const;
230  /*
231  * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
232  *
233  * \return the AC_BE TXOP Limit field in the EdcaParameterSet information element
234  */
235  uint16_t GetBeTXOPLimit (void) const;
236  /*
237  * Return the AC_BK AIFSN field in the EdcaParameterSet information element.
238  *
239  * \return the AC_BK AIFSN field in the EdcaParameterSet information element
240  */
241  uint8_t GetBkAifsn (void) const;
242  /*
243  * Return the AC_BK ACM field in the EdcaParameterSet information element.
244  *
245  * \return the AC_BK ACM field in the EdcaParameterSet information element
246  */
247  uint8_t GetBkAcm (void) const;
248  /*
249  * Return the AC_BK ACI field in the EdcaParameterSet information element.
250  *
251  * \return the AC_BK ACI field in the EdcaParameterSet information element
252  */
253  uint8_t GetBkAci (void) const;
254  /*
255  * Return the AC_BK CWmin field in the EdcaParameterSet information element.
256  *
257  * \return the AC_BK CWmin field in the EdcaParameterSet information element
258  */
259  uint8_t GetBkCWmin (void) const;
260  /*
261  * Return the AC_BK CWmax field in the EdcaParameterSet information element.
262  *
263  * \return the AC_BK CWmax field in the EdcaParameterSet information element
264  */
265  uint8_t GetBkCWmax (void) const;
266  /*
267  * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
268  *
269  * \return the AC_BK TXOP Limit field in the EdcaParameterSet information element
270  */
271  uint16_t GetBkTXOPLimit (void) const;
272  /*
273  * Return the AC_VI AIFSN field in the EdcaParameterSet information element.
274  *
275  * \return the AC_VI AIFSN field in the EdcaParameterSet information element
276  */
277  uint8_t GetViAifsn (void) const;
278  /*
279  * Return the AC_VI ACM field in the EdcaParameterSet information element.
280  *
281  * \return the AC_VI ACM field in the EdcaParameterSet information element
282  */
283  uint8_t GetViAcm (void) const;
284  /*
285  * Return the AC_VI ACI field in the EdcaParameterSet information element.
286  *
287  * \return the AC_VI ACI field in the EdcaParameterSet information element
288  */
289  uint8_t GetViAci (void) const;
290  /*
291  * Return the AC_VI CWmin field in the EdcaParameterSet information element.
292  *
293  * \return the AC_VI CWmin field in the EdcaParameterSet information element
294  */
295  uint8_t GetViCWmin (void) const;
296  /*
297  * Return the AC_VI CWmax field in the EdcaParameterSet information element.
298  *
299  * \return the AC_VI CWmax field in the EdcaParameterSet information element
300  */
301  uint8_t GetViCWmax (void) const;
302  /*
303  * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
304  *
305  * \return the AC_VI TXOP Limit field in the EdcaParameterSet information element
306  */
307  uint16_t GetViTXOPLimit (void) const;
308  /*
309  * Return the AC_VO AIFSN field in the EdcaParameterSet information element.
310  *
311  * \return the AC_VO AIFSN field in the EdcaParameterSet information element
312  */
313  uint8_t GetVoAifsn (void) const;
314  /*
315  * Return the AC_VO ACM field in the EdcaParameterSet information element.
316  *
317  * \return the AC_VO ACM field in the EdcaParameterSet information element
318  */
319  uint8_t GetVoAcm (void) const;
320  /*
321  * Return the AC_VO ACI field in the EdcaParameterSet information element.
322  *
323  * \return the AC_VO ACI field in the EdcaParameterSet information element
324  */
325  uint8_t GetVoAci (void) const;
326  /*
327  * Return the AC_VO CWmin field in the EdcaParameterSet information element.
328  *
329  * \return the AC_VO CWmin field in the EdcaParameterSet information element
330  */
331  uint8_t GetVoCWmin (void) const;
332  /*
333  * Return the AC_VO CWmax field in the EdcaParameterSet information element.
334  *
335  * \return the AC_VO CWmax field in the EdcaParameterSet information element
336  */
337  uint8_t GetVoCWmax (void) const;
338  /*
339  * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
340  *
341  * \return the AC_VO TXOP Limit field in the EdcaParameterSet information element
342  */
343  uint16_t GetVoTXOPLimit (void) const;
344 
346  uint8_t GetInformationFieldSize () const;
348  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
349 
366  uint16_t GetSerializedSize () const;
367 
368 private:
369  uint8_t m_qosInfo;
370  uint8_t m_reserved;
371  uint32_t m_acBE;
372  uint32_t m_acBK;
373  uint32_t m_acVI;
374  uint32_t m_acVO;
375 
376  //This is used to decide whether this element should be added to the frame or not
378 };
379 
380 std::ostream &operator << (std::ostream &os, const EdcaParameterSet &edcaParameterSet);
381 std::istream &operator >> (std::istream &is, EdcaParameterSet &edcaParameterSet);
382 
384 
385 } //namespace ns3
386 
387 #endif /* EDCA_PARAMETER_SET_H */
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Definition: angles.cc:48
void SetViAcm(uint8_t acm)
Set the AC_VI ACM field in the EdcaParameterSet information element.
void SetQosSupported(uint8_t qosSupported)
uint8_t GetVoAcm(void) const
void SetBkCWmin(uint8_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
void SetBeAcm(uint8_t acm)
Set the AC_BE ACM field in the EdcaParameterSet information element.
WifiInformationElementId ElementId() const
Own unique Element ID.
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
def start()
Definition: core.py:1482
uint8_t GetViCWmax(void) const
uint8_t GetVoAifsn(void) const
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
void SetVoTXOPLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
uint8_t GetBeAci(void) const
uint8_t GetVoCWmin(void) const
uint8_t GetBkAci(void) const
iterator in a Buffer instance
Definition: buffer.h:98
uint16_t GetBeTXOPLimit(void) const
uint8_t GetViCWmin(void) const
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
void SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetBeTXOPLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
uint16_t GetBkTXOPLimit(void) const
uint8_t GetBeCWmin(void) const
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint16_t GetVoTXOPLimit(void) const
void SetBeCWmax(uint8_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
void SetBeCWmin(uint8_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
uint8_t GetVoCWmax(void) const
void SetViCWmin(uint8_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint8_t GetBkAcm(void) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a QoS STA...
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t GetBeCWmax(void) const
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
uint8_t GetBkCWmax(void) const
uint8_t GetBeAcm(void) const
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
uint8_t GetBkCWmin(void) const
uint8_t GetQosInfo(void) const
uint16_t GetViTXOPLimit(void) const
uint8_t GetViAifsn(void) const
void SetBkTXOPLimit(uint16_t txop)
Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
void SetVoAcm(uint8_t acm)
Set the AC_VO ACM field in the EdcaParameterSet information element.
void SetViTXOPLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
uint8_t GetViAci(void) const
void SetVoCWmin(uint8_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
uint8_t GetBeAifsn(void) const
uint8_t GetBkAifsn(void) const
uint8_t GetViAcm(void) const
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
void SetVoCWmax(uint8_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet information element.
uint8_t GetVoAci(void) const
void SetBkCWmax(uint8_t cwMax)
Set 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.
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type.
void SetViCWmax(uint8_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
void SetBkAcm(uint8_t acm)
Set the AC_BK ACM field in the EdcaParameterSet information element.