User Manual, Developers Guide and API Documentation

UpperConvergence.hpp

Go to the documentation of this file.
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 IP_UPPERCONVERGENCE_HPP
00029 #define IP_UPPERCONVERGENCE_HPP
00030 
00031 #include <IP/IPHeader.hpp>
00032 
00033 #include <WNS/logger/Logger.hpp>
00034 #include <WNS/service/nl/Address.hpp>
00035 #include <WNS/service/nl/Service.hpp>
00036 #include <WNS/service/nl/DataHandler.hpp>
00037 #include <WNS/service/dll/FlowID.hpp>
00038 #include <WNS/ldk/CommandTypeSpecifier.hpp>
00039 #include <WNS/ldk/HasConnector.hpp>
00040 #include <WNS/ldk/HasReceptor.hpp>
00041 #include <WNS/ldk/HasDeliverer.hpp>
00042 #include <WNS/ldk/Forwarding.hpp>
00043 #include <WNS/ldk/Command.hpp>
00044 
00045 
00046 namespace ip {
00047 
00054     class UpperConvergence:
00055         public virtual wns::service::nl::Service,
00056         public virtual wns::service::nl::Notification,
00057         public wns::ldk::CommandTypeSpecifier<>,
00058         public wns::ldk::HasReceptor<>,
00059         public wns::ldk::HasConnector<>,
00060         public wns::ldk::HasDeliverer<>,
00061         public wns::ldk::Forwarding<UpperConvergence>,
00062         public wns::Cloneable<UpperConvergence>
00063     {
00064         typedef wns::service::nl::Address Address;
00065 
00066     public:
00073         UpperConvergence(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& _pyco);
00074 
00075         virtual void
00076         onFUNCreated();
00077 
00084         virtual void
00085         sendData(
00086             const wns::service::nl::Address& _source,
00087             const wns::service::nl::Address& _peer,
00088             const wns::osi::PDUPtr& _sdu,
00089             wns::service::nl::protocolNumber _protocol,
00090             wns::service::dll::FlowID _dllFlowID = 0);
00091 
00095         virtual void
00096         registerHandler(
00097             wns::service::nl::protocolNumber _protocol, 
00098             wns::service::nl::DataHandler* dh);
00099 
00103         virtual void
00104         processIncoming(const wns::ldk::CompoundPtr& compound);
00105 
00109         virtual const wns::service::nl::Address&
00110         getAddress() const;
00111 
00112         void
00113         setSourceAddress(wns::service::nl::Address src);
00114 
00115     private:
00119         wns::pyconfig::View pyco;
00120 
00124         wns::logger::Logger log;
00125 
00130         Address sourceAddress;
00131 
00135         typedef wns::container::Registry<wns::service::nl::protocolNumber, wns::service::nl::DataHandler*> DataHandlerContainer;
00136 
00140         DataHandlerContainer handlerRegistry;
00141 
00142         wns::ldk::CommandReaderInterface* ipHeaderReader;
00143 
00144         IPHeader* ipHeaderFU;
00145     };
00146 
00147 
00148 } // ip
00149 #endif // IP_UPPERCONVERGENCE_HPP
00150 
00151 

Generated on Sun May 27 03:31:37 2012 for openWNS by  doxygen 1.5.5