![]() |
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 #ifndef WNS_LDK_BOTTLENECKDETECTIVE_HPP 00028 #define WNS_LDK_BOTTLENECKDETECTIVE_HPP 00029 00030 #include <WNS/ldk/Processor.hpp> 00031 #include <WNS/ldk/FunctionalUnit.hpp> 00032 #include <WNS/ldk/CommandTypeSpecifier.hpp> 00033 #include <WNS/ldk/HasReceptor.hpp> 00034 #include <WNS/ldk/HasConnector.hpp> 00035 #include <WNS/ldk/HasDeliverer.hpp> 00036 #include <WNS/Cloneable.hpp> 00037 #include <WNS/events/PeriodicTimeout.hpp> 00038 #include <WNS/logger/Logger.hpp> 00039 00040 #include <WNS/pyconfig/View.hpp> 00041 00042 #include <map> 00043 00044 namespace wns { namespace ldk { namespace tools { 00045 00046 class BottleNeckDetective; 00047 00048 class BottleNeckDetectiveCommand : 00049 public Command 00050 { 00051 public: 00052 explicit 00053 BottleNeckDetectiveCommand(); 00054 00055 virtual 00056 ~BottleNeckDetectiveCommand(); 00057 00058 struct {} local; 00059 struct { 00060 } peer; 00061 struct { 00062 BottleNeckDetective* sender; 00063 long long int id; 00064 } magic; 00065 }; 00066 00070 class BottleNeckDetective : 00071 virtual public FunctionalUnit, 00072 virtual public Processor<BottleNeckDetective>, 00073 public wns::ldk::CommandTypeSpecifier<BottleNeckDetectiveCommand>, 00074 public wns::ldk::HasReceptor<>, 00075 public wns::ldk::HasConnector<>, 00076 public wns::ldk::HasDeliverer<>, 00077 public wns::Cloneable<BottleNeckDetective>, 00078 public wns::events::PeriodicTimeout 00079 { 00080 typedef std::map<long int, CompoundPtr> CompoundContainer; 00081 public: 00082 explicit 00083 BottleNeckDetective(fun::FUN* fuNet, const wns::pyconfig::View& config); 00084 00085 virtual 00086 ~BottleNeckDetective(); 00087 00088 // 00089 // interface 00090 // 00091 virtual void 00092 processIncoming(const CompoundPtr& compound); 00093 00094 virtual void 00095 processOutgoing(const CompoundPtr& compound); 00096 00097 virtual void 00098 periodically(); 00099 00100 private: 00101 long long int id; 00102 CompoundContainer compounds; 00103 logger::Logger logger; 00104 }; // BottleNeckDetective 00105 00106 } // tools 00107 } // ldk 00108 } // wns 00109 00110 00111 #endif // NOT defined WNS_LDK_BOTTLENECKDETECTIVE_HPP 00112 00113
1.5.5