![]() |
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 #ifndef WIFIMAC_LOWERMAC_RATEADAPTATION 00029 #define WIFIMAC_LOWERMAC_RATEADAPTATION 00030 00031 #include <WIFIMAC/lowerMAC/rateAdaptationStrategies/IRateAdaptationStrategy.hpp> 00032 #include <WIFIMAC/lowerMAC/Manager.hpp> 00033 #include <WIFIMAC/lowerMAC/ITransmissionCounter.hpp> 00034 #include <WIFIMAC/convergence/PhyUser.hpp> 00035 #include <WIFIMAC/convergence/PhyMode.hpp> 00036 #include <WIFIMAC/management/SINRInformationBase.hpp> 00037 #include <WIFIMAC/management/PERInformationBase.hpp> 00038 00039 #include <WNS/ldk/fu/Plain.hpp> 00040 #include <WNS/ldk/Processor.hpp> 00041 00042 #include <WNS/pyconfig/View.hpp> 00043 #include <WNS/logger/Logger.hpp> 00044 00045 namespace wifimac { namespace lowerMAC { 00046 00054 class RateAdaptation: 00055 public wns::ldk::fu::Plain<RateAdaptation, wns::ldk::EmptyCommand>, 00056 public wns::ldk::Processor<RateAdaptation> 00057 { 00058 public: 00059 RateAdaptation(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config); 00060 ~RateAdaptation(); 00061 00062 wifimac::convergence::PhyMode 00063 getPhyMode(wns::service::dll::UnicastAddress receiver, size_t numTransmissions); 00064 00065 wifimac::convergence::PhyMode 00066 getPhyMode(const wns::ldk::CompoundPtr& compound); 00067 00068 00069 00070 private: 00071 void 00072 onFUNCreated(); 00073 00075 void processIncoming(const wns::ldk::CompoundPtr& compound); 00076 void processOutgoing(const wns::ldk::CompoundPtr& compound); 00077 00078 const std::string phyUserName; 00079 const std::string managerName; 00080 const std::string arqName; 00081 const std::string sinrMIBServiceName; 00082 const std::string perMIBServiceName; 00083 00085 const bool raForACKFrames; 00086 00090 typedef wns::container::Registry<wns::service::dll::UnicastAddress, 00091 wifimac::lowerMAC::rateAdaptationStrategies::IRateAdaptationStrategy*, 00092 wns::container::registry::DeleteOnErase> rxRateMap; 00093 rxRateMap rateAdaptation; 00094 00095 struct Friends 00096 { 00097 wifimac::lowerMAC::Manager* manager; 00098 wifimac::convergence::PhyUser* phyUser; 00099 wifimac::lowerMAC::ITransmissionCounter* arq; 00100 } friends; 00101 00102 wifimac::management::SINRInformationBase* sinrMIB; 00103 wifimac::management::PERInformationBase* perMIB; 00104 00105 const wns::pyconfig::View config; 00106 wns::logger::Logger logger; 00107 00108 }; // RateAdaptation 00109 } // lowerMAC 00110 } // wifimac 00111 00112 #endif
1.5.5