![]() |
User Manual, Developers Guide and API Documentation |
![]() |
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_CONVERGENCE_NETWORKSTATEPROBE_HPP 00030 #define WIFIMAC_CONVERGENCE_NETWORKSTATEPROBE_HPP 00031 00032 #include <WIFIMAC/convergence/TxDurationSetter.hpp> 00033 00034 #include <WNS/ldk/fu/Plain.hpp> 00035 #include <WNS/ldk/Processor.hpp> 00036 #include <WNS/ldk/Command.hpp> 00037 #include <WNS/logger/Logger.hpp> 00038 00039 #include <WNS/ldk/probe/Probe.hpp> 00040 #include <WNS/probe/bus/ContextCollector.hpp> 00041 #include <WNS/probe/bus/ContextProvider.hpp> 00042 #include <WNS/events/CanTimeout.hpp> 00043 00044 namespace wifimac { namespace convergence { 00045 00046 class NetworkStateProbeCommand : 00047 public wns::ldk::EmptyCommand 00048 { 00049 }; 00050 00055 class NetworkStateProbe: 00056 public wns::ldk::fu::Plain<NetworkStateProbe, NetworkStateProbeCommand>, 00057 public wns::ldk::Processor<NetworkStateProbe>, 00058 public wns::ldk::probe::Probe, 00059 public wns::events::CanTimeout 00060 { 00061 00062 public: 00063 NetworkStateProbe(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config); 00064 virtual ~NetworkStateProbe(); 00065 00066 private: 00068 void 00069 processIncoming(const wns::ldk::CompoundPtr& compound); 00070 void 00071 processOutgoing(const wns::ldk::CompoundPtr& compound); 00072 00077 void onTimeout(); 00078 00079 wns::logger::Logger logger; 00080 00082 std::string txDurationProviderCommandName; 00083 00085 wns::probe::bus::ContextCollectorPtr localNetworkState; 00086 00088 wns::probe::bus::contextprovider::Variable* isTx; 00089 00090 wns::ldk::CompoundPtr curTxCompound; 00091 wns::simulator::Time curFrameTxDuration; 00092 }; 00093 00094 } // ns convergence 00095 } // ns wifimac 00096 00097 #endif //WIFIMAC_CONVERGENCER_NETWORKSTATEPROBE_HPP
1.5.5