![]() |
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 #include <WIFIMAC/lowerMAC/rateAdaptationStrategies/Constant.hpp> 00030 00031 using namespace wifimac::lowerMAC::rateAdaptationStrategies; 00032 00033 STATIC_FACTORY_REGISTER_WITH_CREATOR(Constant, IRateAdaptationStrategy, "Constant", IRateAdaptationStrategyCreator); 00034 00035 Constant::Constant(const wns::pyconfig::View& _config, 00036 wns::service::dll::UnicastAddress _receiver, 00037 wifimac::management::PERInformationBase* _per, 00038 wifimac::management::SINRInformationBase* _sinr, 00039 wifimac::lowerMAC::Manager* _manager, 00040 wifimac::convergence::PhyUser* _phyUser, 00041 wns::logger::Logger* _logger): 00042 IRateAdaptationStrategy(_config, _receiver, _per, _sinr, _manager, _phyUser, _logger), 00043 myPM(_config.getView("phyMode")) 00044 { 00045 friends.phyUser = _phyUser; 00046 } 00047 00048 wifimac::convergence::PhyMode 00049 Constant::getPhyMode(size_t /*numTransmissions*/) const 00050 { 00051 return(this->myPM); 00052 } 00053 00054 wifimac::convergence::PhyMode 00055 Constant::getPhyMode(size_t /*numTransmissions*/, const wns::Ratio /*lqm*/) const 00056 { 00057 return(this->myPM); 00058 } 00059 00060 void 00061 Constant::setCurrentPhyMode(wifimac::convergence::PhyMode pm) 00062 { 00063 // do nothing, be CONSTANT! 00064 };
1.5.5