1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
|
2 /* |
|
3 * Copyright (c) 2005,2006 INRIA |
|
4 * |
|
5 * This program is free software; you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License version 2 as |
|
7 * published by the Free Software Foundation; |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU General Public License |
|
15 * along with this program; if not, write to the Free Software |
|
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 * |
|
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
19 */ |
|
20 #ifndef AARF_MAC_STATIONS_H |
|
21 #define AARF_MAC_STATIONS_H |
|
22 |
|
23 #include "arf-mac-stations.h" |
|
24 |
|
25 namespace ns3 { |
|
26 |
|
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 */ |
|
35 class AarfMacStations : public ArfMacStations { |
|
36 public: |
|
37 AarfMacStations (WifiMode defaultTxMode, |
|
38 uint32_t minTimerThreshold, |
|
39 uint32_t minSuccessThreshold, |
|
40 double successK, |
|
41 uint32_t maxSuccessThreshold, |
|
42 double timerK); |
|
43 virtual ~AarfMacStations (); |
|
44 private: |
|
45 virtual class MacStation *CreateStation (void); |
|
46 uint32_t m_minTimerThreshold; |
|
47 uint32_t m_minSuccessThreshold; |
|
48 double m_successK; |
|
49 uint32_t m_maxSuccessThreshold; |
|
50 double m_timerK; |
|
51 }; |
|
52 |
|
53 class AarfMacStation : public ArfMacStation |
|
54 { |
|
55 public: |
|
56 AarfMacStation (AarfMacStations *stations, |
|
57 uint32_t minTimerThreshold, |
|
58 uint32_t minSuccessThreshold, |
|
59 double successK, |
|
60 uint32_t maxSuccessThreshold, |
|
61 double timerK); |
|
62 virtual ~AarfMacStation (); |
|
63 |
|
64 private: |
|
65 virtual void ReportRecoveryFailure (void); |
|
66 virtual void ReportFailure (void); |
|
67 |
|
68 double m_successK; |
|
69 uint32_t m_maxSuccessThreshold; |
|
70 double m_timerK; |
|
71 }; |
|
72 |
|
73 } // namespace ns3 |
|
74 |
|
75 |
|
76 #endif /* AARF_MAC_STATIONS_H */ |
|