User Manual, Developers Guide and API Documentation

PERInformationBase.hpp

Go to the documentation of this file.
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_MANAGEMENT_PERINFORMATIONBASE_HPP
00030 #define WIFIMAC_MANAGEMENT_PERINFORMATIONBASE_HPP
00031 
00032 #include <WNS/ldk/ManagementServiceInterface.hpp>
00033 #include <WNS/logger/Logger.hpp>
00034 #include <WNS/SlidingWindow.hpp>
00035 #include <WNS/ldk/Compound.hpp>
00036 #include <WNS/service/dll/Address.hpp>
00037 #include <WNS/ldk/arq/statuscollector/Interface.hpp>
00038 
00039 namespace wifimac { namespace management {
00040 
00055     class PERInformationBase:
00056         public wns::ldk::ManagementService
00057     {
00058     public:
00060         PERInformationBase( wns::ldk::ManagementServiceRegistry*, const wns::pyconfig::View& config );
00062         virtual ~PERInformationBase() {};
00063 
00065         void reset(const wns::service::dll::UnicastAddress target);
00066 
00068         void onSuccessfullTransmission(const wns::service::dll::UnicastAddress target);
00069 
00071         void onFailedTransmission(const wns::service::dll::UnicastAddress target);
00072 
00079         bool knowsPER(const wns::service::dll::UnicastAddress target) const;
00080 
00082         double getPER(const wns::service::dll::UnicastAddress target) const;
00083 
00084         int
00085         getSuccessfull(const wns::service::dll::UnicastAddress receiver) const;
00086 
00087         int
00088         getFailed(const wns::service::dll::UnicastAddress receiver) const;
00089 
00090     private:
00092         void
00093         onMSRCreated();
00094 
00096         typedef wns::container::Registry<wns::service::dll::UnicastAddress, wns::SlidingWindow*> slidingWindowMap;
00097         typedef wns::container::Registry<wns::service::dll::UnicastAddress, int> intMap;
00098 
00100         slidingWindowMap perHolder;
00101 
00103         wns::logger::Logger logger;
00104 
00106         const simTimeType windowSize;
00107 
00110         const int minSamples;
00111 
00112         intMap successfull;
00113         intMap failed;
00114     };
00115 } // management
00116 } // wifimac
00117 
00118 #endif

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