ChurnGenerator.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)
00003 //
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU General Public License
00006 // as published by the Free Software Foundation; either version 2
00007 // of the License, or (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 //
00018 
00024 #ifndef __CHURNGENERATOR_H_
00025 #define __CHURNGENERATOR_H_
00026 
00027 #define MAX_NODETYPES 100
00028 
00029 #include <string>
00030 #include <vector>
00031 #include <omnetpp.h>
00032 
00033 #include <InitStages.h>
00034 
00035 class UnderlayConfigurator;
00036 
00042 class NodeType
00043 {
00044     public:
00045         NodeType() : typeID(0) {};
00046         uint32_t typeID;
00047         std::string overlayType, tier1Type, tier2Type, tier3Type;
00048         std::string terminalType;
00049         std::vector<std::string> channelTypes;
00050 };
00051 
00052 
00057 class ChurnGenerator : public cSimpleModule
00058 {
00059     public:
00060         virtual int numInitStages() const { return MAX_STAGE_UNDERLAY + 1; }
00061         virtual void initialize(int stage);
00062         virtual void initializeChurn() = 0;
00063         virtual void handleMessage(cMessage* msg) = 0;
00064         void setNodeType(NodeType t) { type = t; }
00065         bool init; 
00066         int terminalCount; 
00067 
00068     protected:
00069         UnderlayConfigurator* underlayConfigurator;
00070         virtual void updateDisplayString() = 0;
00071         int targetOverlayTerminalNum; 
00072         NodeType type; 
00073 };
00074 
00075 #endif

Generated on Wed Mar 25 16:32:48 2009 for OverSim by  doxygen 1.5.5