![]() |
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_LOWERCONVERGENCE_HPP 00029 #define TCP_LOWERCONVERGENCE_HPP 00030 00031 #include <WNS/service/tl/FlowID.hpp> 00032 #include <WNS/service/nl/DataHandler.hpp> 00033 #include <WNS/service/nl/Service.hpp> 00034 #include <WNS/service/dll/FlowID.hpp> 00035 #include <WNS/ldk/CommandTypeSpecifier.hpp> 00036 #include <WNS/ldk/HasReceptor.hpp> 00037 #include <WNS/ldk/HasConnector.hpp> 00038 #include <WNS/ldk/HasDeliverer.hpp> 00039 #include <WNS/pyconfig/View.hpp> 00040 00041 namespace tcp { 00042 00043 class Service; 00044 00045 class LowerConvergence : 00046 virtual public wns::ldk::FunctionalUnit, 00047 public wns::ldk::CommandTypeSpecifier<>, 00048 public wns::ldk::HasReceptor<>, 00049 public wns::ldk::HasConnector<>, 00050 public wns::ldk::HasDeliverer<>, 00051 public wns::Cloneable<LowerConvergence> 00052 { 00053 public: 00054 typedef wns::container::Registry<wns::service::tl::FlowID, wns::service::dll::FlowID> FlowIDMapping; 00055 00056 LowerConvergence(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& _config); 00057 00058 virtual 00059 ~LowerConvergence(); 00060 00061 // CompoundHandlerInterface 00062 virtual void 00063 doSendData(const wns::ldk::CompoundPtr& compound); 00064 00065 virtual void 00066 doOnData(const wns::ldk::CompoundPtr& compound); 00067 00068 virtual void 00069 onFUNCreated(); 00070 00071 virtual void 00072 setDataTransmissionService(wns::service::nl::Service* service); 00073 00078 void 00079 setProtocolNumber(wns::service::nl::protocolNumber _protocolNumber); 00080 00084 void 00085 setTLService(Service* _tlService); 00086 00087 void 00088 mapFlowID(wns::service::tl::FlowID flowID, wns::service::dll::FlowID dllFlowID); 00089 00090 void 00091 unmapFlowID(wns::service::tl::FlowID flowID); 00092 00093 private: 00098 wns::service::nl::Service* 00099 getDataTransmissionService() const; 00100 00101 // CompoundHandlerInterface 00102 virtual bool 00103 doIsAccepting(const wns::ldk::CompoundPtr& compound) const; 00104 00105 virtual void 00106 doWakeup(); 00107 00111 wns::service::nl::Service* dataTransmissionService; 00112 00113 wns::pyconfig::View config; 00114 00115 Service* tlService; 00116 00117 wns::logger::Logger logger; 00118 00119 struct Friends { 00120 FunctionalUnit* upperConvergence; 00121 } friends; 00122 00128 wns::service::nl::protocolNumber protocolNumber; 00129 00130 FlowIDMapping flowIDMapper; 00131 00132 wns::ldk::CommandReaderInterface* tcpHeaderReader; 00133 }; 00134 00135 } // namespace tcp 00136 00137 #endif // NOT defined TCP_LOWERCONVERGENCE_HPP
1.5.5