User Manual, Developers Guide and API Documentation

FiniteStateMachine.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 TCP_FINITESTATEMACHINE_HPP
00029 #define TCP_FINITESTATEMACHINE_HPP
00030 
00031 #include <WNS/logger/Logger.hpp>
00032 
00033 #include <TCP/ConnectionControl.hpp>
00034 #include <TCP/ThreeWayHandshake.hpp>
00035 
00036 
00037 namespace tcp {
00038 
00039     class FiniteStateMachine :
00040         public ConnectionControlInterface
00041     {
00042     public:
00047         FiniteStateMachine(const ConnectionControlInterface::VariablesType& v, wns::logger::Logger _logger);
00048 
00054         void
00055         syn();
00056 
00057         void
00058         syn_ack();
00059 
00060         void
00061         ack();
00062 
00063         void
00064         fin();
00065 
00066         void
00067         rst();
00068 
00069         void
00070         fin_ack();
00071 
00072         tcp::ConnectionVariables&
00073         ConnectionVariables()
00074         {
00075             return getVariables();
00076         }
00077 
00081         wns::logger::Logger logger;
00082 
00083     private:
00088         FiniteStateMachine(FiniteStateMachine& _fsm) : ConnectionControlInterface(_fsm.getVariables()){}
00089     };
00090 } // namespace tcp
00091 
00092 #endif // NOT defined TCP_FINITESTATEMACHINE_HPP

Generated on Thu May 24 03:32:17 2012 for openWNS by  doxygen 1.5.5