![]() |
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_BUS_WINDOW_HPP 00029 #define WNS_LDK_PROBE_BUS_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/probe/bus/ContextCollector.hpp> 00040 #include <WNS/SlidingWindow.hpp> 00041 00042 namespace wns { namespace ldk { namespace probe { namespace bus { 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 bitsIncoming; 00083 wns::probe::bus::ContextCollectorPtr compoundsIncoming; 00084 wns::probe::bus::ContextCollectorPtr bitsOutgoing; 00085 wns::probe::bus::ContextCollectorPtr compoundsOutgoing; 00086 wns::probe::bus::ContextCollectorPtr bitsAggregated; 00087 wns::probe::bus::ContextCollectorPtr compoundsAggregated; 00088 wns::probe::bus::ContextCollectorPtr relativeBitsGoodput; 00089 wns::probe::bus::ContextCollectorPtr relativeCompoundsGoodput; 00090 00091 SlidingWindow cumulatedBitsIncoming; 00092 SlidingWindow cumulatedPDUsIncoming; 00093 00094 SlidingWindow cumulatedBitsOutgoing; 00095 SlidingWindow cumulatedPDUsOutgoing; 00096 00097 SlidingWindow aggregatedThroughputInBit; 00098 SlidingWindow aggregatedThroughputInPDUs; 00099 00100 logger::Logger logger; 00101 }; 00102 00103 }}}} 00104 00105 #endif // NOT defined WNS_LDK_PROBE_BUS_WINDOW_HPP 00106 00107
1.5.5