User Manual, Developers Guide and API Documentation

FTP.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 APPLICATIONS_SESSION_CLIENT_FTP_HPP
00029 #define APPLICATIONS_SESSION_CLIENT_FTP_HPP
00030 
00031 #include <APPLICATIONS/session/client/Session.hpp>
00032 
00033 namespace applications { namespace session { namespace client {
00034 
00035       /* FTPStates are used to see Sessionphase */
00036       enum ClientFTPState
00037     {
00038       reading = 1,
00039       requestftpok = 2,
00040       waitforftpok = 3,
00041       waitforusernameok = 4,
00042       waitforpasswordok = 5,
00043       requestdata = 6
00044     };
00045 
00046       class FTP :
00047     public applications::session::client::Session
00048       {
00049       public:
00050     FTP(const wns::pyconfig::View& _pyco);
00051     ~FTP();
00052 
00053     void
00054     onData(const wns::osi::PDUPtr& _pdu);
00055 
00056     void
00057     onTimeout(const Timeout& _t);
00058 
00059       private:
00060     applications::session::client::ClientFTPState ftpState;
00061 
00062     /* According to "IEEE 802.16m Evaluation Methodology Document(2009), Page 110-111, section 10.2"
00063        the mean size of one packet is 2MB and the maximumsize of one packet is 5MB. The values are
00064        Lognormal distributed. */
00065     wns::distribution::Distribution* amountOfDataDistribution;
00066 
00067     /* According to "IEEE 802.16m Evaluation Methodology Document(2009), Page 110-111,
00068        section 10.2" the mean readingtime of one received file is 180sec.. The values are
00069        Exponential distributed. */
00070     wns::distribution::Distribution* readingTimeDistribution;
00071 
00072     /* Number of files client wants to download. The client first uploads one file and than requests two files.*/
00073     int numberOfFiles;
00074 
00075     /* PacketSize of the requested file. */
00076     Bit filePacketSize;
00077 
00078     bool request;
00079       };
00080     } // namespace client
00081   } // namespace session
00082 } // namespace applications
00083 
00084 #endif //APPLICATIONS_SESSION_CLIENT_FTP_HPP

Generated on Sun May 27 03:32:16 2012 for openWNS by  doxygen 1.5.5