author | Ghada Badawy <gbadawy@gmail.com> |
Wed, 28 Jan 2015 10:11:32 -0800 | |
changeset 11174 | 780a43e4980c |
parent 10483 | e3a02ed14587 |
child 11450 | 9f4ae69f12b7 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Mileti? <rivanvx@gmail.com>
parents:
7141
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
5948 | 2 |
/* |
3 |
* Copyright (c) 2009 MIRKO BANCHI |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
5948 | 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: Mirko Banchi <mk.banchi@gmail.com> |
|
19 |
*/ |
|
20 |
#ifndef CTRL_HEADERS_H |
|
21 |
#define CTRL_HEADERS_H |
|
22 |
||
23 |
#include "ns3/header.h" |
|
24 |
||
25 |
namespace ns3 { |
|
26 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
27 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
28 |
* Enumeration for different block ACK policies. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
29 |
*/ |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
30 |
enum BlockAckType |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
31 |
{ |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
32 |
BASIC_BLOCK_ACK, |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
33 |
COMPRESSED_BLOCK_ACK, |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
34 |
MULTI_TID_BLOCK_ACK |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
35 |
}; |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
36 |
|
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
37 |
/** |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
38 |
* \ingroup wifi |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
39 |
* \brief Headers for Block ack request. |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
40 |
* |
5948 | 41 |
* 802.11n standard includes three types of block ack: |
42 |
* - Basic block ack (unique type in 802.11e) |
|
43 |
* - Compressed block ack |
|
44 |
* - Multi-TID block ack |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
45 |
* For now only basic block ack and compressed block ack |
5948 | 46 |
* are supported. |
47 |
* Basic block ack is also default variant. |
|
48 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
49 |
class CtrlBAckRequestHeader : public Header |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
50 |
{ |
5948 | 51 |
public: |
52 |
CtrlBAckRequestHeader (); |
|
53 |
~CtrlBAckRequestHeader (); |
|
54 |
static TypeId GetTypeId (void); |
|
55 |
virtual TypeId GetInstanceTypeId (void) const; |
|
56 |
virtual void Print (std::ostream &os) const; |
|
57 |
virtual uint32_t GetSerializedSize (void) const; |
|
58 |
virtual void Serialize (Buffer::Iterator start) const; |
|
59 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
|
60 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
61 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
62 |
* Enable or disable HT immediate ACK. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
63 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
64 |
* \param immediateAck enable or disable HT immediate ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
65 |
*/ |
5948 | 66 |
void SetHtImmediateAck (bool immediateAck); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
67 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
68 |
* Set the block ACK type. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
69 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
70 |
* \param type |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
71 |
*/ |
5948 | 72 |
void SetType (enum BlockAckType type); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
73 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
74 |
* Set Traffic ID (TID). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
75 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
76 |
* \param tid |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
77 |
*/ |
5948 | 78 |
void SetTidInfo (uint8_t tid); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
79 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
80 |
* Set the starting sequence number from the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
81 |
* raw sequence control field. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
82 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
83 |
* \param seq the raw sequence control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
84 |
*/ |
5948 | 85 |
void SetStartingSequence (uint16_t seq); |
86 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
87 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
88 |
* Check if the current ACK policy is immediate. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
89 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
90 |
* \return true if the current ACK policy is immediate, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
91 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
92 |
*/ |
5948 | 93 |
bool MustSendHtImmediateAck (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
94 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
95 |
* Return the Traffic ID (TID). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
96 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
97 |
* \return TID |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
98 |
*/ |
5948 | 99 |
uint8_t GetTidInfo (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
100 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
101 |
* Return the starting sequence number. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
102 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
103 |
* \return the starting sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
104 |
*/ |
5948 | 105 |
uint16_t GetStartingSequence (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
106 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
107 |
* Check if the current ACK policy is basic |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
108 |
* (i.e. not multiple TID and not compressed ACK). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
109 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
110 |
* \return true if the current ACK policy is basic, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
111 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
112 |
*/ |
5948 | 113 |
bool IsBasic (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
114 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
115 |
* Check if the current ACK policy is compressed ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
116 |
* and not multiple TID. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
117 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
118 |
* \return true if the current ACK policy is compressed ACK, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
119 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
120 |
*/ |
5948 | 121 |
bool IsCompressed (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
122 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
123 |
* Check if the current ACK policy has multiple TID. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
124 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
125 |
* \return true if the current ACK policy has multiple TID, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
126 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
127 |
*/ |
5948 | 128 |
bool IsMultiTid (void) const; |
129 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
130 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
131 |
* Return the starting sequence control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
132 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
133 |
* \return the starting sequence control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
134 |
*/ |
5948 | 135 |
uint16_t GetStartingSequenceControl (void) const; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
136 |
|
5948 | 137 |
private: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
138 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
139 |
* Set the starting sequence control with the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
140 |
* sequence control value |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
141 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
142 |
* \param seqControl |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
143 |
*/ |
5948 | 144 |
void SetStartingSequenceControl (uint16_t seqControl); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
145 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
146 |
* Return the Block ACK control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
147 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
148 |
* \return the Block ACK control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
149 |
*/ |
5948 | 150 |
uint16_t GetBarControl (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
151 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
152 |
* Set the Block ACK control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
153 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
154 |
* \param bar |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
155 |
*/ |
5948 | 156 |
void SetBarControl (uint16_t bar); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
157 |
|
5948 | 158 |
/** |
159 |
* The lsb bit of the BAR control field is used only for the |
|
160 |
* HT (High Throughput) delayed block ack configuration. |
|
161 |
* For now only non HT immediate block ack is implemented so this field |
|
162 |
* is here only for a future implementation of HT delayed variant. |
|
163 |
*/ |
|
164 |
bool m_barAckPolicy; |
|
165 |
bool m_multiTid; |
|
166 |
bool m_compressed; |
|
167 |
uint16_t m_tidInfo; |
|
168 |
uint16_t m_startingSeq; |
|
169 |
}; |
|
170 |
||
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
171 |
/** |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
172 |
* \ingroup wifi |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
173 |
* \brief Headers for Block ack response. |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
174 |
* |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
175 |
* 802.11n standard includes three types of block ack: |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
176 |
* - Basic block ack (unique type in 802.11e) |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
177 |
* - Compressed block ack |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
178 |
* - Multi-TID block ack |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
179 |
* For now only basic block ack and compressed block ack |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
180 |
* are supported. |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
181 |
* Basic block ack is also default variant. |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
182 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
183 |
class CtrlBAckResponseHeader : public Header |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
184 |
{ |
5948 | 185 |
public: |
186 |
CtrlBAckResponseHeader (); |
|
187 |
~CtrlBAckResponseHeader (); |
|
188 |
static TypeId GetTypeId (void); |
|
189 |
virtual TypeId GetInstanceTypeId (void) const; |
|
190 |
virtual void Print (std::ostream &os) const; |
|
191 |
virtual uint32_t GetSerializedSize (void) const; |
|
192 |
virtual void Serialize (Buffer::Iterator start) const; |
|
193 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
|
194 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
195 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
196 |
* Enable or disable HT immediate ACK. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
197 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
198 |
* \param immediateAck enable or disable HT immediate ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
199 |
*/ |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
200 |
void SetHtImmediateAck (bool immediateAck); |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
201 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
202 |
* Set the block ACK type. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
203 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
204 |
* \param type |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
205 |
*/ |
5948 | 206 |
void SetType (enum BlockAckType type); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
207 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
208 |
* Set Traffic ID (TID). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
209 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
210 |
* \param tid |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
211 |
*/ |
5948 | 212 |
void SetTidInfo (uint8_t tid); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
213 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
214 |
* Set the starting sequence number from the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
215 |
* raw sequence control field. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
216 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
217 |
* \param seq the raw sequence control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
218 |
*/ |
5948 | 219 |
void SetStartingSequence (uint16_t seq); |
220 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
221 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
222 |
* Check if the current ACK policy is immediate. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
223 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
224 |
* \return true if the current ACK policy is immediate, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
225 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
226 |
*/ |
5948 | 227 |
bool MustSendHtImmediateAck (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
228 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
229 |
* Return the Traffic ID (TID). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
230 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
231 |
* \return TID |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
232 |
*/ |
5948 | 233 |
uint8_t GetTidInfo (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
234 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
235 |
* Return the starting sequence number. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
236 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
237 |
* \return the starting sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
238 |
*/ |
5948 | 239 |
uint16_t GetStartingSequence (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
240 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
241 |
* Check if the current ACK policy is basic |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
242 |
* (i.e. not multiple TID and not compressed ACK). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
243 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
244 |
* \return true if the current ACK policy is basic, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
245 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
246 |
*/ |
5948 | 247 |
bool IsBasic (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
248 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
249 |
* Check if the current ACK policy is compressed ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
250 |
* and not multiple TID. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
251 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
252 |
* \return true if the current ACK policy is compressed ACK, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
253 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
254 |
*/ |
5948 | 255 |
bool IsCompressed (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
256 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
257 |
* Check if the current ACK policy has multiple TID. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
258 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
259 |
* \return true if the current ACK policy has multiple TID, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
260 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
261 |
*/ |
5948 | 262 |
bool IsMultiTid (void) const; |
263 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
264 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
265 |
* Set the bitmap that the packet with the given sequence |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
266 |
* number was received. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
267 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
268 |
* \param seq |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
269 |
*/ |
5948 | 270 |
void SetReceivedPacket (uint16_t seq); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
271 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
272 |
* Set the bitmap that the packet with the given sequence |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
273 |
* number and fragment number was received. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
274 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
275 |
* \param seq |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
276 |
* \param frag |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
277 |
*/ |
5948 | 278 |
void SetReceivedFragment (uint16_t seq, uint8_t frag); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
279 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
280 |
* Check if the packet with the given sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
281 |
* was ACKed in this Block ACK response. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
282 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
283 |
* \param seq |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
284 |
* \return true if the packet with the given sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
285 |
* was ACKed in this Block ACK response, false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
286 |
*/ |
5948 | 287 |
bool IsPacketReceived (uint16_t seq) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
288 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
289 |
* Check if the packet with the given sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
290 |
* and fragment number was ACKed in this Block ACK response. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
291 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
292 |
* \param seq |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
293 |
* \param frag |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
294 |
* \return true if the packet with the given sequence number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
295 |
* and sequence number was ACKed in this Block ACK response, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
296 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
297 |
*/ |
5948 | 298 |
bool IsFragmentReceived (uint16_t seq, uint8_t frag) const; |
299 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
300 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
301 |
* Return the starting sequence control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
302 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
303 |
* \return the starting sequence control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
304 |
*/ |
5948 | 305 |
uint16_t GetStartingSequenceControl (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
306 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
307 |
* Set the starting sequence control with the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
308 |
* sequence control value |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
309 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
310 |
* \param seqControl |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
311 |
*/ |
5948 | 312 |
void SetStartingSequenceControl (uint16_t seqControl); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
313 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
314 |
* Return the bitmap from the block ACK response header. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
315 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
316 |
* \return the bitmap from the block ACK response header |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
317 |
*/ |
6588
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
318 |
const uint16_t* GetBitmap (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
319 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
320 |
* Return the compressed bitmap from the block ACK response header. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
321 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
322 |
* \return the compressed bitmap from the block ACK response header |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
323 |
*/ |
6588
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
324 |
uint64_t GetCompressedBitmap (void) const; |
6589
385ef147f7b6
Add ResetBitmap method to block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6588
diff
changeset
|
325 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
326 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
327 |
* Reset the bitmap to 0. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
328 |
*/ |
6589
385ef147f7b6
Add ResetBitmap method to block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6588
diff
changeset
|
329 |
void ResetBitmap (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
330 |
|
5948 | 331 |
private: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
332 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
333 |
* Return the block ACK control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
334 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
335 |
* \return the block ACK control |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
336 |
*/ |
5948 | 337 |
uint16_t GetBaControl (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
338 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
339 |
* Set the block ACK control. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
340 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
341 |
* \param bar |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
342 |
*/ |
5948 | 343 |
void SetBaControl (uint16_t bar); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
344 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
345 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
346 |
* Serialize bitmap to the given buffer. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
347 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
348 |
* \param start |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
349 |
* \return Buffer::Iterator to the next available buffer |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
350 |
*/ |
5948 | 351 |
Buffer::Iterator SerializeBitmap (Buffer::Iterator start) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
352 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
353 |
* Deserialize bitmap from the given buffer. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
354 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
355 |
* \param start |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
356 |
* \return Buffer::Iterator to the next available buffer |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7386
diff
changeset
|
357 |
*/ |
5948 | 358 |
Buffer::Iterator DeserializeBitmap (Buffer::Iterator start); |
359 |
||
360 |
/** |
|
361 |
* This function is used to correctly index in both bitmap |
|
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5948
diff
changeset
|
362 |
* and compressed bitmap, one bit or one block of 16 bits respectively. |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
363 |
* |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
364 |
* for more details see 7.2.1.8 in IEEE 802.11n/D4.00 |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
365 |
* |
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
366 |
* \param seq the sequence number |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
367 |
* |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
368 |
* \return If we are using basic block ack, return value represents index of |
5948 | 369 |
* block of 16 bits for packet having sequence number equals to <i>seq</i>. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
370 |
* If we are using compressed block ack, return value represents bit |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
371 |
* to set to 1 in the compressed bitmap to indicate that packet having |
5948 | 372 |
* sequence number equals to <i>seq</i> was correctly received. |
373 |
*/ |
|
374 |
uint8_t IndexInBitmap (uint16_t seq) const; |
|
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
375 |
|
6588
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
376 |
/** |
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
377 |
* Checks if sequence number <i>seq</i> can be acknowledged in the bitmap. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
378 |
* |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
379 |
* \param seq the sequence number |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
380 |
* |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
381 |
* \return |
6588
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
382 |
*/ |
a83484625502
Improve block ack response header
Mirko Banchi <mk.banchi@gmail.com>
parents:
6273
diff
changeset
|
383 |
bool IsInBitmap (uint16_t seq) const; |
5948 | 384 |
|
385 |
/** |
|
386 |
* The lsb bit of the BA control field is used only for the |
|
387 |
* HT (High Throughput) delayed block ack configuration. |
|
388 |
* For now only non HT immediate block ack is implemented so this field |
|
389 |
* is here only for a future implementation of HT delayed variant. |
|
390 |
*/ |
|
391 |
bool m_baAckPolicy; |
|
392 |
bool m_multiTid; |
|
393 |
bool m_compressed; |
|
394 |
uint16_t m_tidInfo; |
|
395 |
uint16_t m_startingSeq; |
|
396 |
||
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
397 |
union |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
398 |
{ |
5948 | 399 |
uint16_t m_bitmap[64]; |
400 |
uint64_t m_compressedBitmap; |
|
401 |
} bitmap; |
|
402 |
}; |
|
403 |
||
7386
2310ed220a61
standardize ns-3 namespace declaration format
Vedran Mileti? <rivanvx@gmail.com>
parents:
7385
diff
changeset
|
404 |
} // namespace ns3 |
5948 | 405 |
|
406 |
#endif /* CTRL_HEADERS_H */ |