![]() |
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_DRAFTN_RATEADAPTATIONSTRATEGIES_PERWITHMIMO_HPP 00030 #define WIFIMAC_DRAFTN_RATEADAPTATIONSTRATEGIES_PERWITHMIMO_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 00042 namespace wifimac { namespace draftn { namespace rateAdaptationStrategies { 00043 00056 class PERwithMIMO: 00057 public wifimac::lowerMAC::rateAdaptationStrategies::IRateAdaptationStrategy 00058 { 00059 public: 00060 PERwithMIMO( 00061 const wns::pyconfig::View& config_, 00062 wns::service::dll::UnicastAddress _receiver, 00063 wifimac::management::PERInformationBase* _per, 00064 wifimac::management::SINRInformationBase* _sinr, 00065 wifimac::lowerMAC::Manager* _manager, 00066 wifimac::convergence::PhyUser* _phyUser, 00067 wns::logger::Logger* _logger); 00068 00069 wifimac::convergence::PhyMode 00070 getPhyMode(size_t numTransmissions) const; 00071 00072 wifimac::convergence::PhyMode 00073 getPhyMode(size_t numTransmissions, 00074 const wns::Ratio lqm) const; 00075 00076 void 00077 setCurrentPhyMode(wifimac::convergence::PhyMode pm); 00078 00079 private: 00080 void 00081 reducePhyMode(wifimac::convergence::PhyMode& pm, unsigned int maxNumSS) const; 00082 00083 void 00084 increasePhyMode(wifimac::convergence::PhyMode& pm, unsigned int maxNumSS) const; 00085 00086 wifimac::management::PERInformationBase* per; 00087 00088 struct Friends 00089 { 00090 wifimac::convergence::PhyUser* phyUser; 00091 wifimac::lowerMAC::Manager* manager; 00092 } friends; 00093 00094 const double perForGoingDown; 00095 const double perForGoingUp; 00096 const unsigned int phyModeIncreaseOnAntennaDecrease; 00097 const unsigned int phyModeDecreaseOnAntennaIncrease; 00098 const wns::service::dll::UnicastAddress myReceiver; 00099 00100 wns::logger::Logger* logger; 00101 00102 wifimac::convergence::PhyMode curPhyMode; 00103 }; 00104 }}} 00105 00106 #endif
1.5.5