![]() |
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. 16, 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 TCP_ONEWAYHANDSHAKE_HPP 00029 #define TCP_ONEWAYHANDSHAKE_HPP 00030 00031 #include <TCP/HandshakeStrategyInterface.hpp> 00032 00033 #include <WNS/logger/Logger.hpp> 00034 00035 #include <WNS/service/nl/Service.hpp> 00036 00037 #include <WNS/ldk/CommandTypeSpecifier.hpp> 00038 #include <WNS/ldk/HasConnector.hpp> 00039 #include <WNS/ldk/HasReceptor.hpp> 00040 #include <WNS/ldk/HasDeliverer.hpp> 00041 #include <WNS/ldk/FunctionalUnit.hpp> 00042 00043 00044 namespace tcp { 00045 00046 class Service; 00047 class HandshakeStrategyHandlerInterface; 00048 00055 class OneWayHandshake : 00056 public virtual HandshakeStrategyInterface, 00057 public virtual wns::ldk::FunctionalUnit, 00058 public wns::ldk::CommandTypeSpecifier<>, 00059 public wns::ldk::HasReceptor<>, 00060 public wns::ldk::HasConnector<>, 00061 public wns::ldk::HasDeliverer<>, 00062 public wns::Cloneable<OneWayHandshake> 00063 { 00064 public: 00065 OneWayHandshake(wns::ldk::fun::FUN* _fun, const wns::pyconfig::View& _pyco); 00066 00070 virtual 00071 ~OneWayHandshake(); 00072 00076 virtual bool 00077 doIsAccepting(const wns::ldk::CompoundPtr& _compound) const; 00078 00083 virtual void 00084 onFUNCreated(); 00085 00089 virtual void 00090 doOnData(const wns::ldk::CompoundPtr& _compound); 00091 00095 virtual void 00096 doSendData(const wns::ldk::CompoundPtr& _compound); 00097 00101 virtual void 00102 activeOpen(const wns::service::tl::FlowID& _flowID); 00103 00107 virtual void 00108 passiveOpen(const wns::service::tl::FlowID& _flowID); 00109 00113 virtual void 00114 closeConnection(const wns::service::tl::FlowID& _flowID); 00115 00119 virtual void 00120 registerStrategyHandler(HandshakeStrategyHandlerInterface* _strategyHandler); 00121 00122 private: 00123 bool 00124 doIsAccepting(const wns::ldk::CompoundPtr& _compound); 00125 00126 void 00127 doWakeup(); 00128 00132 wns::logger::Logger logger; 00133 00137 HandshakeStrategyHandlerInterface* strategyHandler; 00138 00142 wns::pyconfig::View config; 00143 00144 wns::ldk::fun::FUN* fun; 00145 00146 }; 00147 } // namespace tcp 00148 00149 #endif // NOT defined TCP_ONEWAYHANDSHAKE_HPP
1.5.5