User Manual, Developers Guide and API Documentation

PhyModeProvider.hpp

Go to the documentation of this file.
00001 /******************************************************************************
00002  * WiMeMac                                                                    *
00003  * This file is part of openWNS (open Wireless Network Simulator)
00004  * _____________________________________________________________________________
00005  *
00006  * Copyright (C) 2004-2011
00007  * Chair of Communication Networks (ComNets)
00008  * Kopernikusstr. 5, 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 WIMEMAC_CONVERGENCE_PHYMODEPROVIDER_HPP
00030 #define WIMEMAC_CONVERGENCE_PHYMODEPROVIDER_HPP
00031 
00032 #include <WIMEMAC/convergence/PhyMode.hpp>
00033 
00034 #include <WNS/PowerRatio.hpp>
00035 
00036 namespace wimemac { namespace convergence {
00037 
00047     class PhyModeProvider {
00048     public:
00049         PhyModeProvider(const wns::pyconfig::View& config);
00050 
00054         void mcsUp(PhyMode& pm) const;
00058         void mcsDown(PhyMode& pm) const;
00059 
00063         bool hasLowestMCS(const PhyMode& pm) const;
00064 
00068         bool hasHighestMCS(const PhyMode& pm) const;
00069 
00074         PhyMode getPreamblePhyMode(PhyMode pmFrame) const;
00075         PhyMode getPreamblePhyMode() const;
00076 
00077         PhyMode getDefaultPhyMode() const;
00078 
00080         MCS getMCS(wns::Ratio SINR) const;
00081 
00083         wns::Ratio getMinSINR() const;
00084 
00085     private:
00086         std::map<wns::Ratio, MCS> sinr2mcs;
00087 
00088         wns::Ratio switchingPointOffset;
00089 
00090         PhyMode defaultPhyMode;
00091         PhyMode preamblePhyMode;
00092     };
00093 }}
00094 
00095 #endif // WIMEMAC_CONVERGENCE_PHYMODEPROVIDER_HPP

Generated on Sun May 27 03:32:06 2012 for openWNS by  doxygen 1.5.5