author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 03 Mar 2008 01:58:57 +0100 | |
changeset 2542 | a9b88fdc09d6 |
parent 2059 | d8b7b2de044e |
permissions | -rw-r--r-- |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2005,2006 INRIA |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* |
6c2d6a5631bc
add more files 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 |
6c2d6a5631bc
add more files 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 |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* |
6c2d6a5631bc
add more files 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, |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* |
6c2d6a5631bc
add more files 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 |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
6c2d6a5631bc
add more files 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 |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
*/ |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
#ifndef AARF_MAC_STATIONS_H |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
#define AARF_MAC_STATIONS_H |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#include "arf-mac-stations.h" |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
namespace ns3 { |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
|
2059 | 27 |
/** |
28 |
* \brief AARF Rate control algorithm |
|
29 |
* |
|
30 |
* This class implements the AARF rate control algorithm which |
|
31 |
* was initially described in <i>IEEE 802.11 Rate Adaptation: |
|
32 |
* A Practical Approach</i>, by M. Lacage, M.H. Manshaei, and |
|
33 |
* T. Turletti. |
|
34 |
*/ |
|
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
class AarfMacStations : public ArfMacStations { |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
36 |
public: |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
37 |
AarfMacStations (WifiMode defaultTxMode, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
38 |
uint32_t minTimerThreshold, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
39 |
uint32_t minSuccessThreshold, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
40 |
double successK, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
41 |
uint32_t maxSuccessThreshold, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
42 |
double timerK); |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
43 |
virtual ~AarfMacStations (); |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
44 |
private: |
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:
1918
diff
changeset
|
45 |
virtual class MacStation *CreateStation (void); |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
46 |
uint32_t m_minTimerThreshold; |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
47 |
uint32_t m_minSuccessThreshold; |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
48 |
double m_successK; |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
49 |
uint32_t m_maxSuccessThreshold; |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
50 |
double m_timerK; |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
51 |
}; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
53 |
class AarfMacStation : public ArfMacStation |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
54 |
{ |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
55 |
public: |
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:
1918
diff
changeset
|
56 |
AarfMacStation (AarfMacStations *stations, |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
57 |
uint32_t minTimerThreshold, |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
58 |
uint32_t minSuccessThreshold, |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
59 |
double successK, |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
60 |
uint32_t maxSuccessThreshold, |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
61 |
double timerK); |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
62 |
virtual ~AarfMacStation (); |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
63 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
64 |
private: |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
65 |
virtual void ReportRecoveryFailure (void); |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
66 |
virtual void ReportFailure (void); |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
67 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
68 |
double m_successK; |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1930
diff
changeset
|
69 |
uint32_t m_maxSuccessThreshold; |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
70 |
double m_timerK; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
71 |
}; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
72 |
|
1918
fee53ba3f388
port to new MacStation API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1895
diff
changeset
|
73 |
} // namespace ns3 |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
74 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
76 |
#endif /* AARF_MAC_STATIONS_H */ |