author | Tom Henderson <tomh@tomh.org> |
Thu, 20 Nov 2014 09:39:23 -0800 | |
changeset 11066 | d78d77e4b920 |
parent 11064 | a0562c615abc |
child 11085 | 6e4d08656d7c |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7227
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
1912
028e1945d5b2
fix copyright statement
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1911
diff
changeset
|
3 |
* Copyright (c) 2005,2006,2007 INRIA |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
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:
6852
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
*/ |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
21 |
#include <iostream> |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
22 |
#include "wifi-remote-station-manager.h" |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
23 |
#include "ns3/simulator.h" |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
24 |
#include "ns3/assert.h" |
1980
3fa3bac40b5b
add asserts and some debug log
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1975
diff
changeset
|
25 |
#include "ns3/log.h" |
3041
a624276a897b
mtag -> tag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3040
diff
changeset
|
26 |
#include "ns3/tag.h" |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
27 |
#include "ns3/boolean.h" |
6065 | 28 |
#include "ns3/double.h" |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
29 |
#include "ns3/uinteger.h" |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
30 |
#include "ns3/wifi-phy.h" |
11059
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
31 |
#include "ns3/wifi-mac.h" |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
32 |
#include "ns3/trace-source-accessor.h" |
6065 | 33 |
#include "wifi-mac-header.h" |
6473 | 34 |
#include "wifi-mac-trailer.h" |
1980
3fa3bac40b5b
add asserts and some debug log
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1975
diff
changeset
|
35 |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
36 |
/*************************************************************** |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
37 |
* Packet Mode Tagger |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
38 |
***************************************************************/ |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
39 |
|
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
40 |
namespace ns3 { |
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
41 |
|
10968
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
42 |
NS_LOG_COMPONENT_DEFINE ("WifiRemoteStationManager"); |
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
43 |
|
10139 | 44 |
class HighLatencyDataTxVectorTag : public Tag |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
45 |
{ |
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
46 |
public: |
10139 | 47 |
HighLatencyDataTxVectorTag (); |
48 |
HighLatencyDataTxVectorTag (WifiTxVector dataTxVector); |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
49 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
50 |
* \returns the transmission mode to use to send this packet |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
51 |
*/ |
10139 | 52 |
WifiTxVector GetDataTxVector (void) const; |
53 |
||
54 |
static TypeId GetTypeId (void); |
|
55 |
virtual TypeId GetInstanceTypeId (void) const; |
|
56 |
virtual uint32_t GetSerializedSize (void) const; |
|
57 |
virtual void Serialize (TagBuffer i) const; |
|
58 |
virtual void Deserialize (TagBuffer i); |
|
59 |
virtual void Print (std::ostream &os) const; |
|
60 |
private: |
|
61 |
WifiTxVector m_dataTxVector; |
|
62 |
}; |
|
63 |
||
64 |
HighLatencyDataTxVectorTag::HighLatencyDataTxVectorTag () |
|
65 |
{ |
|
66 |
} |
|
67 |
HighLatencyDataTxVectorTag::HighLatencyDataTxVectorTag ( WifiTxVector dataTxVector) |
|
68 |
: m_dataTxVector (dataTxVector) |
|
69 |
{ |
|
70 |
} |
|
71 |
||
72 |
WifiTxVector |
|
73 |
HighLatencyDataTxVectorTag::GetDataTxVector (void) const |
|
74 |
{ |
|
75 |
return m_dataTxVector; |
|
76 |
} |
|
77 |
TypeId |
|
78 |
HighLatencyDataTxVectorTag::GetTypeId (void) |
|
79 |
{ |
|
80 |
static TypeId tid = TypeId ("ns3::HighLatencyDataTxVectorTag") |
|
81 |
.SetParent<Tag> () |
|
82 |
.AddConstructor<HighLatencyDataTxVectorTag> () |
|
83 |
; |
|
84 |
return tid; |
|
85 |
} |
|
86 |
TypeId |
|
87 |
HighLatencyDataTxVectorTag::GetInstanceTypeId (void) const |
|
88 |
{ |
|
89 |
return GetTypeId (); |
|
90 |
} |
|
91 |
uint32_t |
|
92 |
HighLatencyDataTxVectorTag::GetSerializedSize (void) const |
|
93 |
{ |
|
94 |
return sizeof (WifiTxVector); |
|
95 |
} |
|
96 |
void |
|
97 |
HighLatencyDataTxVectorTag::Serialize (TagBuffer i) const |
|
98 |
{ |
|
99 |
i.Write ((uint8_t *)&m_dataTxVector, sizeof (WifiTxVector)); |
|
100 |
} |
|
101 |
void |
|
102 |
HighLatencyDataTxVectorTag::Deserialize (TagBuffer i) |
|
103 |
{ |
|
104 |
i.Read ((uint8_t *)&m_dataTxVector, sizeof (WifiTxVector)); |
|
105 |
} |
|
106 |
void |
|
107 |
HighLatencyDataTxVectorTag::Print (std::ostream &os) const |
|
108 |
{ |
|
109 |
os << "Data=" << m_dataTxVector; |
|
110 |
} |
|
111 |
||
112 |
class HighLatencyRtsTxVectorTag : public Tag |
|
113 |
{ |
|
114 |
public: |
|
115 |
HighLatencyRtsTxVectorTag (); |
|
116 |
HighLatencyRtsTxVectorTag (WifiTxVector rtsTxVector); |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
117 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
118 |
* \returns the transmission mode to use to send the RTS prior to the |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
119 |
* transmission of the data packet itself. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
120 |
*/ |
10139 | 121 |
WifiTxVector GetRtsTxVector (void) const; |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
122 |
|
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
123 |
static TypeId GetTypeId (void); |
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
124 |
virtual TypeId GetInstanceTypeId (void) const; |
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
125 |
virtual uint32_t GetSerializedSize (void) const; |
3040
e11e106c7c19
Mtag -> Tag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3038
diff
changeset
|
126 |
virtual void Serialize (TagBuffer i) const; |
e11e106c7c19
Mtag -> Tag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3038
diff
changeset
|
127 |
virtual void Deserialize (TagBuffer i); |
3208
1a754d09c4ba
bug 200: Packet::PrintTags is not implemented.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3041
diff
changeset
|
128 |
virtual void Print (std::ostream &os) const; |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
129 |
private: |
10139 | 130 |
WifiTxVector m_rtsTxVector; |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
131 |
}; |
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
132 |
|
10139 | 133 |
HighLatencyRtsTxVectorTag::HighLatencyRtsTxVectorTag () |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
134 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
135 |
} |
10139 | 136 |
HighLatencyRtsTxVectorTag::HighLatencyRtsTxVectorTag ( WifiTxVector rtsTxVector) |
137 |
: m_rtsTxVector (rtsTxVector) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
138 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
139 |
} |
10139 | 140 |
|
141 |
WifiTxVector |
|
142 |
HighLatencyRtsTxVectorTag::GetRtsTxVector (void) const |
|
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
143 |
{ |
10139 | 144 |
return m_rtsTxVector; |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
145 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
146 |
TypeId |
10139 | 147 |
HighLatencyRtsTxVectorTag::GetTypeId (void) |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
148 |
{ |
10139 | 149 |
static TypeId tid = TypeId ("ns3::HighLatencyRtsTxVectorTag") |
3040
e11e106c7c19
Mtag -> Tag
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3038
diff
changeset
|
150 |
.SetParent<Tag> () |
10139 | 151 |
.AddConstructor<HighLatencyRtsTxVectorTag> () |
152 |
; |
|
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
153 |
return tid; |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
154 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
155 |
TypeId |
10139 | 156 |
HighLatencyRtsTxVectorTag::GetInstanceTypeId (void) const |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
157 |
{ |
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
158 |
return GetTypeId (); |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
159 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
160 |
uint32_t |
10139 | 161 |
HighLatencyRtsTxVectorTag::GetSerializedSize (void) const |
162 |
{ |
|
163 |
return sizeof (WifiTxVector); |
|
164 |
} |
|
165 |
void |
|
166 |
HighLatencyRtsTxVectorTag::Serialize (TagBuffer i) const |
|
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
167 |
{ |
10139 | 168 |
i.Write ((uint8_t *)&m_rtsTxVector, sizeof (WifiTxVector)); |
169 |
} |
|
170 |
void |
|
171 |
HighLatencyRtsTxVectorTag::Deserialize (TagBuffer i) |
|
172 |
{ |
|
173 |
i.Read ((uint8_t *)&m_rtsTxVector, sizeof (WifiTxVector)); |
|
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
174 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
175 |
void |
10139 | 176 |
HighLatencyRtsTxVectorTag::Print (std::ostream &os) const |
177 |
{ |
|
178 |
os << "Rts=" << m_rtsTxVector; |
|
179 |
} |
|
180 |
||
181 |
class HighLatencyCtsToSelfTxVectorTag : public Tag |
|
182 |
{ |
|
183 |
public: |
|
184 |
HighLatencyCtsToSelfTxVectorTag (); |
|
185 |
HighLatencyCtsToSelfTxVectorTag (WifiTxVector ctsToSelfTxVector); |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
186 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
187 |
* \returns the transmission mode to use for the CTS-to-self. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10410
diff
changeset
|
188 |
*/ |
10139 | 189 |
WifiTxVector GetCtsToSelfTxVector (void) const; |
190 |
||
191 |
static TypeId GetTypeId (void); |
|
192 |
virtual TypeId GetInstanceTypeId (void) const; |
|
193 |
virtual uint32_t GetSerializedSize (void) const; |
|
194 |
virtual void Serialize (TagBuffer i) const; |
|
195 |
virtual void Deserialize (TagBuffer i); |
|
196 |
virtual void Print (std::ostream &os) const; |
|
197 |
private: |
|
198 |
WifiTxVector m_ctsToSelfTxVector; |
|
199 |
}; |
|
200 |
||
201 |
HighLatencyCtsToSelfTxVectorTag::HighLatencyCtsToSelfTxVectorTag () |
|
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
202 |
{ |
10139 | 203 |
} |
204 |
HighLatencyCtsToSelfTxVectorTag::HighLatencyCtsToSelfTxVectorTag ( WifiTxVector ctsToSelfTxVector) |
|
205 |
: m_ctsToSelfTxVector (ctsToSelfTxVector) |
|
206 |
{ |
|
207 |
} |
|
208 |
||
209 |
WifiTxVector |
|
210 |
HighLatencyCtsToSelfTxVectorTag::GetCtsToSelfTxVector (void) const |
|
211 |
{ |
|
212 |
return m_ctsToSelfTxVector; |
|
213 |
} |
|
214 |
TypeId |
|
215 |
HighLatencyCtsToSelfTxVectorTag::GetTypeId (void) |
|
216 |
{ |
|
217 |
static TypeId tid = TypeId ("ns3::HighLatencyCtsToSelfTxVectorTag") |
|
218 |
.SetParent<Tag> () |
|
219 |
.AddConstructor<HighLatencyCtsToSelfTxVectorTag> () |
|
220 |
; |
|
221 |
return tid; |
|
222 |
} |
|
223 |
TypeId |
|
224 |
HighLatencyCtsToSelfTxVectorTag::GetInstanceTypeId (void) const |
|
225 |
{ |
|
226 |
return GetTypeId (); |
|
227 |
} |
|
228 |
uint32_t |
|
229 |
HighLatencyCtsToSelfTxVectorTag::GetSerializedSize (void) const |
|
230 |
{ |
|
231 |
return sizeof (WifiTxVector); |
|
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
232 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
233 |
void |
10139 | 234 |
HighLatencyCtsToSelfTxVectorTag::Serialize (TagBuffer i) const |
3038
5962e2962fa9
convert to new tag API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
235 |
{ |
10139 | 236 |
i.Write ((uint8_t *)&m_ctsToSelfTxVector, sizeof (WifiTxVector)); |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
237 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
238 |
void |
10139 | 239 |
HighLatencyCtsToSelfTxVectorTag::Deserialize (TagBuffer i) |
3208
1a754d09c4ba
bug 200: Packet::PrintTags is not implemented.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3041
diff
changeset
|
240 |
{ |
10139 | 241 |
i.Read ((uint8_t *)&m_ctsToSelfTxVector, sizeof (WifiTxVector)); |
242 |
} |
|
243 |
void |
|
244 |
HighLatencyCtsToSelfTxVectorTag::Print (std::ostream &os) const |
|
245 |
{ |
|
246 |
os << "Cts To Self=" << m_ctsToSelfTxVector; |
|
3208
1a754d09c4ba
bug 200: Packet::PrintTags is not implemented.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3041
diff
changeset
|
247 |
} |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
248 |
|
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
249 |
} // namespace ns3 |
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2027
diff
changeset
|
250 |
|
6065 | 251 |
namespace ns3 { |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
252 |
|
10652
dc18deba4502
[doxygen] Revert r10410, r10411, r10412
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10580
diff
changeset
|
253 |
NS_OBJECT_ENSURE_REGISTERED (WifiRemoteStationManager); |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
254 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
255 |
TypeId |
6065 | 256 |
WifiRemoteStationManager::GetTypeId (void) |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
257 |
{ |
6065 | 258 |
static TypeId tid = TypeId ("ns3::WifiRemoteStationManager") |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
259 |
.SetParent<Object> () |
6065 | 260 |
.AddAttribute ("IsLowLatency", "If true, we attempt to modelize a so-called low-latency device: a device" |
261 |
" where decisions about tx parameters can be made on a per-packet basis and feedback about the" |
|
262 |
" transmission of each packet is obtained before sending the next. Otherwise, we modelize a " |
|
263 |
" high-latency device, that is a device where we cannot update our decision about tx parameters" |
|
264 |
" after every packet transmission.", |
|
6241
d9a65be745f0
Bug 802 - Minstrel, Onoe and Amrr not working
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6087
diff
changeset
|
265 |
BooleanValue (true), // this value is ignored because there is no setter |
6065 | 266 |
MakeBooleanAccessor (&WifiRemoteStationManager::IsLowLatency), |
267 |
MakeBooleanChecker ()) |
|
268 |
.AddAttribute ("MaxSsrc", "The maximum number of retransmission attempts for an RTS. This value" |
|
269 |
" will not have any effect on some rate control algorithms.", |
|
270 |
UintegerValue (7), |
|
271 |
MakeUintegerAccessor (&WifiRemoteStationManager::m_maxSsrc), |
|
272 |
MakeUintegerChecker<uint32_t> ()) |
|
273 |
.AddAttribute ("MaxSlrc", "The maximum number of retransmission attempts for a DATA packet. This value" |
|
274 |
" will not have any effect on some rate control algorithms.", |
|
275 |
UintegerValue (7), |
|
276 |
MakeUintegerAccessor (&WifiRemoteStationManager::m_maxSlrc), |
|
277 |
MakeUintegerChecker<uint32_t> ()) |
|
6473 | 278 |
.AddAttribute ("RtsCtsThreshold", "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than " |
10580
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
279 |
"this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. " |
6473 | 280 |
"This value will not have any effect on some rate control algorithms.", |
281 |
UintegerValue (2346), |
|
6065 | 282 |
MakeUintegerAccessor (&WifiRemoteStationManager::m_rtsCtsThreshold), |
283 |
MakeUintegerChecker<uint32_t> ()) |
|
6473 | 284 |
.AddAttribute ("FragmentationThreshold", "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger" |
285 |
"than this value, we fragment it such that the size of the fragments are equal or smaller " |
|
10580
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
286 |
"than this value, as per IEEE Std. 802.11-2012, Section 9.5. " |
6473 | 287 |
"This value will not have any effect on some rate control algorithms.", |
288 |
UintegerValue (2346), |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
289 |
MakeUintegerAccessor (&WifiRemoteStationManager::DoSetFragmentationThreshold, |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
290 |
&WifiRemoteStationManager::DoGetFragmentationThreshold), |
6065 | 291 |
MakeUintegerChecker<uint32_t> ()) |
292 |
.AddAttribute ("NonUnicastMode", "Wifi mode used for non-unicast transmissions.", |
|
293 |
WifiModeValue (), |
|
294 |
MakeWifiModeAccessor (&WifiRemoteStationManager::m_nonUnicastMode), |
|
295 |
MakeWifiModeChecker ()) |
|
10139 | 296 |
.AddAttribute ("DefaultTxPowerLevel", "Default power level to be used for transmissions. " |
297 |
"This is the power level that is used by all those WifiManagers that do not" |
|
298 |
"implement TX power control.", |
|
299 |
UintegerValue (0), |
|
300 |
MakeUintegerAccessor (&WifiRemoteStationManager::m_defaultTxPowerLevel), |
|
301 |
MakeUintegerChecker<uint8_t> ()) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
302 |
.AddTraceSource ("MacTxRtsFailed", |
6065 | 303 |
"The transmission of a RTS by the MAC layer has failed", |
304 |
MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxRtsFailed)) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
305 |
.AddTraceSource ("MacTxDataFailed", |
6065 | 306 |
"The transmission of a data packet by the MAC layer has failed", |
307 |
MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxDataFailed)) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
308 |
.AddTraceSource ("MacTxFinalRtsFailed", |
6065 | 309 |
"The transmission of a RTS has exceeded the maximum number of attempts", |
310 |
MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalRtsFailed)) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
311 |
.AddTraceSource ("MacTxFinalDataFailed", |
6065 | 312 |
"The transmission of a data packet has exceeded the maximum number of attempts", |
313 |
MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalDataFailed)) |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
314 |
; |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
315 |
return tid; |
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
316 |
} |
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
317 |
|
6065 | 318 |
WifiRemoteStationManager::WifiRemoteStationManager () |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
319 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
320 |
} |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
321 |
|
6065 | 322 |
WifiRemoteStationManager::~WifiRemoteStationManager () |
323 |
{ |
|
324 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
325 |
void |
6065 | 326 |
WifiRemoteStationManager::DoDispose (void) |
2003
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1989
diff
changeset
|
327 |
{ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
328 |
for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) |
6065 | 329 |
{ |
330 |
delete (*i); |
|
331 |
} |
|
332 |
m_states.clear (); |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
333 |
for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) |
6065 | 334 |
{ |
335 |
delete (*i); |
|
336 |
} |
|
337 |
m_stations.clear (); |
|
338 |
} |
|
339 |
void |
|
340 |
WifiRemoteStationManager::SetupPhy (Ptr<WifiPhy> phy) |
|
341 |
{ |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
342 |
// We need to track our PHY because it is the object that knows the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
343 |
// full set of transmit rates that are supported. We need to know |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
344 |
// this in order to find the relevant mandatory rates when chosing a |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
345 |
// transmit rate for automatic control responses like |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
346 |
// acknowledgements. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
347 |
m_wifiPhy = phy; |
6065 | 348 |
m_defaultTxMode = phy->GetMode (0); |
10139 | 349 |
if(HasHtSupported()) |
350 |
{ |
|
351 |
m_defaultTxMcs = phy->GetMcs (0); |
|
352 |
} |
|
353 |
else |
|
354 |
{ |
|
355 |
m_defaultTxMcs = 0; |
|
356 |
} |
|
6065 | 357 |
Reset (); |
2003
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1989
diff
changeset
|
358 |
} |
10139 | 359 |
void |
11059
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
360 |
WifiRemoteStationManager::SetupMac (Ptr<WifiMac> mac) |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
361 |
{ |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
362 |
// We need to track our MAC because it is the object that knows the |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
363 |
// full set of interframe spaces. |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
364 |
m_wifiMac = mac; |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
365 |
Reset (); |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
366 |
} |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
367 |
void |
10139 | 368 |
WifiRemoteStationManager::SetHtSupported (bool enable) |
369 |
{ |
|
370 |
m_htSupported=enable; |
|
371 |
} |
|
2003
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1989
diff
changeset
|
372 |
|
10139 | 373 |
bool |
374 |
WifiRemoteStationManager::HasHtSupported (void) const |
|
375 |
{ |
|
376 |
return m_htSupported; |
|
377 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
378 |
uint32_t |
6065 | 379 |
WifiRemoteStationManager::GetMaxSsrc (void) const |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
380 |
{ |
6065 | 381 |
return m_maxSsrc; |
382 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
383 |
uint32_t |
6065 | 384 |
WifiRemoteStationManager::GetMaxSlrc (void) const |
385 |
{ |
|
386 |
return m_maxSlrc; |
|
387 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
388 |
uint32_t |
6065 | 389 |
WifiRemoteStationManager::GetRtsCtsThreshold (void) const |
390 |
{ |
|
391 |
return m_rtsCtsThreshold; |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
392 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
393 |
uint32_t |
6065 | 394 |
WifiRemoteStationManager::GetFragmentationThreshold (void) const |
395 |
{ |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
396 |
return DoGetFragmentationThreshold (); |
6065 | 397 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
398 |
void |
6065 | 399 |
WifiRemoteStationManager::SetMaxSsrc (uint32_t maxSsrc) |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
400 |
{ |
6065 | 401 |
m_maxSsrc = maxSsrc; |
402 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
403 |
void |
6065 | 404 |
WifiRemoteStationManager::SetMaxSlrc (uint32_t maxSlrc) |
405 |
{ |
|
406 |
m_maxSlrc = maxSlrc; |
|
407 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
408 |
void |
6065 | 409 |
WifiRemoteStationManager::SetRtsCtsThreshold (uint32_t threshold) |
410 |
{ |
|
411 |
m_rtsCtsThreshold = threshold; |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
412 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
413 |
void |
6065 | 414 |
WifiRemoteStationManager::SetFragmentationThreshold (uint32_t threshold) |
415 |
{ |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
416 |
DoSetFragmentationThreshold (threshold); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
417 |
} |
6065 | 418 |
|
419 |
void |
|
420 |
WifiRemoteStationManager::Reset (Mac48Address address) |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
421 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
422 |
NS_LOG_FUNCTION (this << address); |
6065 | 423 |
NS_ASSERT (!address.IsGroup ()); |
424 |
WifiRemoteStationState *state = LookupState (address); |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
425 |
state->m_operationalRateSet.clear (); |
10139 | 426 |
state->m_operationalMcsSet.clear (); |
6065 | 427 |
AddSupportedMode (address, GetDefaultMode ()); |
10139 | 428 |
AddSupportedMcs(address,GetDefaultMcs()); |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
429 |
} |
6065 | 430 |
void |
431 |
WifiRemoteStationManager::AddSupportedMode (Mac48Address address, WifiMode mode) |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
432 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
433 |
NS_LOG_FUNCTION (this << address << mode); |
6065 | 434 |
NS_ASSERT (!address.IsGroup ()); |
435 |
WifiRemoteStationState *state = LookupState (address); |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
436 |
for (WifiModeListIterator i = state->m_operationalRateSet.begin (); i != state->m_operationalRateSet.end (); i++) |
6065 | 437 |
{ |
438 |
if ((*i) == mode) |
|
439 |
{ |
|
440 |
// already in. |
|
441 |
return; |
|
442 |
} |
|
443 |
} |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
444 |
state->m_operationalRateSet.push_back (mode); |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
445 |
} |
10139 | 446 |
/*void |
447 |
WifiRemoteStationManager::AddBssMembershipParameters(Mac48Address address, uint32_t selector) |
|
448 |
{ |
|
449 |
NS_ASSERT (!address.IsGroup ()); |
|
450 |
WifiRemoteStationState *state = LookupState (address); |
|
451 |
WifiMode mode; |
|
452 |
WifiModeList membershipselectormodes = m_wifiPhy->GetMembershipSelectorModes(selector); |
|
453 |
for (WifiModeListIterator j = membershipselectormodes.begin (); j != membershipselectormodes.end (); j++) |
|
454 |
{ |
|
455 |
mode=(*j); |
|
456 |
for (WifiModeListIterator i = state->m_operationalRateSet.begin (); i != state->m_operationalRateSet.end (); i++) |
|
457 |
{ |
|
458 |
if ((*i) == mode) |
|
459 |
{ |
|
460 |
// already in. |
|
461 |
break; |
|
462 |
} |
|
463 |
} |
|
464 |
state->m_operationalRateSet.push_back (mode); |
|
465 |
} |
|
466 |
}*/ |
|
467 |
void |
|
468 |
WifiRemoteStationManager::AddSupportedMcs (Mac48Address address, uint8_t mcs) |
|
469 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
470 |
NS_LOG_FUNCTION (this << address << (uint16_t) mcs); |
10139 | 471 |
NS_ASSERT (!address.IsGroup ()); |
472 |
WifiRemoteStationState *state = LookupState (address); |
|
473 |
for (WifiMcsListIterator i = state->m_operationalMcsSet.begin (); i != state->m_operationalMcsSet.end (); i++) |
|
474 |
{ |
|
475 |
if ((*i) == mcs) |
|
476 |
{ |
|
477 |
// already in. |
|
478 |
return; |
|
479 |
} |
|
480 |
} |
|
481 |
state->m_operationalMcsSet.push_back (mcs); |
|
482 |
} |
|
6065 | 483 |
bool |
484 |
WifiRemoteStationManager::IsBrandNew (Mac48Address address) const |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
485 |
{ |
6065 | 486 |
if (address.IsGroup ()) |
487 |
{ |
|
488 |
return false; |
|
489 |
} |
|
490 |
return LookupState (address)->m_state == WifiRemoteStationState::BRAND_NEW; |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
491 |
} |
6065 | 492 |
bool |
493 |
WifiRemoteStationManager::IsAssociated (Mac48Address address) const |
|
494 |
{ |
|
495 |
if (address.IsGroup ()) |
|
496 |
{ |
|
497 |
return true; |
|
498 |
} |
|
499 |
return LookupState (address)->m_state == WifiRemoteStationState::GOT_ASSOC_TX_OK; |
|
500 |
} |
|
501 |
bool |
|
502 |
WifiRemoteStationManager::IsWaitAssocTxOk (Mac48Address address) const |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
503 |
{ |
6065 | 504 |
if (address.IsGroup ()) |
505 |
{ |
|
506 |
return false; |
|
507 |
} |
|
508 |
return LookupState (address)->m_state == WifiRemoteStationState::WAIT_ASSOC_TX_OK; |
|
509 |
} |
|
510 |
void |
|
511 |
WifiRemoteStationManager::RecordWaitAssocTxOk (Mac48Address address) |
|
512 |
{ |
|
513 |
NS_ASSERT (!address.IsGroup ()); |
|
514 |
LookupState (address)->m_state = WifiRemoteStationState::WAIT_ASSOC_TX_OK; |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
515 |
} |
6065 | 516 |
void |
517 |
WifiRemoteStationManager::RecordGotAssocTxOk (Mac48Address address) |
|
518 |
{ |
|
519 |
NS_ASSERT (!address.IsGroup ()); |
|
520 |
LookupState (address)->m_state = WifiRemoteStationState::GOT_ASSOC_TX_OK; |
|
521 |
} |
|
522 |
void |
|
523 |
WifiRemoteStationManager::RecordGotAssocTxFailed (Mac48Address address) |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
524 |
{ |
6065 | 525 |
NS_ASSERT (!address.IsGroup ()); |
526 |
LookupState (address)->m_state = WifiRemoteStationState::DISASSOC; |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
527 |
} |
6065 | 528 |
void |
529 |
WifiRemoteStationManager::RecordDisassociated (Mac48Address address) |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
530 |
{ |
6065 | 531 |
NS_ASSERT (!address.IsGroup ()); |
532 |
LookupState (address)->m_state = WifiRemoteStationState::DISASSOC; |
|
533 |
} |
|
534 |
void |
|
535 |
WifiRemoteStationManager::PrepareForQueue (Mac48Address address, const WifiMacHeader *header, |
|
536 |
Ptr<const Packet> packet, uint32_t fullPacketSize) |
|
537 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
538 |
NS_LOG_FUNCTION (this << address << *header << packet << fullPacketSize); |
6065 | 539 |
if (IsLowLatency () || address.IsGroup ()) |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
540 |
{ |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
541 |
return; |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
542 |
} |
6241
d9a65be745f0
Bug 802 - Minstrel, Onoe and Amrr not working
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6087
diff
changeset
|
543 |
WifiRemoteStation *station = Lookup (address, header); |
10139 | 544 |
WifiTxVector rts = DoGetRtsTxVector (station); |
545 |
WifiTxVector data = DoGetDataTxVector (station, fullPacketSize); |
|
546 |
WifiTxVector ctstoself = DoGetCtsToSelfTxVector (); |
|
547 |
HighLatencyDataTxVectorTag datatag; |
|
548 |
HighLatencyRtsTxVectorTag rtstag; |
|
549 |
HighLatencyCtsToSelfTxVectorTag ctstoselftag; |
|
6241
d9a65be745f0
Bug 802 - Minstrel, Onoe and Amrr not working
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6087
diff
changeset
|
550 |
// first, make sure that the tag is not here anymore. |
10139 | 551 |
ConstCast<Packet> (packet)->RemovePacketTag (datatag); |
552 |
ConstCast<Packet> (packet)->RemovePacketTag (rtstag); |
|
553 |
ConstCast<Packet> (packet)->RemovePacketTag (ctstoselftag); |
|
554 |
datatag = HighLatencyDataTxVectorTag (data); |
|
555 |
rtstag = HighLatencyRtsTxVectorTag (rts); |
|
556 |
ctstoselftag = HighLatencyCtsToSelfTxVectorTag (ctstoself); |
|
6241
d9a65be745f0
Bug 802 - Minstrel, Onoe and Amrr not working
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6087
diff
changeset
|
557 |
// and then, add it back |
10139 | 558 |
packet->AddPacketTag (datatag); |
559 |
packet->AddPacketTag (rtstag); |
|
560 |
packet->AddPacketTag (ctstoselftag); |
|
6065 | 561 |
} |
10139 | 562 |
WifiTxVector |
563 |
WifiRemoteStationManager::GetDataTxVector (Mac48Address address, const WifiMacHeader *header, |
|
6065 | 564 |
Ptr<const Packet> packet, uint32_t fullPacketSize) |
565 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
566 |
NS_LOG_FUNCTION (this << address << *header << packet << fullPacketSize); |
6065 | 567 |
if (address.IsGroup ()) |
568 |
{ |
|
10139 | 569 |
WifiTxVector v; |
570 |
v.SetMode (GetNonUnicastMode ()); |
|
571 |
v.SetTxPowerLevel (m_defaultTxPowerLevel); |
|
572 |
v.SetShortGuardInterval (false); |
|
573 |
v.SetNss (1); |
|
574 |
v.SetNess (0); |
|
575 |
v.SetStbc (false); |
|
576 |
return v; |
|
6065 | 577 |
} |
578 |
if (!IsLowLatency ()) |
|
579 |
{ |
|
10139 | 580 |
HighLatencyDataTxVectorTag datatag; |
6065 | 581 |
bool found; |
10139 | 582 |
found = ConstCast<Packet> (packet)->PeekPacketTag (datatag); |
6065 | 583 |
NS_ASSERT (found); |
10139 | 584 |
// cast found to void, to suppress 'found' set but not used |
585 |
// compiler warning |
|
586 |
(void) found; |
|
587 |
return datatag.GetDataTxVector (); |
|
6065 | 588 |
} |
10139 | 589 |
return DoGetDataTxVector (Lookup (address, header), fullPacketSize); |
6065 | 590 |
} |
10139 | 591 |
WifiTxVector |
592 |
WifiRemoteStationManager::GetCtsToSelfTxVector(const WifiMacHeader *header, |
|
593 |
Ptr<const Packet> packet) |
|
594 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
595 |
NS_LOG_FUNCTION (this << *header << packet); |
10139 | 596 |
if (!IsLowLatency ()) |
597 |
{ |
|
598 |
HighLatencyCtsToSelfTxVectorTag ctstoselftag; |
|
599 |
bool found; |
|
600 |
found = ConstCast<Packet> (packet)->PeekPacketTag (ctstoselftag); |
|
601 |
NS_ASSERT (found); |
|
602 |
// cast found to void, to suppress 'found' set but not used |
|
603 |
// compiler warning |
|
604 |
(void) found; |
|
605 |
return ctstoselftag.GetCtsToSelfTxVector (); |
|
606 |
} |
|
607 |
return DoGetCtsToSelfTxVector (); |
|
608 |
} |
|
609 |
||
610 |
WifiTxVector |
|
611 |
WifiRemoteStationManager::DoGetCtsToSelfTxVector (void) |
|
612 |
{ |
|
613 |
return WifiTxVector (GetDefaultMode(), GetDefaultTxPowerLevel (),0,m_wifiPhy->GetGuardInterval(),GetNumberOfTransmitAntennas(), GetNumberOfTransmitAntennas(), false); |
|
614 |
} |
|
615 |
||
616 |
WifiTxVector |
|
617 |
WifiRemoteStationManager::GetRtsTxVector (Mac48Address address, const WifiMacHeader *header, |
|
6065 | 618 |
Ptr<const Packet> packet) |
619 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
620 |
NS_LOG_FUNCTION (this << address << *header << packet); |
6065 | 621 |
NS_ASSERT (!address.IsGroup ()); |
622 |
if (!IsLowLatency ()) |
|
623 |
{ |
|
10139 | 624 |
HighLatencyRtsTxVectorTag rtstag; |
6065 | 625 |
bool found; |
10139 | 626 |
found = ConstCast<Packet> (packet)->PeekPacketTag (rtstag); |
6065 | 627 |
NS_ASSERT (found); |
10139 | 628 |
// cast found to void, to suppress 'found' set but not used |
629 |
// compiler warning |
|
630 |
(void) found; |
|
631 |
return rtstag.GetRtsTxVector (); |
|
6065 | 632 |
} |
10139 | 633 |
return DoGetRtsTxVector (Lookup (address, header)); |
6065 | 634 |
} |
635 |
void |
|
636 |
WifiRemoteStationManager::ReportRtsFailed (Mac48Address address, const WifiMacHeader *header) |
|
637 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
638 |
NS_LOG_FUNCTION (this << address << *header); |
6065 | 639 |
NS_ASSERT (!address.IsGroup ()); |
640 |
WifiRemoteStation *station = Lookup (address, header); |
|
641 |
station->m_ssrc++; |
|
642 |
m_macTxRtsFailed (address); |
|
643 |
DoReportRtsFailed (station); |
|
644 |
} |
|
645 |
void |
|
646 |
WifiRemoteStationManager::ReportDataFailed (Mac48Address address, const WifiMacHeader *header) |
|
647 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
648 |
NS_LOG_FUNCTION (this << address << *header); |
6065 | 649 |
NS_ASSERT (!address.IsGroup ()); |
650 |
WifiRemoteStation *station = Lookup (address, header); |
|
651 |
station->m_slrc++; |
|
652 |
m_macTxDataFailed (address); |
|
653 |
DoReportDataFailed (station); |
|
654 |
} |
|
655 |
void |
|
656 |
WifiRemoteStationManager::ReportRtsOk (Mac48Address address, const WifiMacHeader *header, |
|
657 |
double ctsSnr, WifiMode ctsMode, double rtsSnr) |
|
658 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
659 |
NS_LOG_FUNCTION (this << address << *header << ctsSnr << ctsMode << rtsSnr); |
6065 | 660 |
NS_ASSERT (!address.IsGroup ()); |
661 |
WifiRemoteStation *station = Lookup (address, header); |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
662 |
station->m_state->m_info.NotifyTxSuccess (station->m_ssrc); |
6065 | 663 |
station->m_ssrc = 0; |
664 |
DoReportRtsOk (station, ctsSnr, ctsMode, rtsSnr); |
|
665 |
} |
|
666 |
void |
|
667 |
WifiRemoteStationManager::ReportDataOk (Mac48Address address, const WifiMacHeader *header, |
|
668 |
double ackSnr, WifiMode ackMode, double dataSnr) |
|
669 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
670 |
NS_LOG_FUNCTION (this << address << *header << ackSnr << ackMode << dataSnr); |
6065 | 671 |
NS_ASSERT (!address.IsGroup ()); |
672 |
WifiRemoteStation *station = Lookup (address, header); |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
673 |
station->m_state->m_info.NotifyTxSuccess (station->m_slrc); |
6065 | 674 |
station->m_slrc = 0; |
675 |
DoReportDataOk (station, ackSnr, ackMode, dataSnr); |
|
676 |
} |
|
677 |
void |
|
678 |
WifiRemoteStationManager::ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header) |
|
679 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
680 |
NS_LOG_FUNCTION (this << address << *header); |
6065 | 681 |
NS_ASSERT (!address.IsGroup ()); |
682 |
WifiRemoteStation *station = Lookup (address, header); |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
683 |
station->m_state->m_info.NotifyTxFailed (); |
6065 | 684 |
station->m_ssrc = 0; |
685 |
m_macTxFinalRtsFailed (address); |
|
686 |
DoReportFinalRtsFailed (station); |
|
687 |
} |
|
688 |
void |
|
689 |
WifiRemoteStationManager::ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header) |
|
690 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
691 |
NS_LOG_FUNCTION (this << address << *header); |
6065 | 692 |
NS_ASSERT (!address.IsGroup ()); |
693 |
WifiRemoteStation *station = Lookup (address, header); |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
694 |
station->m_state->m_info.NotifyTxFailed (); |
6065 | 695 |
station->m_slrc = 0; |
696 |
m_macTxFinalDataFailed (address); |
|
697 |
DoReportFinalDataFailed (station); |
|
698 |
} |
|
699 |
void |
|
700 |
WifiRemoteStationManager::ReportRxOk (Mac48Address address, const WifiMacHeader *header, |
|
701 |
double rxSnr, WifiMode txMode) |
|
702 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
703 |
NS_LOG_FUNCTION (this << address << *header << rxSnr << txMode); |
6065 | 704 |
if (address.IsGroup ()) |
705 |
{ |
|
706 |
return; |
|
707 |
} |
|
708 |
WifiRemoteStation *station = Lookup (address, header); |
|
709 |
DoReportRxOk (station, rxSnr, txMode); |
|
710 |
} |
|
711 |
bool |
|
712 |
WifiRemoteStationManager::NeedRts (Mac48Address address, const WifiMacHeader *header, |
|
713 |
Ptr<const Packet> packet) |
|
714 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
715 |
NS_LOG_FUNCTION (this << address << *header << packet); |
6065 | 716 |
if (address.IsGroup ()) |
717 |
{ |
|
718 |
return false; |
|
719 |
} |
|
6473 | 720 |
bool normally = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > GetRtsCtsThreshold (); |
6065 | 721 |
return DoNeedRts (Lookup (address, header), packet, normally); |
722 |
} |
|
723 |
bool |
|
10139 | 724 |
WifiRemoteStationManager::NeedCtsToSelf (WifiTxVector txVector) |
725 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
726 |
NS_LOG_FUNCTION (this << txVector); |
10139 | 727 |
WifiMode mode = txVector.GetMode(); |
728 |
||
729 |
// search the BSS Basic Rate set if the used mode in the basic set then no need for Cts to self |
|
730 |
for (WifiModeListIterator i = m_bssBasicRateSet.begin (); |
|
731 |
i != m_bssBasicRateSet.end (); i++) |
|
732 |
{ |
|
733 |
if (mode == *i) |
|
734 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
735 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning false"); |
10139 | 736 |
return false; |
737 |
} |
|
738 |
} |
|
739 |
if (HasHtSupported()) |
|
740 |
{ |
|
741 |
uint8_t mcs = m_wifiPhy->WifiModeToMcs (mode); |
|
742 |
for (WifiMcsListIterator i = m_bssBasicMcsSet.begin (); |
|
743 |
i != m_bssBasicMcsSet.end (); i++) |
|
744 |
{ |
|
745 |
if (mcs == *i) |
|
746 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
747 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning false"); |
10139 | 748 |
return false; |
749 |
} |
|
750 |
} |
|
751 |
} |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
752 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedCtsToSelf returning true"); |
10139 | 753 |
return true; |
754 |
} |
|
755 |
bool |
|
6065 | 756 |
WifiRemoteStationManager::NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, |
757 |
Ptr<const Packet> packet) |
|
758 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
759 |
NS_LOG_FUNCTION (this << address << packet << *header); |
6065 | 760 |
NS_ASSERT (!address.IsGroup ()); |
761 |
WifiRemoteStation *station = Lookup (address, header); |
|
762 |
bool normally = station->m_ssrc < GetMaxSsrc (); |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
763 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_ssrc << " result: " << std::boolalpha << normally); |
6065 | 764 |
return DoNeedRtsRetransmission (station, packet, normally); |
765 |
} |
|
766 |
bool |
|
767 |
WifiRemoteStationManager::NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, |
|
768 |
Ptr<const Packet> packet) |
|
769 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
770 |
NS_LOG_FUNCTION (this << address << packet << *header); |
6065 | 771 |
NS_ASSERT (!address.IsGroup ()); |
772 |
WifiRemoteStation *station = Lookup (address, header); |
|
773 |
bool normally = station->m_slrc < GetMaxSlrc (); |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
774 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_slrc << " result: " << std::boolalpha << normally); |
6065 | 775 |
return DoNeedDataRetransmission (station, packet, normally); |
776 |
} |
|
777 |
bool |
|
778 |
WifiRemoteStationManager::NeedFragmentation (Mac48Address address, const WifiMacHeader *header, |
|
779 |
Ptr<const Packet> packet) |
|
780 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
781 |
NS_LOG_FUNCTION (this << address << packet << *header); |
6065 | 782 |
if (address.IsGroup ()) |
783 |
{ |
|
784 |
return false; |
|
785 |
} |
|
786 |
WifiRemoteStation *station = Lookup (address, header); |
|
6473 | 787 |
bool normally = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > GetFragmentationThreshold (); |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
788 |
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedFragmentation result: " << std::boolalpha << normally); |
6065 | 789 |
return DoNeedFragmentation (station, packet, normally); |
790 |
} |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
791 |
|
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
792 |
void |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
793 |
WifiRemoteStationManager::DoSetFragmentationThreshold (uint32_t threshold) |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
794 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
795 |
NS_LOG_FUNCTION (this << threshold); |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
796 |
if (threshold < 256) |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
797 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
798 |
/* |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
799 |
* ASN.1 encoding of the MAC and PHY MIB (256 ... 8000) |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
800 |
*/ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
801 |
NS_LOG_WARN ("Fragmentation threshold should be larger than 256. Setting to 256."); |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
802 |
m_fragmentationThreshold = 256; |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
803 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
804 |
else |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
805 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
806 |
/* |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
807 |
* The length of each fragment shall be an even number of octets, except for the last fragment if an MSDU or |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
808 |
* MMPDU, which may be either an even or an odd number of octets. |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
809 |
*/ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
810 |
if (threshold % 2 != 0) |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
811 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
812 |
NS_LOG_WARN ("Fragmentation threshold should be an even number. Setting to " << threshold - 1); |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
813 |
m_fragmentationThreshold = threshold - 1; |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
814 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
815 |
else |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
816 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
817 |
m_fragmentationThreshold = threshold; |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
818 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
819 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
820 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
821 |
|
6065 | 822 |
uint32_t |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
823 |
WifiRemoteStationManager::DoGetFragmentationThreshold (void) const |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
824 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
825 |
return m_fragmentationThreshold; |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
826 |
} |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
827 |
|
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
828 |
uint32_t |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
829 |
WifiRemoteStationManager::GetNFragments (const WifiMacHeader *header, Ptr<const Packet> packet) |
6065 | 830 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
831 |
NS_LOG_FUNCTION (this << *header << packet); |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
832 |
//The number of bytes a fragment can support is (Threshold - WIFI_HEADER_SIZE - WIFI_FCS). |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
833 |
uint32_t nFragments = (packet->GetSize () / (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH)); |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
834 |
|
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
835 |
//If the size of the last fragment is not 0. |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
836 |
if ((packet->GetSize () % (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH)) > 0) |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
837 |
{ |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
838 |
nFragments++; |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
839 |
} |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
840 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetNFragments returning " << nFragments); |
6065 | 841 |
return nFragments; |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
842 |
} |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
843 |
|
6065 | 844 |
uint32_t |
845 |
WifiRemoteStationManager::GetFragmentSize (Mac48Address address, const WifiMacHeader *header, |
|
846 |
Ptr<const Packet> packet, uint32_t fragmentNumber) |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
847 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
848 |
NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber); |
6065 | 849 |
NS_ASSERT (!address.IsGroup ()); |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
850 |
uint32_t nFragment = GetNFragments (header, packet); |
6065 | 851 |
if (fragmentNumber >= nFragment) |
852 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
853 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning 0"); |
6065 | 854 |
return 0; |
855 |
} |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
856 |
//Last fragment |
6065 | 857 |
if (fragmentNumber == nFragment - 1) |
858 |
{ |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
859 |
uint32_t lastFragmentSize = packet->GetSize () - (fragmentNumber * (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH)); |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
860 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning " << lastFragmentSize); |
6065 | 861 |
return lastFragmentSize; |
862 |
} |
|
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
863 |
//All fragments but the last, the number of bytes is (Threshold - WIFI_HEADER_SIZE - WIFI_FCS). |
6065 | 864 |
else |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
865 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
866 |
uint32_t fragmentSize = GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH; |
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
867 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentSize returning " << fragmentSize); |
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
868 |
return fragmentSize; |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
869 |
} |
6065 | 870 |
} |
871 |
uint32_t |
|
872 |
WifiRemoteStationManager::GetFragmentOffset (Mac48Address address, const WifiMacHeader *header, |
|
873 |
Ptr<const Packet> packet, uint32_t fragmentNumber) |
|
874 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
875 |
NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber); |
6065 | 876 |
NS_ASSERT (!address.IsGroup ()); |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
877 |
NS_ASSERT (fragmentNumber < GetNFragments (header, packet)); |
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
878 |
uint32_t fragmentOffset = fragmentNumber * (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH); |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
879 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetFragmentOffset returning " << fragmentOffset); |
6065 | 880 |
return fragmentOffset; |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
881 |
} |
6065 | 882 |
bool |
883 |
WifiRemoteStationManager::IsLastFragment (Mac48Address address, const WifiMacHeader *header, |
|
884 |
Ptr<const Packet> packet, uint32_t fragmentNumber) |
|
885 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
886 |
NS_LOG_FUNCTION (this << address << *header << packet << fragmentNumber); |
6065 | 887 |
NS_ASSERT (!address.IsGroup ()); |
9165
7b219a73b844
Bug 1524 - WiFi fragmentation issue
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
9063
diff
changeset
|
888 |
bool isLast = fragmentNumber == (GetNFragments (header, packet) - 1); |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
889 |
NS_LOG_DEBUG ("WifiRemoteStationManager::IsLastFragment returning " << std::boolalpha << isLast); |
6065 | 890 |
return isLast; |
891 |
} |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
892 |
WifiMode |
6065 | 893 |
WifiRemoteStationManager::GetControlAnswerMode (Mac48Address address, WifiMode reqMode) |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
894 |
{ |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
895 |
/** |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
896 |
* The standard has relatively unambiguous rules for selecting a |
10580
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
897 |
* control response rate (the below is quoted from IEEE 802.11-2012, |
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
898 |
* Section 9.7): |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
899 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
900 |
* To allow the transmitting STA to calculate the contents of the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
901 |
* Duration/ID field, a STA responding to a received frame shall |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
902 |
* transmit its Control Response frame (either CTS or ACK), other |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
903 |
* than the BlockAck control frame, at the highest rate in the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
904 |
* BSSBasicRateSet parameter that is less than or equal to the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
905 |
* rate of the immediately previous frame in the frame exchange |
10580
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
906 |
* sequence (as defined in Annex G) and that is of the same |
2a29a9bd6fd6
Update (most of) IEEE Std 802.11-2007 to IEEE Std 802.11-2012
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
907 |
* modulation class (see Section 9.7.8) as the received frame... |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
908 |
*/ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
909 |
NS_LOG_FUNCTION (this << address << reqMode); |
6065 | 910 |
WifiMode mode = GetDefaultMode (); |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
911 |
bool found = false; |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
912 |
|
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
913 |
// First, search the BSS Basic Rate set |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
914 |
for (WifiModeListIterator i = m_bssBasicRateSet.begin (); |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
915 |
i != m_bssBasicRateSet.end (); i++) |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
916 |
{ |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
917 |
if ((!found || i->GetPhyRate () > mode.GetPhyRate ()) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
918 |
&& i->GetPhyRate () <= reqMode.GetPhyRate () |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
919 |
&& i->GetModulationClass () == reqMode.GetModulationClass ()) |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
920 |
{ |
1930
ec22299cf6bb
rework MacStations to handle correctly Supported vs Basic rate sets and add IdealMacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1913
diff
changeset
|
921 |
mode = *i; |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
922 |
// We've found a potentially-suitable transmit rate, but we |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
923 |
// need to continue and consider all the basic rates before |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
924 |
// we can be sure we've got the right one. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
925 |
found = true; |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
926 |
} |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
927 |
} |
10139 | 928 |
if(HasHtSupported()) |
929 |
{ |
|
10207
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
930 |
if (!found) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
931 |
{ |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
932 |
uint8_t mcs = GetDefaultMcs (); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
933 |
mode= m_wifiPhy->McsToWifiMode (mcs); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
934 |
} |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
935 |
for (WifiMcsListIterator i = m_bssBasicMcsSet.begin (); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
936 |
i != m_bssBasicMcsSet.end (); i++) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
937 |
{ |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
938 |
WifiMode thismode= m_wifiPhy->McsToWifiMode (*i); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
939 |
if ((!found || thismode.GetPhyRate () > mode.GetPhyRate ()) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
940 |
&& thismode.GetPhyRate () <= reqMode.GetPhyRate () |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
941 |
&& thismode.GetModulationClass () == reqMode.GetModulationClass ()) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
942 |
{ |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
943 |
mode = thismode; |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
944 |
// We've found a potentially-suitable transmit rate, but we |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
945 |
// need to continue and consider all the basic rates before |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
946 |
// we can be sure we've got the right one. |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
947 |
found = true; |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
948 |
} |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
949 |
} |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
950 |
} |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
951 |
// If we found a suitable rate in the BSSBasicRateSet, then we are |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
952 |
// done and can return that mode. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
953 |
if (found) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
954 |
{ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
955 |
return mode; |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
956 |
} |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
957 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
958 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
959 |
* If no suitable basic rate was found, we search the mandatory |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
960 |
* rates. The standard (IEEE 802.11-2007, Section 9.6) says: |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
961 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
962 |
* ...If no rate contained in the BSSBasicRateSet parameter meets |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
963 |
* these conditions, then the control frame sent in response to a |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
964 |
* received frame shall be transmitted at the highest mandatory |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
965 |
* rate of the PHY that is less than or equal to the rate of the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
966 |
* received frame, and that is of the same modulation class as the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
967 |
* received frame. In addition, the Control Response frame shall |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
968 |
* be sent using the same PHY options as the received frame, |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
969 |
* unless they conflict with the requirement to use the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
970 |
* BSSBasicRateSet parameter. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
971 |
* |
9870
6543f3876ff5
[Doxygen] use \todo
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9165
diff
changeset
|
972 |
* \todo Note that we're ignoring the last sentence for now, because |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
973 |
* there is not yet any manipulation here of PHY options. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
974 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
975 |
for (uint32_t idx = 0; idx < m_wifiPhy->GetNModes (); idx++) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
976 |
{ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
977 |
WifiMode thismode = m_wifiPhy->GetMode (idx); |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
978 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
979 |
/* If the rate: |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
980 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
981 |
* - is a mandatory rate for the PHY, and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
982 |
* - is equal to or faster than our current best choice, and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
983 |
* - is less than or equal to the rate of the received frame, and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
984 |
* - is of the same modulation class as the received frame |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
985 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
986 |
* ...then it's our best choice so far. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
987 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
988 |
if (thismode.IsMandatory () |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
989 |
&& (!found || thismode.GetPhyRate () > mode.GetPhyRate ()) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
990 |
&& thismode.GetPhyRate () <= reqMode.GetPhyRate () |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
991 |
&& thismode.GetModulationClass () == reqMode.GetModulationClass ()) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
992 |
{ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
993 |
mode = thismode; |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
994 |
// As above; we've found a potentially-suitable transmit |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
995 |
// rate, but we need to continue and consider all the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
996 |
// mandatory rates before we can be sure we've got the right |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
997 |
// one. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
998 |
found = true; |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
999 |
} |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1000 |
} |
10207
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1001 |
if(HasHtSupported()) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1002 |
{ |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1003 |
for (uint32_t idx = 0; idx < m_wifiPhy->GetNMcs (); idx++) |
10139 | 1004 |
{ |
10207
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1005 |
uint8_t thismcs = m_wifiPhy->GetMcs (idx); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1006 |
WifiMode thismode= m_wifiPhy->McsToWifiMode (thismcs); |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1007 |
if (thismode.IsMandatory () |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1008 |
&& (!found || thismode.GetPhyRate () > mode.GetPhyRate ()) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1009 |
&& thismode.GetPhyRate () <= reqMode.GetPhyRate () |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1010 |
&& thismode.GetModulationClass () == reqMode.GetModulationClass ()) |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1011 |
{ |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1012 |
mode = thismode; |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1013 |
// As above; we've found a potentially-suitable transmit |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1014 |
// rate, but we need to continue and consider all the |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1015 |
// mandatory rates before we can be sure we've got the right |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1016 |
// one. |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1017 |
found = true; |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1018 |
} |
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1019 |
|
10139 | 1020 |
} |
10207
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1021 |
} |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1022 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1023 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1024 |
* If we still haven't found a suitable rate for the response then |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1025 |
* someone has messed up the simulation config. This probably means |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1026 |
* that the WifiPhyStandard is not set correctly, or that a rate that |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1027 |
* is not supported by the PHY has been explicitly requested in a |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1028 |
* WifiRemoteStationManager (or descendant) configuration. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1029 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1030 |
* Either way, it is serious - we can either disobey the standard or |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1031 |
* fail, and I have chosen to do the latter... |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1032 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1033 |
if (!found) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1034 |
{ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1035 |
NS_FATAL_ERROR ("Can't find response rate for " << reqMode |
10207
4c42c64f7ea8
Fixed indentation in wifi-remote-station-manager.cc
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10139
diff
changeset
|
1036 |
<< ". Check standard and selected rates match."); |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1037 |
} |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1038 |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1039 |
NS_LOG_DEBUG ("WifiRemoteStationManager::GetControlAnswerMode returning " << mode); |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1040 |
return mode; |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1041 |
} |
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1042 |
|
10139 | 1043 |
WifiTxVector |
1044 |
WifiRemoteStationManager::GetCtsTxVector (Mac48Address address, WifiMode rtsMode) |
|
1045 |
{ |
|
1046 |
NS_ASSERT (!address.IsGroup ()); |
|
1047 |
WifiTxVector v; |
|
1048 |
v.SetMode (GetControlAnswerMode (address, rtsMode)); |
|
1049 |
v.SetTxPowerLevel (DoGetCtsTxPowerLevel (address, v.GetMode())); |
|
1050 |
v.SetShortGuardInterval (DoGetCtsTxGuardInterval(address, v.GetMode())); |
|
1051 |
v.SetNss (DoGetCtsTxNss(address, v.GetMode())); |
|
1052 |
v.SetNess (DoGetCtsTxNess(address, v.GetMode())); |
|
1053 |
v.SetStbc (DoGetCtsTxStbc(address, v.GetMode())); |
|
1054 |
return v; |
|
1055 |
} |
|
1056 |
WifiTxVector |
|
1057 |
WifiRemoteStationManager::GetAckTxVector (Mac48Address address, WifiMode dataMode) |
|
1058 |
{ |
|
1059 |
NS_ASSERT (!address.IsGroup ()); |
|
1060 |
WifiTxVector v; |
|
1061 |
v.SetMode (GetControlAnswerMode (address, dataMode)); |
|
1062 |
v.SetTxPowerLevel (DoGetAckTxPowerLevel (address, v.GetMode())); |
|
1063 |
v.SetShortGuardInterval(DoGetAckTxGuardInterval(address, v.GetMode())); |
|
1064 |
v.SetNss(DoGetAckTxNss(address, v.GetMode())); |
|
1065 |
v.SetNess(DoGetAckTxNess(address, v.GetMode())); |
|
1066 |
v.SetStbc(DoGetAckTxStbc(address, v.GetMode())); |
|
1067 |
return v; |
|
1068 |
} |
|
1069 |
WifiTxVector |
|
1070 |
WifiRemoteStationManager::GetBlockAckTxVector (Mac48Address address, WifiMode blockAckReqMode) |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1071 |
{ |
6065 | 1072 |
NS_ASSERT (!address.IsGroup ()); |
10139 | 1073 |
WifiTxVector v; |
1074 |
v.SetMode (GetControlAnswerMode (address, blockAckReqMode)); |
|
1075 |
v.SetTxPowerLevel (DoGetBlockAckTxPowerLevel (address, v.GetMode())); |
|
1076 |
v.SetShortGuardInterval (DoGetBlockAckTxGuardInterval(address, v.GetMode())); |
|
1077 |
v.SetNss (DoGetBlockAckTxNss(address, v.GetMode())); |
|
1078 |
v.SetNess (DoGetBlockAckTxNess(address, v.GetMode())); |
|
1079 |
v.SetStbc (DoGetBlockAckTxStbc(address, v.GetMode())); |
|
1080 |
return v; |
|
1081 |
} |
|
1082 |
||
1083 |
uint8_t |
|
1084 |
WifiRemoteStationManager::DoGetCtsTxPowerLevel (Mac48Address address, WifiMode ctsMode) |
|
1085 |
{ |
|
1086 |
return m_defaultTxPowerLevel; |
|
1087 |
} |
|
1088 |
||
1089 |
bool |
|
1090 |
WifiRemoteStationManager::DoGetCtsTxGuardInterval(Mac48Address address, WifiMode ctsMode) |
|
1091 |
{ |
|
1092 |
return m_wifiPhy->GetGuardInterval(); |
|
1093 |
} |
|
1094 |
||
1095 |
uint8_t |
|
1096 |
WifiRemoteStationManager::DoGetCtsTxNss(Mac48Address address, WifiMode ctsMode) |
|
1097 |
{ |
|
1098 |
return 1; |
|
1099 |
} |
|
1100 |
uint8_t |
|
1101 |
WifiRemoteStationManager::DoGetCtsTxNess(Mac48Address address, WifiMode ctsMode) |
|
1102 |
{ |
|
1103 |
return 0; |
|
1104 |
} |
|
1105 |
bool |
|
1106 |
WifiRemoteStationManager::DoGetCtsTxStbc(Mac48Address address, WifiMode ctsMode) |
|
1107 |
{ |
|
1108 |
return m_wifiPhy->GetStbc(); |
|
1109 |
} |
|
1110 |
||
1111 |
uint8_t |
|
1112 |
WifiRemoteStationManager::DoGetAckTxPowerLevel (Mac48Address address, WifiMode ackMode) |
|
1113 |
{ |
|
1114 |
return m_defaultTxPowerLevel; |
|
1115 |
} |
|
1116 |
||
1117 |
bool |
|
1118 |
WifiRemoteStationManager::DoGetAckTxGuardInterval(Mac48Address address, WifiMode ackMode) |
|
1119 |
{ |
|
1120 |
return m_wifiPhy->GetGuardInterval(); |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1121 |
} |
10139 | 1122 |
|
1123 |
uint8_t |
|
1124 |
WifiRemoteStationManager::DoGetAckTxNss(Mac48Address address, WifiMode ackMode) |
|
1125 |
{ |
|
1126 |
return 1; |
|
1127 |
} |
|
1128 |
uint8_t |
|
1129 |
WifiRemoteStationManager::DoGetAckTxNess(Mac48Address address, WifiMode ackMode) |
|
1130 |
{ |
|
1131 |
return 0; |
|
1132 |
} |
|
1133 |
bool |
|
1134 |
WifiRemoteStationManager::DoGetAckTxStbc(Mac48Address address, WifiMode ackMode) |
|
1135 |
{ |
|
1136 |
return m_wifiPhy->GetStbc(); |
|
1137 |
} |
|
1138 |
||
1139 |
uint8_t |
|
1140 |
WifiRemoteStationManager::DoGetBlockAckTxPowerLevel (Mac48Address address, WifiMode blockAckMode) |
|
1141 |
{ |
|
1142 |
return m_defaultTxPowerLevel; |
|
1143 |
} |
|
1144 |
||
1145 |
bool |
|
1146 |
WifiRemoteStationManager::DoGetBlockAckTxGuardInterval(Mac48Address address, WifiMode blockAckMode) |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1147 |
{ |
10139 | 1148 |
return m_wifiPhy->GetGuardInterval(); |
1149 |
} |
|
1150 |
||
1151 |
uint8_t |
|
1152 |
WifiRemoteStationManager::DoGetBlockAckTxNss(Mac48Address address, WifiMode blockAckMode) |
|
1153 |
{ |
|
1154 |
return 1; |
|
1155 |
} |
|
1156 |
uint8_t |
|
1157 |
WifiRemoteStationManager::DoGetBlockAckTxNess(Mac48Address address, WifiMode blockAckMode) |
|
1158 |
{ |
|
1159 |
return 0; |
|
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1160 |
} |
10139 | 1161 |
bool |
1162 |
WifiRemoteStationManager::DoGetBlockAckTxStbc(Mac48Address address, WifiMode blockAckMode) |
|
1163 |
{ |
|
1164 |
return m_wifiPhy->GetStbc(); |
|
1165 |
} |
|
1166 |
||
1167 |
||
1168 |
uint8_t |
|
1169 |
WifiRemoteStationManager::GetDefaultTxPowerLevel (void) const |
|
1170 |
{ |
|
1171 |
return m_defaultTxPowerLevel; |
|
1172 |
} |
|
1173 |
||
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1174 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1175 |
WifiRemoteStationInfo |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1176 |
WifiRemoteStationManager::GetInfo (Mac48Address address) |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1177 |
{ |
6339 | 1178 |
WifiRemoteStationState *state = LookupState (address); |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1179 |
return state->m_info; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1180 |
} |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1181 |
|
6065 | 1182 |
WifiRemoteStationState * |
1183 |
WifiRemoteStationManager::LookupState (Mac48Address address) const |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1184 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1185 |
NS_LOG_FUNCTION (this << address); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1186 |
for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1187 |
{ |
6065 | 1188 |
if ((*i)->m_address == address) |
1189 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1190 |
NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning existing state"); |
6065 | 1191 |
return (*i); |
1192 |
} |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1193 |
} |
6065 | 1194 |
WifiRemoteStationState *state = new WifiRemoteStationState (); |
1195 |
state->m_state = WifiRemoteStationState::BRAND_NEW; |
|
1196 |
state->m_address = address; |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1197 |
state->m_operationalRateSet.push_back (GetDefaultMode ()); |
10139 | 1198 |
state->m_operationalMcsSet.push_back(GetDefaultMcs()); |
1199 |
state->m_shortGuardInterval=m_wifiPhy->GetGuardInterval(); |
|
1200 |
state->m_greenfield=m_wifiPhy->GetGreenfield(); |
|
1201 |
state->m_rx=1; |
|
1202 |
state->m_tx=1; |
|
1203 |
state->m_stbc=false; |
|
6067
ccbdc2b19ea5
add newly-created state to state list.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6065
diff
changeset
|
1204 |
const_cast<WifiRemoteStationManager *> (this)->m_states.push_back (state); |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1205 |
NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning new state"); |
6065 | 1206 |
return state; |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1207 |
} |
6065 | 1208 |
WifiRemoteStation * |
1209 |
WifiRemoteStationManager::Lookup (Mac48Address address, const WifiMacHeader *header) const |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1210 |
{ |
6065 | 1211 |
uint8_t tid; |
1212 |
if (header->IsQosData ()) |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1213 |
{ |
6065 | 1214 |
tid = header->GetQosTid (); |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1215 |
} |
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1216 |
else |
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1217 |
{ |
6065 | 1218 |
tid = 0; |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1219 |
} |
6065 | 1220 |
return Lookup (address, tid); |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1221 |
} |
6065 | 1222 |
WifiRemoteStation * |
1223 |
WifiRemoteStationManager::Lookup (Mac48Address address, uint8_t tid) const |
|
3745
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3212
diff
changeset
|
1224 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1225 |
NS_LOG_FUNCTION (this << address << (uint16_t) tid); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1226 |
for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) |
6065 | 1227 |
{ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1228 |
if ((*i)->m_tid == tid |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1229 |
&& (*i)->m_state->m_address == address) |
6065 | 1230 |
{ |
1231 |
return (*i); |
|
1232 |
} |
|
1233 |
} |
|
1234 |
WifiRemoteStationState *state = LookupState (address); |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1235 |
|
6065 | 1236 |
WifiRemoteStation *station = DoCreateStation (); |
1237 |
station->m_state = state; |
|
6087
2c4e9171497e
Simple bug of WifiRemoteStationManager: station's tid is not initialized.
Kirill Andreev <andreev@iitp.ru>
parents:
6071
diff
changeset
|
1238 |
station->m_tid = tid; |
6065 | 1239 |
station->m_ssrc = 0; |
1240 |
station->m_slrc = 0; |
|
1241 |
// XXX |
|
1242 |
const_cast<WifiRemoteStationManager *> (this)->m_stations.push_back (station); |
|
1243 |
return station; |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1244 |
|
3745
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3212
diff
changeset
|
1245 |
} |
10139 | 1246 |
//Used by all stations to record HT capabilities of remote stations |
1247 |
void |
|
1248 |
WifiRemoteStationManager::AddStationHtCapabilities (Mac48Address from, HtCapabilities htcapabilities) |
|
1249 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1250 |
NS_LOG_FUNCTION (this << from << htcapabilities); |
10139 | 1251 |
WifiRemoteStationState *state; |
1252 |
state=LookupState (from); |
|
1253 |
state->m_shortGuardInterval=htcapabilities.GetShortGuardInterval20(); |
|
1254 |
state->m_greenfield=htcapabilities.GetGreenfield(); |
|
1255 |
||
1256 |
} |
|
1257 |
//Used by mac low to choose format used GF, MF or Non HT |
|
1258 |
bool |
|
1259 |
WifiRemoteStationManager::GetGreenfieldSupported (Mac48Address address) const |
|
1260 |
{ |
|
1261 |
return LookupState(address)->m_greenfield; |
|
1262 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1263 |
WifiMode |
6065 | 1264 |
WifiRemoteStationManager::GetDefaultMode (void) const |
1265 |
{ |
|
1266 |
return m_defaultTxMode; |
|
1267 |
} |
|
10139 | 1268 |
uint8_t |
1269 |
WifiRemoteStationManager::GetDefaultMcs (void) const |
|
1270 |
{ |
|
1271 |
return m_defaultTxMcs; |
|
1272 |
} |
|
6065 | 1273 |
void |
1274 |
WifiRemoteStationManager::Reset (void) |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1275 |
{ |
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1276 |
NS_LOG_FUNCTION (this); |
6065 | 1277 |
for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) |
1278 |
{ |
|
1279 |
delete (*i); |
|
1280 |
} |
|
1281 |
m_stations.clear (); |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1282 |
m_bssBasicRateSet.clear (); |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1283 |
m_bssBasicRateSet.push_back (m_defaultTxMode); |
10139 | 1284 |
m_bssBasicMcsSet.clear(); |
1285 |
m_bssBasicMcsSet.push_back (m_defaultTxMcs); |
|
6065 | 1286 |
NS_ASSERT (m_defaultTxMode.IsMandatory ()); |
1287 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1288 |
void |
6065 | 1289 |
WifiRemoteStationManager::AddBasicMode (WifiMode mode) |
1290 |
{ |
|
11064
a0562c615abc
add logging to WifiRemoteStationManager
Tom Henderson <tomh@tomh.org>
parents:
11059
diff
changeset
|
1291 |
NS_LOG_FUNCTION (this << mode); |
6065 | 1292 |
for (uint32_t i = 0; i < GetNBasicModes (); i++) |
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1293 |
{ |
6065 | 1294 |
if (GetBasicMode (i) == mode) |
1295 |
{ |
|
1296 |
return; |
|
1297 |
} |
|
1298 |
} |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1299 |
m_bssBasicRateSet.push_back (mode); |
6065 | 1300 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1301 |
uint32_t |
6065 | 1302 |
WifiRemoteStationManager::GetNBasicModes (void) const |
1303 |
{ |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1304 |
return m_bssBasicRateSet.size (); |
6065 | 1305 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1306 |
WifiMode |
6065 | 1307 |
WifiRemoteStationManager::GetBasicMode (uint32_t i) const |
1308 |
{ |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1309 |
NS_ASSERT (i < m_bssBasicRateSet.size ()); |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1310 |
return m_bssBasicRateSet[i]; |
6065 | 1311 |
} |
10139 | 1312 |
|
1313 |
void |
|
1314 |
WifiRemoteStationManager::AddBasicMcs (uint8_t mcs) |
|
1315 |
{ |
|
1316 |
for (uint32_t i = 0; i < GetNBasicMcs (); i++) |
|
1317 |
{ |
|
1318 |
if (GetBasicMcs (i) == mcs) |
|
1319 |
{ |
|
1320 |
return; |
|
1321 |
} |
|
1322 |
} |
|
1323 |
m_bssBasicMcsSet.push_back (mcs); |
|
1324 |
} |
|
1325 |
||
1326 |
uint32_t |
|
1327 |
WifiRemoteStationManager::GetNBasicMcs (void) const |
|
1328 |
{ |
|
1329 |
return m_bssBasicMcsSet.size (); |
|
1330 |
} |
|
1331 |
uint8_t |
|
1332 |
WifiRemoteStationManager::GetBasicMcs (uint32_t i) const |
|
1333 |
{ |
|
1334 |
NS_ASSERT (i < m_bssBasicMcsSet.size ()); |
|
1335 |
return m_bssBasicMcsSet[i]; |
|
1336 |
} |
|
1337 |
||
6065 | 1338 |
WifiMode |
1339 |
WifiRemoteStationManager::GetNonUnicastMode (void) const |
|
1340 |
{ |
|
1341 |
if (m_nonUnicastMode == WifiMode ()) |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1342 |
{ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1343 |
return GetBasicMode (0); |
6065 | 1344 |
} |
1345 |
else |
|
1346 |
{ |
|
1347 |
return m_nonUnicastMode; |
|
2349
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1348 |
} |
b1df486516a4
allow rate control algorithms to control more per-packet parameters.
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2280
diff
changeset
|
1349 |
} |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
1350 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1351 |
bool |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1352 |
WifiRemoteStationManager::DoNeedRts (WifiRemoteStation *station, |
6065 | 1353 |
Ptr<const Packet> packet, bool normally) |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1354 |
{ |
6065 | 1355 |
return normally; |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1356 |
} |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1357 |
bool |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1358 |
WifiRemoteStationManager::DoNeedRtsRetransmission (WifiRemoteStation *station, |
6065 | 1359 |
Ptr<const Packet> packet, bool normally) |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1360 |
{ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1361 |
return normally; |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1362 |
} |
6065 | 1363 |
bool |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1364 |
WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station, |
6065 | 1365 |
Ptr<const Packet> packet, bool normally) |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1366 |
{ |
6065 | 1367 |
return normally; |
1368 |
} |
|
1369 |
bool |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1370 |
WifiRemoteStationManager::DoNeedFragmentation (WifiRemoteStation *station, |
6065 | 1371 |
Ptr<const Packet> packet, bool normally) |
1372 |
{ |
|
1373 |
return normally; |
|
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1374 |
} |
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1375 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1376 |
WifiMode |
6065 | 1377 |
WifiRemoteStationManager::GetSupported (const WifiRemoteStation *station, uint32_t i) const |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1378 |
{ |
6065 | 1379 |
NS_ASSERT (i < GetNSupported (station)); |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1380 |
return station->m_state->m_operationalRateSet[i]; |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1381 |
} |
10139 | 1382 |
uint8_t |
1383 |
WifiRemoteStationManager::GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const |
|
1384 |
{ |
|
1385 |
NS_ASSERT (i < GetNMcsSupported (station)); |
|
1386 |
return station->m_state->m_operationalMcsSet[i]; |
|
1387 |
} |
|
1388 |
bool |
|
1389 |
WifiRemoteStationManager::GetShortGuardInterval (const WifiRemoteStation *station) const |
|
1390 |
{ |
|
1391 |
return station->m_state->m_shortGuardInterval; |
|
1392 |
} |
|
1393 |
bool |
|
1394 |
WifiRemoteStationManager::GetGreenfield (const WifiRemoteStation *station) const |
|
1395 |
{ |
|
1396 |
return station->m_state->m_greenfield; |
|
1397 |
} |
|
1398 |
bool |
|
1399 |
WifiRemoteStationManager::GetStbc (const WifiRemoteStation *station) const |
|
1400 |
{ |
|
1401 |
return station->m_state->m_stbc; |
|
1402 |
} |
|
1403 |
uint32_t |
|
1404 |
WifiRemoteStationManager::GetNumberOfReceiveAntennas (const WifiRemoteStation *station) const |
|
1405 |
{ |
|
1406 |
return station->m_state->m_rx; |
|
1407 |
} |
|
1408 |
uint32_t |
|
1409 |
WifiRemoteStationManager::GetNumberOfTransmitAntennas (const WifiRemoteStation *station) const |
|
1410 |
{ |
|
1411 |
return station->m_state->m_tx; |
|
1412 |
} |
|
1413 |
uint32_t |
|
1414 |
WifiRemoteStationManager::GetShortRetryCount (const WifiRemoteStation *station) const |
|
1415 |
{ |
|
1416 |
return station->m_ssrc; |
|
1417 |
} |
|
11059
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1418 |
|
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1419 |
Ptr<WifiPhy> |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1420 |
WifiRemoteStationManager::GetPhy (void) const |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1421 |
{ |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1422 |
return m_wifiPhy; |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1423 |
} |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1424 |
Ptr<WifiMac> |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1425 |
WifiRemoteStationManager::GetMac (void) const |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1426 |
{ |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1427 |
return m_wifiMac; |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1428 |
} |
2fe905238013
bug 1726: minstrel rate manager doesn't save state (patch contributions also due to Jonathan Ling and MatÃas Richart)
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10968
diff
changeset
|
1429 |
|
10139 | 1430 |
uint32_t |
1431 |
WifiRemoteStationManager::GetLongRetryCount (const WifiRemoteStation *station) const |
|
1432 |
{ |
|
1433 |
return station->m_slrc; |
|
1434 |
} |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1435 |
uint32_t |
6065 | 1436 |
WifiRemoteStationManager::GetNSupported (const WifiRemoteStation *station) const |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1437 |
{ |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
1438 |
return station->m_state->m_operationalRateSet.size (); |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1439 |
} |
10139 | 1440 |
uint32_t |
1441 |
WifiRemoteStationManager::GetNMcsSupported (const WifiRemoteStation *station) const |
|
1442 |
{ |
|
1443 |
return station->m_state->m_operationalMcsSet.size (); |
|
1444 |
} |
|
1445 |
void |
|
1446 |
WifiRemoteStationManager::SetDefaultTxPowerLevel (uint8_t txPower) |
|
1447 |
{ |
|
1448 |
m_defaultTxPowerLevel = txPower; |
|
1449 |
} |
|
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1450 |
|
10139 | 1451 |
//support 11n |
1452 |
uint32_t |
|
1453 |
WifiRemoteStationManager::GetNumberOfTransmitAntennas (void) |
|
1454 |
{ |
|
1455 |
return m_wifiPhy->GetNumberOfTransmitAntennas(); |
|
1456 |
} |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1457 |
//WifiRemoteStationInfo constructor |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1458 |
WifiRemoteStationInfo::WifiRemoteStationInfo () |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1459 |
: m_memoryTime (Seconds (1.0)), |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1460 |
m_lastUpdate (Seconds (0.0)), |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1461 |
m_failAvg (0.0) |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1462 |
{ |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
6852
diff
changeset
|
1463 |
} |
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
1464 |
|
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1465 |
double |
6070 | 1466 |
WifiRemoteStationInfo::CalculateAveragingCoefficient () |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1467 |
{ |
9063
32755d0516f4
Bug 1237 - code cleanups related to includes
Vedran Miletić <rivanvx@gmail.com>
parents:
7704
diff
changeset
|
1468 |
double retval = std::exp ((double)(m_lastUpdate.GetMicroSeconds () - Simulator::Now ().GetMicroSeconds ()) |
32755d0516f4
Bug 1237 - code cleanups related to includes
Vedran Miletić <rivanvx@gmail.com>
parents:
7704
diff
changeset
|
1469 |
/ (double)m_memoryTime.GetMicroSeconds ()); |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1470 |
m_lastUpdate = Simulator::Now (); |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1471 |
return retval; |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1472 |
} |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1473 |
|
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1474 |
void |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1475 |
WifiRemoteStationInfo::NotifyTxSuccess (uint32_t retryCounter) |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1476 |
{ |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1477 |
double coefficient = CalculateAveragingCoefficient (); |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1478 |
m_failAvg = (double)retryCounter / (1 + (double) retryCounter) * (1.0 - coefficient) + coefficient * m_failAvg; |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1479 |
} |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1480 |
|
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1481 |
void |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1482 |
WifiRemoteStationInfo::NotifyTxFailed () |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1483 |
{ |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
1484 |
double coefficient = CalculateAveragingCoefficient (); |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1485 |
m_failAvg = (1.0 - coefficient) + coefficient * m_failAvg; |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1486 |
} |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1487 |
|
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1488 |
double |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1489 |
WifiRemoteStationInfo::GetFrameErrorRate () const |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1490 |
{ |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1491 |
return m_failAvg; |
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6067
diff
changeset
|
1492 |
} |
11066
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1493 |
|
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1494 |
WifiRemoteStation::~WifiRemoteStation () |
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1495 |
{ |
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1496 |
NS_LOG_FUNCTION (this); |
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1497 |
} |
d78d77e4b920
WifiRemoteStation needs virtual destructor for subclassing
Tom Henderson <tomh@tomh.org>
parents:
11064
diff
changeset
|
1498 |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
1499 |
} // namespace ns3 |