User Manual, Developers Guide and API Documentation

HopContextWindowProbe.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_HELPER_HOPCONTEXTWINDOWPROBE_HPP
00030 #define WIFIMAC_HELPER_HOPCONTEXTWINDOWPROBE_HPP
00031 
00032 #include <WNS/ldk/probe/bus/Window.hpp>
00033 #include <WNS/probe/bus/ContextCollector.hpp>
00034 #include <WNS/SlidingWindow.hpp>
00035 #include <WNS/ldk/CommandReaderInterface.hpp>
00036 #include <WNS/container/Registry.hpp>
00037 
00038 #include <vector>
00039 
00040 namespace wifimac { namespace helper {
00041 
00048     class HopContextWindowProbe:
00049         public wns::ldk::probe::bus::Window
00050     {
00051         typedef wns::container::Registry<int, wns::SlidingWindow*, wns::container::registry::DeleteOnErase> SlidingWindowMap;
00052 
00053     public:
00054         HopContextWindowProbe(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config);
00055         virtual ~HopContextWindowProbe();
00056 
00057         // Processor interface
00058         virtual void processIncoming(const wns::ldk::CompoundPtr& compound);
00059 
00060     private:
00061         virtual void onFUNCreated();
00062 
00065         void
00066         putProbe(SlidingWindowMap& probeHolder, unsigned int numHops, double value);
00067 
00069         void
00070         periodically();
00071 
00074         void
00075         storeProbes(SlidingWindowMap& probeHolder, wns::probe::bus::ContextCollectorPtr& putter);
00076 
00077         wns::pyconfig::View config_;
00078 
00080         wns::ldk::CommandReaderInterface* forwardingReader;
00081 
00083         const simTimeType windowSize;
00084 
00087         wns::probe::bus::ContextCollectorPtr hopCountedBitsIncoming;
00088         wns::probe::bus::ContextCollectorPtr hopCountedBitsAggregated;
00089         wns::probe::bus::ContextCollectorPtr hopCountedCompoundsIncoming;
00090         wns::probe::bus::ContextCollectorPtr hopCountedCompoundsAggregated;
00091 
00094         SlidingWindowMap bitsIncomingProbeHolder;
00095         SlidingWindowMap bitsAggregatedProbeHolder;
00096         SlidingWindowMap compoundsIncomingProbeHolder;
00097         SlidingWindowMap compoundsAggregatedProbeHolder;
00098 
00099     };
00100 
00101 } // Helper
00102 } // WiFiMac
00103 
00104 #endif 

Generated on Thu May 24 03:32:08 2012 for openWNS by  doxygen 1.5.5