User Manual, Developers Guide and API Documentation

TahoeCongAvoid.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_TAHOECONGAVOID_HPP
00029 #define TCP_TAHOECONGAVIOD_HPP
00030 
00031 #include <WNS/logger/Logger.hpp>
00032 #include <WNS/pyconfig/View.hpp>
00033 
00034 #include <WNS/container/Registry.hpp>
00035 
00036 #include <TCP/CongestionControlStrategy.hpp>
00037 
00038 
00039 namespace tcp {
00040 
00041     class TahoeCongAvoid :
00042         virtual public CongestionAvoidanceStrategy
00043     {
00044 
00045     public:
00046         TahoeCongAvoid(const wns::pyconfig::View& _pyco);
00047 
00048         virtual
00049         ~TahoeCongAvoid();
00050 
00054         virtual void
00055         onSegmentLoss(segmentLoss _sl, unsigned long int _ackNR);
00056 
00057         virtual void
00058         onRTTSample();
00059 
00060         virtual unsigned long int
00061         getWindowSize();
00062 
00063         virtual simTimeType
00064         getRetransmissionTimeout();
00065 
00066         virtual void
00067         onSegmentAcknowledged();
00068 
00069         virtual void
00070         setWindowSize(unsigned long int new_cwnd);
00071 
00072         virtual bool
00073         duplicateACKThresholdReached(unsigned long int _ackNR);
00074 
00075         virtual void
00076         clearDuplicateACKCounter();
00077 
00078     private:
00079         std::string
00080         printReason(segmentLoss reason);
00081 
00082         wns::pyconfig::View pyco;
00083 
00087         unsigned long int cwnd;
00088 
00093         unsigned long int cwnd_cnt;
00094 
00098         wns::logger::Logger logger;
00099 
00103         simTimeType timeout;
00104 
00108         int ndup;
00109 
00114         wns::container::Registry<unsigned long int, int> countDuplicateACKs;
00115     };
00116 } // namespace tcp
00117 
00118 
00119 #endif // NOT defined TCP_TAHOECONGAVOID_HPP

Generated on Sat May 26 03:32:17 2012 for openWNS by  doxygen 1.5.5