User Manual, Developers Guide and API Documentation

Connection.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. 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 SIMPLETL_CONNECTION_HPP
00029 #define SIMPLETL_CONNECTION_HPP
00030 
00031 #include <SIMPLETL/PDU.hpp>
00032 #include <WNS/service/tl/Connection.hpp>
00033 #include <WNS/service/tl/ConnectionHandler.hpp>
00034 #include <WNS/service/nl/Address.hpp>
00035 #include <WNS/service/tl/FlowID.hpp>
00036 #include <WNS/logger/Logger.hpp>
00037 
00038 
00039 namespace simpletl {
00040 
00047     class Connection : public wns::service::tl::Connection
00048     {
00049     public:
00050         Connection(wns::service::tl::ConnectionHandler*, wns::service::tl::FlowID, Bit);
00051         ~Connection();
00052 
00058         virtual void registerDataHandler(wns::service::tl::DataHandler* _dh);
00059 
00065         virtual void sendData(const wns::osi::PDUPtr&);
00066 
00072         void receiveData(const simpletl::PDUPtr&);
00073 
00077         wns::service::tl::ConnectionHandler* getConnectionHandler();
00078 
00082         void setPeer(Connection*);
00083 
00087         Connection* getPeer();
00088 
00092         wns::service::tl::FlowID getFlowID();
00093 
00098         wns::service::tl::FlowID swappedFlowID();
00099 
00100     private:
00104         wns::service::tl::DataHandler* datahandler;
00105 
00110         wns::service::tl::ConnectionHandler* connectionhandler;
00111 
00115         Connection* peer;
00116 
00121         wns::service::tl::FlowID flowID;
00122 
00126         Bit headerSize;
00127 
00132         wns::events::scheduler::Interface* eventscheduler;
00133 
00137         double channelcapacity;
00138 
00142         wns::logger::Logger logger;
00143     };
00144 }
00145 
00146 #endif // SIMPLETL_CONNECTION_HPP

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