author | Nicola Baldo <nbaldo@cttc.es> |
Fri, 06 May 2011 18:34:24 +0200 | |
changeset 7139 | 79dd02ed46ec |
parent 6852 | 8f1a53d3f6ca |
child 7141 | 072fb225b714 |
permissions | -rw-r--r-- |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
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 |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
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 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
20 |
#ifndef WIFI_REMOTE_STATION_MANAGER_H |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
21 |
#define WIFI_REMOTE_STATION_MANAGER_H |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
|
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
|
23 |
#include <vector> |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include <utility> |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
#include "ns3/mac48-address.h" |
6065 | 26 |
#include "ns3/traced-callback.h" |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
27 |
#include "ns3/packet.h" |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
28 |
#include "ns3/object.h" |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6065
diff
changeset
|
29 |
#include "ns3/nstime.h" |
1911
e24ae66c6918
use WifiMode rather than mode indexes in MacStations API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1908
diff
changeset
|
30 |
#include "wifi-mode.h" |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
|
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
32 |
namespace ns3 { |
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
33 |
|
6339 | 34 |
struct WifiRemoteStation; |
35 |
struct WifiRemoteStationState; |
|
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
36 |
class WifiPhy; |
6065 | 37 |
class WifiMacHeader; |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
38 |
|
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
39 |
/** |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
40 |
* \brief Tid independent remote station statistics |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
41 |
* |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
42 |
* Structure is similar to struct sta_info in Linux kernel (see |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
43 |
* net/mac80211/sta_info.h) |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
44 |
*/ |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
45 |
class WifiRemoteStationInfo |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
46 |
{ |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
47 |
public: |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
48 |
WifiRemoteStationInfo (); |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
49 |
/** |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
50 |
* \brief Updates average frame error rate when data or RTS |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
51 |
* was transmitted successfully. |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
52 |
* \param retryCounter is slrc or ssrc value at the moment of |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
53 |
* success transmission. |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
54 |
*/ |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
55 |
void NotifyTxSuccess (uint32_t retryCounter); |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
56 |
/// Updates average frame error rate when final data or RTS has failed. |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
57 |
void NotifyTxFailed (); |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
58 |
/// Returns frame error rate (probability that frame is corrupted due to transmission error). |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
59 |
double GetFrameErrorRate () const; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
60 |
private: |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
61 |
/** |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
62 |
* \brief Calculate averaging coefficient for frame error rate. Depends on time of the last update. |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
63 |
* \attention Calling this method twice gives different results, |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
64 |
* because it resets time of last update. |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
65 |
*/ |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
66 |
double CalculateAveragingCoefficient (); |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
67 |
///averaging coefficient depends on the memory time |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
68 |
Time m_memoryTime; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
69 |
///when last update has occured |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
70 |
Time m_lastUpdate; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
71 |
/// moving percentage of failed frames |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
72 |
double m_failAvg; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
73 |
}; |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
74 |
|
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
75 |
/** |
3154 | 76 |
* \brief hold a list of per-remote-station state. |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
77 |
* \ingroup wifi |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
78 |
* |
3154 | 79 |
* \sa ns3::WifiRemoteStation. |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
80 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
81 |
class WifiRemoteStationManager : public Object |
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
|
82 |
{ |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
public: |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
84 |
static TypeId GetTypeId (void); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
85 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
86 |
WifiRemoteStationManager (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
87 |
virtual ~WifiRemoteStationManager (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
88 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
89 |
virtual void SetupPhy (Ptr<WifiPhy> phy); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
90 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
91 |
uint32_t GetMaxSsrc (void) const; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
92 |
uint32_t GetMaxSlrc (void) const; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
93 |
uint32_t GetRtsCtsThreshold (void) const; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
94 |
uint32_t GetFragmentationThreshold (void) const; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
95 |
void SetMaxSsrc (uint32_t maxSsrc); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
96 |
void SetMaxSlrc (uint32_t maxSlrc); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
97 |
void SetRtsCtsThreshold (uint32_t threshold); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
98 |
void SetFragmentationThreshold (uint32_t threshold); |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
99 |
|
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
|
100 |
// Invoked in a STA upon dis-association |
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
|
101 |
// or in an AP upon reboot |
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
|
102 |
void Reset (void); |
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
|
103 |
// Invoked in a STA upon association to store |
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
|
104 |
// the set of rates which belong to the |
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
|
105 |
// BSSBasicRateSet of the associated AP |
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
|
106 |
// and which are supported locally. |
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
|
107 |
// Invoked in an AP to configure the BSSBasicRateSet |
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
|
108 |
void AddBasicMode (WifiMode mode); |
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
|
109 |
|
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
|
110 |
WifiMode GetDefaultMode (void) const; |
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
|
111 |
uint32_t GetNBasicModes (void) const; |
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
|
112 |
WifiMode GetBasicMode (uint32_t i) const; |
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
|
113 |
|
4324
951aec5a7b9a
bug 531: Adds NonUnicastMode attribute to WifiRemoteStationManager
Timo Bingmann <timo.bingmann@student.kit.edu>
parents:
3745
diff
changeset
|
114 |
WifiMode GetNonUnicastMode (void) const; |
951aec5a7b9a
bug 531: Adds NonUnicastMode attribute to WifiRemoteStationManager
Timo Bingmann <timo.bingmann@student.kit.edu>
parents:
3745
diff
changeset
|
115 |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
116 |
|
3154 | 117 |
/** |
118 |
* Invoked in an AP upon disassociation of a |
|
119 |
* specific STA. |
|
120 |
*/ |
|
6065 | 121 |
void Reset (Mac48Address address); |
3154 | 122 |
/** |
123 |
* Invoked in a STA or AP to store the set of |
|
124 |
* modes supported by a destination which is |
|
125 |
* also supported locally. |
|
126 |
* The set of supported modes includes |
|
127 |
* the BSSBasicRateSet. |
|
128 |
*/ |
|
6065 | 129 |
void 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
|
130 |
|
6065 | 131 |
bool IsBrandNew (Mac48Address address) const; |
132 |
bool IsAssociated (Mac48Address address) const; |
|
133 |
bool IsWaitAssocTxOk (Mac48Address address) const; |
|
134 |
void RecordWaitAssocTxOk (Mac48Address address); |
|
135 |
void RecordGotAssocTxOk (Mac48Address address); |
|
136 |
void RecordGotAssocTxFailed (Mac48Address address); |
|
137 |
void RecordDisassociated (Mac48Address address); |
|
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
138 |
|
3154 | 139 |
/** |
6166 | 140 |
* \param address remote address |
141 |
* \param header MAC header |
|
3154 | 142 |
* \param packet the packet to queue |
143 |
* \param fullPacketSize the size of the packet after its 802.11 MAC header has been added. |
|
144 |
* |
|
145 |
* This method is typically invoked just before queuing a packet for transmission. |
|
146 |
* It is a no-op unless the IsLowLatency attribute of the attached ns3::WifiRemoteStationManager |
|
147 |
* is set to false, in which case, the tx parameters of the packet are calculated and stored in |
|
148 |
* the packet as a tag. These tx parameters are later retrieved from GetDadaMode and GetRtsMode. |
|
149 |
*/ |
|
6065 | 150 |
void PrepareForQueue (Mac48Address address, const WifiMacHeader *header, |
151 |
Ptr<const Packet> packet, uint32_t fullPacketSize); |
|
3154 | 152 |
/** |
6166 | 153 |
* \param address remote address |
154 |
* \param header MAC header |
|
3154 | 155 |
* \param packet the packet to send |
156 |
* \param fullPacketSize the size of the packet after its 802.11 MAC header has been added. |
|
157 |
* \returns the transmission mode to use to send this packet |
|
158 |
*/ |
|
6065 | 159 |
WifiMode GetDataMode (Mac48Address address, const WifiMacHeader *header, |
160 |
Ptr<const Packet> packet, uint32_t fullPacketSize); |
|
3154 | 161 |
/** |
6166 | 162 |
* \param address remote address |
163 |
* \param header MAC header |
|
3154 | 164 |
* \param packet the packet to send |
165 |
* \returns the transmission mode to use to send the RTS prior to the |
|
166 |
* transmission of the data packet itself. |
|
167 |
*/ |
|
6065 | 168 |
WifiMode GetRtsMode (Mac48Address address, const WifiMacHeader *header, |
169 |
Ptr<const Packet> packet); |
|
3154 | 170 |
/** |
171 |
* Should be invoked whenever the RtsTimeout associated to a transmission |
|
172 |
* attempt expires. |
|
173 |
*/ |
|
6065 | 174 |
void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header); |
3154 | 175 |
/** |
176 |
* Should be invoked whenever the AckTimeout associated to a transmission |
|
177 |
* attempt expires. |
|
178 |
*/ |
|
6065 | 179 |
void ReportDataFailed (Mac48Address address, const WifiMacHeader *header); |
3154 | 180 |
/** |
181 |
* Should be invoked whenever we receive the Cts associated to an RTS |
|
182 |
* we just sent. |
|
183 |
*/ |
|
6065 | 184 |
void ReportRtsOk (Mac48Address address, const WifiMacHeader *header, |
185 |
double ctsSnr, WifiMode ctsMode, double rtsSnr); |
|
3154 | 186 |
/** |
187 |
* Should be invoked whenever we receive the Ack associated to a data packet |
|
188 |
* we just sent. |
|
189 |
*/ |
|
6065 | 190 |
void ReportDataOk (Mac48Address address, const WifiMacHeader *header, |
191 |
double ackSnr, WifiMode ackMode, double dataSnr); |
|
3154 | 192 |
/** |
193 |
* Should be invoked after calling ReportRtsFailed if |
|
194 |
* NeedRtsRetransmission returns false |
|
195 |
*/ |
|
6065 | 196 |
void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header); |
3154 | 197 |
/** |
198 |
* Should be invoked after calling ReportDataFailed if |
|
199 |
* NeedDataRetransmission returns false |
|
200 |
*/ |
|
6065 | 201 |
void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header); |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
202 |
|
3154 | 203 |
/** |
6166 | 204 |
* \param address remote address |
205 |
* \param header MAC header |
|
3154 | 206 |
* \param rxSnr the snr of the packet received |
207 |
* \param txMode the transmission mode used for the packet received. |
|
208 |
* |
|
209 |
* Should be invoked whenever a packet is successfully received. |
|
210 |
*/ |
|
6065 | 211 |
void ReportRxOk (Mac48Address address, const WifiMacHeader *header, |
212 |
double rxSnr, WifiMode txMode); |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
213 |
|
3154 | 214 |
/** |
6166 | 215 |
* \param address remote address |
216 |
* \param header MAC header |
|
3154 | 217 |
* \param packet the packet to send |
218 |
* \returns true if we want to use an RTS/CTS handshake for this |
|
219 |
* packet before sending it, false otherwise. |
|
220 |
*/ |
|
6065 | 221 |
bool NeedRts (Mac48Address address, const WifiMacHeader *header, |
222 |
Ptr<const Packet> packet); |
|
3154 | 223 |
/** |
6166 | 224 |
* \param address remote address |
225 |
* \param header MAC header |
|
3154 | 226 |
* \param packet the packet to send |
227 |
* \returns true if we want to restart a failed RTS/CTS |
|
228 |
* handshake, false otherwise. |
|
229 |
*/ |
|
6065 | 230 |
bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, |
231 |
Ptr<const Packet> packet); |
|
3154 | 232 |
/** |
6166 | 233 |
* \param address remote address |
234 |
* \param header MAC header |
|
3154 | 235 |
* \param packet the packet to send |
236 |
* \returns true if we want to resend a packet |
|
237 |
* after a failed transmission attempt, false otherwise. |
|
238 |
*/ |
|
6065 | 239 |
bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, |
240 |
Ptr<const Packet> packet); |
|
2784
49006cbbfac7
GetMaxSsrc -> NeedRtsTransmission and GetMaxSlrc -> NeedDataRetransmission
Federico Maguolo <maguolof@dei.unipd.it>
parents:
2602
diff
changeset
|
241 |
|
3154 | 242 |
/** |
6166 | 243 |
* \param address remote address |
244 |
* \param header MAC header |
|
3185
c859e129a934
fix dox warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3154
diff
changeset
|
245 |
* \param packet the packet to send |
3154 | 246 |
* \returns true if this packet should be fragmented, false otherwise. |
247 |
*/ |
|
6065 | 248 |
bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header, |
249 |
Ptr<const Packet> packet); |
|
3154 | 250 |
/** |
6166 | 251 |
* \param address remote address |
252 |
* \param header MAC header |
|
3185
c859e129a934
fix dox warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3154
diff
changeset
|
253 |
* \param packet the packet to send |
3154 | 254 |
* \param fragmentNumber the fragment index of the next fragment to send (starts at zero). |
255 |
* \returns the size of the corresponding fragment. |
|
256 |
*/ |
|
6065 | 257 |
uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header, |
258 |
Ptr<const Packet> packet, uint32_t fragmentNumber); |
|
3154 | 259 |
/** |
6166 | 260 |
* \param address remote address |
261 |
* \param header MAC header |
|
3185
c859e129a934
fix dox warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3154
diff
changeset
|
262 |
* \param packet the packet to send |
3154 | 263 |
* \param fragmentNumber the fragment index of the next fragment to send (starts at zero). |
3745
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3185
diff
changeset
|
264 |
* \returns the offset within the original packet where this fragment starts. |
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3185
diff
changeset
|
265 |
*/ |
6065 | 266 |
uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header, |
267 |
Ptr<const Packet> packet, uint32_t fragmentNumber); |
|
3745
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3185
diff
changeset
|
268 |
/** |
6166 | 269 |
* \param address remote address |
270 |
* \param header MAC header |
|
3745
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3185
diff
changeset
|
271 |
* \param packet the packet to send |
73e7bb607014
bug 372: fragmentation is broken
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3185
diff
changeset
|
272 |
* \param fragmentNumber the fragment index of the next fragment to send (starts at zero). |
3154 | 273 |
* \returns true if this is the last fragment, false otherwise. |
274 |
*/ |
|
6065 | 275 |
bool IsLastFragment (Mac48Address address, const WifiMacHeader *header, |
276 |
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
|
277 |
|
3154 | 278 |
/** |
6166 | 279 |
* \param address remote address |
3154 | 280 |
* \param rtsMode the transmission mode used to send an RTS we just received |
281 |
* \returns the transmission mode to use for the CTS to complete the RTS/CTS |
|
282 |
* handshake. |
|
283 |
*/ |
|
6065 | 284 |
WifiMode GetCtsMode (Mac48Address address, WifiMode rtsMode); |
3154 | 285 |
/** |
6166 | 286 |
* \param address |
3185
c859e129a934
fix dox warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3154
diff
changeset
|
287 |
* \param dataMode the transmission mode used to send an ACK we just received |
3154 | 288 |
* \returns the transmission mode to use for the ACK to complete the data/ACK |
289 |
* handshake. |
|
290 |
*/ |
|
6065 | 291 |
WifiMode GetAckMode (Mac48Address address, WifiMode dataMode); |
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
292 |
|
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
293 |
WifiRemoteStationInfo GetInfo (Mac48Address address); |
6065 | 294 |
protected: |
295 |
virtual void DoDispose (void); |
|
296 |
// for convenience |
|
297 |
WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const; |
|
298 |
uint32_t GetNSupported (const WifiRemoteStation *station) const; |
|
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
299 |
private: |
6065 | 300 |
/** |
301 |
* \param station the station with which we need to communicate |
|
302 |
* \param packet the packet to send |
|
303 |
* \param normally indicates whether the normal 802.11 rts enable mechanism would |
|
304 |
* request that the rts is sent or not. |
|
305 |
* \returns true if we want to use an RTS/CTS handshake for this |
|
306 |
* packet before sending it, false otherwise. |
|
307 |
* |
|
308 |
* Note: This method is called before a unicast packet is sent on the medium. |
|
309 |
*/ |
|
310 |
virtual bool DoNeedRts (WifiRemoteStation *station, |
|
311 |
Ptr<const Packet> packet, bool normally); |
|
312 |
/** |
|
313 |
* \param station the station with which we need to communicate |
|
314 |
* \param packet the packet to send |
|
315 |
* \param normally indicates whether the normal 802.11 rts enable mechanism would |
|
316 |
* request that the rts is retransmitted or not. |
|
317 |
* \returns true if we want to restart a failed RTS/CTS |
|
318 |
* handshake, false otherwise. |
|
319 |
* |
|
320 |
* Note: This method is called after an rts/cts handshake has been attempted |
|
321 |
* and has failed. |
|
322 |
*/ |
|
323 |
virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station, |
|
324 |
Ptr<const Packet> packet, bool normally); |
|
325 |
/** |
|
326 |
* \param station the station with which we need to communicate |
|
327 |
* \param packet the packet to send |
|
328 |
* \param normally indicates whether the normal 802.11 data retransmission mechanism |
|
329 |
* would request that the data is retransmitted or not. |
|
330 |
* \returns true if we want to resend a packet |
|
331 |
* after a failed transmission attempt, false otherwise. |
|
332 |
* |
|
333 |
* Note: This method is called after a unicast packet transmission has been attempted |
|
334 |
* and has failed. |
|
335 |
*/ |
|
336 |
virtual bool DoNeedDataRetransmission (WifiRemoteStation *station, |
|
337 |
Ptr<const Packet> packet, bool normally); |
|
338 |
||
339 |
/** |
|
340 |
* \param station the station with which we need to communicate |
|
341 |
* \param packet the packet to send |
|
342 |
* \param normally indicates whether the normal 802.11 data fragmentation mechanism |
|
343 |
* would request that the data packet is fragmented or not. |
|
344 |
* \returns true if this packet should be fragmented, false otherwise. |
|
345 |
* |
|
346 |
* Note: This method is called before sending a unicast packet. |
|
347 |
*/ |
|
348 |
virtual bool DoNeedFragmentation (WifiRemoteStation *station, |
|
349 |
Ptr<const Packet> packet, bool normally); |
|
350 |
/** |
|
351 |
* \returns whether this manager is a manager designed to work in low-latency |
|
352 |
* environments. |
|
353 |
* |
|
354 |
* Note: In this context, low vs high latency is defined in <i>IEEE 802.11 Rate Adaptation: |
|
355 |
* A Practical Approach</i>, by M. Lacage, M.H. Manshaei, and T. Turletti. |
|
356 |
*/ |
|
357 |
virtual bool IsLowLatency (void) const = 0; |
|
358 |
/** |
|
359 |
* \return a new station data structure |
|
360 |
*/ |
|
6339 | 361 |
virtual WifiRemoteStation *DoCreateStation (void) const = 0; |
6065 | 362 |
/** |
363 |
* \param station the station with which we need to communicate |
|
364 |
* \param size size of the packet or fragment we want to send |
|
365 |
* \returns the transmission mode to use to send a packet to the station |
|
366 |
* |
|
367 |
* Note: This method is called before sending a unicast packet or a fragment |
|
368 |
* of a unicast packet to decide which transmission mode to use. |
|
369 |
*/ |
|
370 |
virtual WifiMode DoGetDataMode (WifiRemoteStation *station, |
|
371 |
uint32_t size) = 0; |
|
372 |
/** |
|
373 |
* \param station the station with which we need to communicate |
|
374 |
* \returns the transmission mode to use to send an rts to the station |
|
375 |
* |
|
376 |
* Note: This method is called before sending an rts to a station |
|
377 |
* to decide which transmission mode to use for the rts. |
|
378 |
*/ |
|
379 |
virtual WifiMode DoGetRtsMode (WifiRemoteStation *station) = 0; |
|
380 |
virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0; |
|
381 |
virtual void DoReportDataFailed (WifiRemoteStation *station) = 0; |
|
382 |
virtual void DoReportRtsOk (WifiRemoteStation *station, |
|
383 |
double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0; |
|
384 |
virtual void DoReportDataOk (WifiRemoteStation *station, |
|
385 |
double ackSnr, WifiMode ackMode, double dataSnr) = 0; |
|
386 |
virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0; |
|
387 |
virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0; |
|
388 |
virtual void DoReportRxOk (WifiRemoteStation *station, |
|
389 |
double rxSnr, WifiMode txMode) = 0; |
|
390 |
||
391 |
WifiRemoteStationState *LookupState (Mac48Address address) const; |
|
392 |
WifiRemoteStation *Lookup (Mac48Address address, uint8_t tid) const; |
|
6071
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
393 |
/// Find a remote station by its remote address and TID taken from MAC header |
6a25c600c450
tweak slightly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
6070
diff
changeset
|
394 |
WifiRemoteStation *Lookup (Mac48Address address, const WifiMacHeader *header) const; |
6065 | 395 |
WifiMode GetControlAnswerMode (Mac48Address address, WifiMode reqMode); |
396 |
uint32_t GetNFragments (Ptr<const Packet> packet); |
|
397 |
||
398 |
typedef std::vector <WifiRemoteStation *> Stations; |
|
399 |
typedef std::vector <WifiRemoteStationState *> StationStates; |
|
400 |
||
401 |
StationStates m_states; |
|
402 |
Stations m_stations; |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
403 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
404 |
* This is a pointer to the WifiPhy associated with this |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
405 |
* WifiRemoteStationManager that is set on call to |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
406 |
* WifiRemoteStationManager::SetupPhy(). Through this pointer the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
407 |
* station manager can determine PHY characteristics, such as the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
408 |
* set of all transmission rates that may be supported (the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
409 |
* "DeviceRateSet"). |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
410 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
411 |
Ptr<WifiPhy> m_wifiPhy; |
6065 | 412 |
WifiMode m_defaultTxMode; |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
413 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
414 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
415 |
* This member is the list of WifiMode objects that comprise the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
416 |
* BSSBasicRateSet parameter. This list is constructed through calls |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
417 |
* to WifiRemoteStationManager::AddBasicMode(), and an API that |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
418 |
* allows external access to it is available through |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
419 |
* WifiRemoteStationManager::GetNBasicModes() and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
420 |
* WifiRemoteStationManager::GetBasicMode(). |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
421 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
422 |
WifiModeList m_bssBasicRateSet; |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
423 |
|
6065 | 424 |
bool m_isLowLatency; |
425 |
uint32_t m_maxSsrc; |
|
426 |
uint32_t m_maxSlrc; |
|
427 |
uint32_t m_rtsCtsThreshold; |
|
428 |
uint32_t m_fragmentationThreshold; |
|
429 |
WifiMode m_nonUnicastMode; |
|
430 |
double m_avgSlrcCoefficient; |
|
431 |
/** |
|
432 |
* The trace source fired when the transmission of a single RTS has failed |
|
433 |
*/ |
|
434 |
TracedCallback<Mac48Address> m_macTxRtsFailed; |
|
435 |
/** |
|
436 |
* The trace source fired when the transmission of a single data packet has failed |
|
437 |
*/ |
|
438 |
TracedCallback<Mac48Address> m_macTxDataFailed; |
|
439 |
/** |
|
440 |
* The trace source fired when the transmission of a RTS has |
|
441 |
* exceeded the maximum number of attempts |
|
442 |
*/ |
|
443 |
TracedCallback<Mac48Address> m_macTxFinalRtsFailed; |
|
444 |
/** |
|
445 |
* The trace source fired when the transmission of a data packet has |
|
446 |
* exceeded the maximum number of attempts |
|
447 |
*/ |
|
448 |
TracedCallback<Mac48Address> m_macTxFinalDataFailed; |
|
449 |
||
450 |
}; |
|
451 |
||
452 |
struct WifiRemoteStationState |
|
453 |
{ |
|
454 |
enum |
|
455 |
{ |
|
456 |
BRAND_NEW, |
|
457 |
DISASSOC, |
|
458 |
WAIT_ASSOC_TX_OK, |
|
459 |
GOT_ASSOC_TX_OK |
|
460 |
} m_state; |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
461 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
462 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
463 |
* This member is the list of WifiMode objects that comprise the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
464 |
* OperationalRateSet parameter for this remote station. This list |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
465 |
* is constructed through calls to |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
466 |
* WifiRemoteStationManager::AddSupportedMode(), and an API that |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
467 |
* allows external access to it is available through |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
468 |
* WifiRemoteStationManager::GetNSupported() and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
469 |
* WifiRemoteStationManager::GetSupported(). |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
470 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
471 |
WifiModeList m_operationalRateSet; |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6339
diff
changeset
|
472 |
|
4733
96a3881940c4
new trace sources for WifiRemoteStationManager
Nicola Baldo <nbaldo@cttc.es>
parents:
4692
diff
changeset
|
473 |
Mac48Address m_address; |
6069
c21754b56036
change airtime metric to work with new wifi remote station manager
Kirill Andreev <andreev@iitp.ru>
parents:
6065
diff
changeset
|
474 |
WifiRemoteStationInfo m_info; |
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
475 |
}; |
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
476 |
|
6065 | 477 |
/** |
478 |
* \brief hold per-remote-station state. |
|
479 |
* |
|
480 |
* The state in this class is used to keep track |
|
481 |
* of association status if we are in an infrastructure |
|
482 |
* network and to perform the selection of tx parameters |
|
483 |
* on a per-packet basis. |
|
484 |
*/ |
|
485 |
struct WifiRemoteStation |
|
486 |
{ |
|
6339 | 487 |
WifiRemoteStationState *m_state; |
6065 | 488 |
uint32_t m_ssrc; |
489 |
uint32_t m_slrc; |
|
490 |
uint8_t m_tid; |
|
491 |
}; |
|
492 |
||
493 |
||
1906
c0901f40bd7e
move mac-station code in mac-stations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1893
diff
changeset
|
494 |
} // namespace ns3 |
1893
d72388b06b22
add MacStations to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
495 |
|
6065 | 496 |
#endif /* WIFI_REMOTE_STATION_MANAGER_H */ |