User Manual, Developers Guide and API Documentation

ARFwithMIMO.hpp

Go to the documentation of this file.
00001 /******************************************************************************
00002  * WiFiMac                                                                    *
00003  * This file is part of openWNS (open Wireless Network Simulator)
00004  * _____________________________________________________________________________
00005  *
00006  * Copyright (C) 2004-2007
00007  * Chair of Communication Networks (ComNets)
00008  * Kopernikusstr. 16, D-52074 Aachen, Germany
00009  * phone: ++49-241-80-27910,
00010  * fax: ++49-241-80-22242
00011  * email: info@openwns.org
00012  * www: http://www.openwns.org
00013  * _____________________________________________________________________________
00014  *
00015  * openWNS is free software; you can redistribute it and/or modify it under the
00016  * terms of the GNU Lesser General Public License version 2 as published by the
00017  * Free Software Foundation;
00018  *
00019  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00020  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00021  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00022  * details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00026  *
00027  ******************************************************************************/
00028 
00029 #ifndef WIFIMAC_LOWERMAC_RATEADAPTATIONSTRATEGIES_ARFWITHMIMO_HPP
00030 #define WIFIMAC_LOWERMAC_RATEADAPTATIONSTRATEGIES_ARFWITHMIMO_HPP
00031 
00032 #include <WIFIMAC/lowerMAC/rateAdaptationStrategies/IRateAdaptationStrategy.hpp>
00033 #include <WIFIMAC/convergence/PhyUser.hpp>
00034 #include <WIFIMAC/convergence/PhyMode.hpp>
00035 #include <WIFIMAC/lowerMAC/Manager.hpp>
00036 #include <WIFIMAC/draftn/SINRwithMIMOInformationBase.hpp>
00037 
00038 #include <WNS/ldk/Key.hpp>
00039 #include <WNS/distribution/Uniform.hpp>
00040 #include <WNS/logger/Logger.hpp>
00041 #include <WNS/events/CanTimeout.hpp>
00042 
00043 namespace wifimac { namespace draftn { namespace rateAdaptationStrategies {
00044 
00054     class ARFwithMIMO:
00055         public wifimac::lowerMAC::rateAdaptationStrategies::IRateAdaptationStrategy,
00056         public wns::events::CanTimeout
00057     {
00058     public:
00059         ARFwithMIMO(
00060             const wns::pyconfig::View& config_,
00061             wns::service::dll::UnicastAddress receiver,
00062             wifimac::management::PERInformationBase* _per,
00063             wifimac::management::SINRInformationBase* _sinr,
00064             wifimac::lowerMAC::Manager* _manager,
00065             wifimac::convergence::PhyUser* _phyUser,
00066             wns::logger::Logger* _logger);
00067 
00068         wifimac::convergence::PhyMode
00069         getPhyMode(size_t numTransmissions) const;
00070 
00071         wifimac::convergence::PhyMode
00072         getPhyMode(size_t numTransmissions,
00073                    const wns::Ratio lqm) const;
00074 
00075         void
00076         setCurrentPhyMode(wifimac::convergence::PhyMode pm);
00077 
00078     private:
00079         void
00080         onTimeout();
00081 
00082         void
00083         reducePhyMode();
00084 
00085         void
00086         increasePhyMode();
00087 
00088         wifimac::management::PERInformationBase* per;
00089         const wns::simulator::Time arfTimer;
00090         const bool exponentialBackoff;
00091         const int initialSuccessThreshold;
00092         const int maxSuccessThreshold;
00093         const wns::service::dll::UnicastAddress myReceiver;
00094 
00095         int successThreshold;
00096         bool probePacket;
00097 
00098         struct Friends
00099         {
00100             wifimac::convergence::PhyUser* phyUser;
00101             wifimac::lowerMAC::Manager* manager;
00102         } friends;
00103 
00104         wns::logger::Logger* logger;
00105 
00106         std::vector<wifimac::convergence::PhyMode> pmList;
00107         int curPhyModeId;
00108         bool timeout;
00109     };
00110 }}}
00111 
00112 #endif

Generated on Mon May 21 03:32:11 2012 for openWNS by  doxygen 1.5.5