![]() |
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_SINRWITHMIMOINFORMATIONBASE_HPP 00030 #define WIFIMAC_DRAFTN_SINRWITHMIMOINFORMATIONBASE_HPP 00031 00032 #include <WIFIMAC/management/SINRInformationBase.hpp> 00033 00034 00035 namespace wifimac { namespace draftn { 00036 00040 class SINRwithMIMOInformationBase: 00041 public wifimac::management::SINRInformationBase 00042 { 00043 public: 00044 typedef std::map<unsigned int, std::vector<wns::Ratio> > NumSSToFactorMap; 00045 typedef wns::container::Registry<wns::service::dll::UnicastAddress, NumSSToFactorMap*> AddressToFactorsMap; 00046 00048 SINRwithMIMOInformationBase( wns::ldk::ManagementServiceRegistry* msr, 00049 const wns::pyconfig::View& config ); 00050 00052 virtual ~SINRwithMIMOInformationBase() 00053 {}; 00054 00055 void 00056 putFactorMeasurement(const wns::service::dll::UnicastAddress tx, 00057 const std::vector<wns::Ratio> sinrFactor); 00058 00059 bool 00060 knowsMeasuredFactor(const wns::service::dll::UnicastAddress tx, 00061 unsigned int numSS) const; 00062 00063 std::vector<wns::Ratio> 00064 getMeasuredFactor(const wns::service::dll::UnicastAddress tx, 00065 unsigned int numSS) const; 00066 00067 void 00068 putPeerFactor(const wns::service::dll::UnicastAddress peer, 00069 const std::vector<wns::Ratio> factor); 00070 bool 00071 knowsPeerFactor(const wns::service::dll::UnicastAddress peer, 00072 unsigned int numSS) const; 00073 00074 std::vector<wns::Ratio> 00075 getPeerFactor(const wns::service::dll::UnicastAddress peer, 00076 unsigned int numSS) const; 00077 00078 void 00079 putFakePeerMIMOFactors(const wns::service::dll::UnicastAddress peer, 00080 NumSSToFactorMap allFactors); 00081 00082 NumSSToFactorMap 00083 getAllMeasuredFactors(const wns::service::dll::UnicastAddress peer) const; 00084 private: 00085 00086 void 00087 onMSRCreated(); 00088 00089 AddressToFactorsMap factorsMeasurement; 00090 AddressToFactorsMap peerFactors; 00091 00092 typedef std::pair<NumSSToFactorMap, wns::simulator::Time> FactorsTimePair; 00093 typedef wns::container::Registry<wns::service::dll::UnicastAddress, FactorsTimePair*> AddressToFactorsTimeMap; 00094 AddressToFactorsTimeMap fakePeerFactors; 00095 00097 wns::logger::Logger logger; 00098 00099 }; 00100 00101 } // draftn 00102 } // wifimac 00103 00104 #endif // WIFIMAC_DRAFTN_SINRWITHMIMOINFORMATIONBASE_HPP
1.5.5