User Manual, Developers Guide and API Documentation

SubGenerator.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 CONSTANZE_SUBGENERATOR_HPP
00029 #define CONSTANZE_SUBGENERATOR_HPP
00030 
00031 #include <CONSTANZE/Generator.hpp>
00032 #include <WNS/events/CanTimeout.hpp>
00033 #include <WNS/pyconfig/View.hpp>
00034 #include <WNS/logger/Logger.hpp>
00035 #include <WNS/distribution/Distribution.hpp>
00036 
00037 namespace constanze
00038 {
00039 
00046     class SubGenerator :
00047         protected wns::events::CanTimeout
00048     {
00049     public:
00050 
00055         explicit SubGenerator(constanze::GeneratorBase* _master, const wns::pyconfig::View& _pyco);
00056 
00060         explicit SubGenerator(constanze::GeneratorBase* _master, wns::logger::Logger& _log, wns::distribution::Distribution* _interArrivalTimeDistribution, wns::distribution::Distribution* _packetSizeDistribution, double _rateScale);
00061 
00062         virtual ~SubGenerator();
00063 
00067         virtual void reconfigLogger(wns::logger::Logger& _log);
00068 
00074         virtual void reconfig(wns::distribution::Distribution* _interArrivalTimeDistribution, wns::distribution::Distribution* _packetSizeDistribution);
00075 
00079         virtual void start();
00080 
00084         virtual void stop();
00085 
00086     private:
00090         virtual void onTimeout();
00091 
00095         wns::distribution::Distribution* interArrivalTimeDistribution;
00096 
00100         wns::distribution::Distribution* packetSizeDistribution;
00101 
00105         wns::logger::Logger log;
00106 
00110         constanze::GeneratorBase* master;
00111 
00116         //constanze::Binding* binding;
00117 
00121         double rateScale;
00122 
00123     }; // SubGenerator
00124 
00125 } // constanze
00126 
00127 #endif // NOT defined CONSTANZE_SUBGENERATOR_HPP
00128 
00129 

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