00001 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2005,2006 INRIA 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> 00019 */ 00020 #ifndef AARF_MAC_STATIONS_H 00021 #define AARF_MAC_STATIONS_H 00022 00023 #include "arf-wifi-manager.h" 00024 00025 namespace ns3 { 00026 00027 /** 00028 * \brief AARF Rate control algorithm 00029 * 00030 * This class implements the AARF rate control algorithm which 00031 * was initially described in <i>IEEE 802.11 Rate Adaptation: 00032 * A Practical Approach</i>, by M. Lacage, M.H. Manshaei, and 00033 * T. Turletti. 00034 */ 00035 class AarfWifiManager : public ArfWifiManager 00036 { 00037 public: 00038 static TypeId GetTypeId (void); 00039 AarfWifiManager (); 00040 virtual ~AarfWifiManager (); 00041 private: 00042 virtual class WifiRemoteStation *CreateStation (void); 00043 uint32_t m_minTimerThreshold; 00044 uint32_t m_minSuccessThreshold; 00045 double m_successK; 00046 uint32_t m_maxSuccessThreshold; 00047 double m_timerK; 00048 }; 00049 00050 class AarfWifiRemoteStation : public ArfWifiRemoteStation 00051 { 00052 public: 00053 AarfWifiRemoteStation (Ptr<AarfWifiManager> stations, 00054 uint32_t minTimerThreshold, 00055 uint32_t minSuccessThreshold, 00056 double successK, 00057 uint32_t maxSuccessThreshold, 00058 double timerK); 00059 virtual ~AarfWifiRemoteStation (); 00060 00061 private: 00062 virtual void ReportRecoveryFailure (void); 00063 virtual void ReportFailure (void); 00064 00065 double m_successK; 00066 uint32_t m_maxSuccessThreshold; 00067 double m_timerK; 00068 }; 00069 00070 } // namespace ns3 00071 00072 00073 #endif /* AARF_MAC_STATIONS_H */