![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2007 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #ifndef WNS_LDK_PROBE_WINDOW_HPP 00029 #define WNS_LDK_PROBE_WINDOW_HPP 00030 00031 #include <WNS/ldk/fu/Plain.hpp> 00032 #include <WNS/ldk/Forwarding.hpp> 00033 00034 #include <WNS/events/PeriodicTimeout.hpp> 00035 #include <WNS/pyconfig/View.hpp> 00036 #include <WNS/logger/Logger.hpp> 00037 00038 #include <WNS/ldk/probe/Probe.hpp> 00039 #include <WNS/SlidingWindow.hpp> 00040 #include <WNS/probe/bus/ContextCollector.hpp> 00041 00042 namespace wns { namespace ldk { namespace probe { 00043 00044 class Window; 00045 00046 class WindowCommand : 00047 public Command 00048 { 00049 public: 00050 struct {} local; 00051 struct {} peer; 00052 00053 struct { 00054 Window* probingFU; 00055 } magic; 00056 }; 00057 00062 class Window : 00063 public Probe, 00064 public fu::Plain<Window, WindowCommand>, 00065 public Forwarding<Window>, 00066 public events::PeriodicTimeout 00067 { 00068 public: 00069 Window(fun::FUN* fuNet, const wns::pyconfig::View& config); 00070 virtual ~Window(); 00071 00072 // Processor interface 00073 virtual void processOutgoing(const CompoundPtr& compound); 00074 virtual void processIncoming(const CompoundPtr& compound); 00075 00076 protected: 00077 void periodically(); 00078 00079 private: 00080 simTimeType sampleInterval; 00081 00082 wns::probe::bus::ContextCollectorPtr bitsIncomingBus; 00083 wns::probe::bus::ContextCollectorPtr compoundsIncomingBus; 00084 wns::probe::bus::ContextCollectorPtr bitsOutgoingBus; 00085 wns::probe::bus::ContextCollectorPtr compoundsOutgoingBus; 00086 wns::probe::bus::ContextCollectorPtr bitsAggregatedBus; 00087 wns::probe::bus::ContextCollectorPtr compoundsAggregatedBus; 00088 00089 SlidingWindow cumulatedBitsIncoming; 00090 SlidingWindow cumulatedPDUsIncoming; 00091 00092 SlidingWindow cumulatedBitsOutgoing; 00093 SlidingWindow cumulatedPDUsOutgoing; 00094 00095 SlidingWindow aggregatedThroughputInBit; 00096 SlidingWindow aggregatedThroughputInPDUs; 00097 00098 logger::Logger logger; 00099 }; 00100 00101 }}} 00102 00103 #endif // NOT defined WNS_LDK_PROBE_WINDOW_HPP 00104 00105
1.5.5