![]() |
User Manual, Developers Guide and API Documentation |
![]() |
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_PER_HPP 00030 #define WIFIMAC_LOWERMAC_RATEADAPTATIONSTRATEGIES_PER_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 00037 #include <WNS/ldk/Key.hpp> 00038 #include <WNS/distribution/Uniform.hpp> 00039 #include <WNS/logger/Logger.hpp> 00040 00041 namespace wifimac { namespace lowerMAC { namespace rateAdaptationStrategies { 00042 00052 class PER: 00053 public IRateAdaptationStrategy 00054 { 00055 public: 00056 PER( 00057 const wns::pyconfig::View& config_, 00058 wns::service::dll::UnicastAddress _receiver, 00059 wifimac::management::PERInformationBase* _per, 00060 wifimac::management::SINRInformationBase* _sinr, 00061 wifimac::lowerMAC::Manager* _manager, 00062 wifimac::convergence::PhyUser* _phyUser, 00063 wns::logger::Logger* _logger); 00064 00065 wifimac::convergence::PhyMode 00066 getPhyMode(size_t numTransmissions) const ; 00067 00068 wifimac::convergence::PhyMode 00069 getPhyMode(size_t numTransmissions, 00070 const wns::Ratio lqm) const; 00071 00072 void 00073 setCurrentPhyMode(wifimac::convergence::PhyMode pm); 00074 00075 private: 00076 wifimac::management::PERInformationBase* per; 00077 00078 struct Friends 00079 { 00080 wifimac::convergence::PhyUser* phyUser; 00081 } friends; 00082 00083 const wns::service::dll::UnicastAddress myReceiver; 00084 const double perForGoingDown; 00085 const double perForGoingUp; 00086 00087 wns::logger::Logger* logger; 00088 00089 wifimac::convergence::PhyMode curPhyMode; 00090 }; 00091 }}} 00092 00093 #endif
1.5.5