InetUnderlayConfigurator.h

Go to the documentation of this file.
00001 //
00002 // This program is free software; you can redistribute it and/or
00003 // modify it under the terms of the GNU General Public License
00004 // as published by the Free Software Foundation; either version 2
00005 // of the License, or (at your option) any later version.
00006 //
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU General Public License for more details.
00011 //
00012 // You should have received a copy of the GNU General Public License
00013 // along with this program; if not, write to the Free Software
00014 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00015 //
00016 
00022 #ifndef __IPV4UNDERLAYCONFIGURATOR_H__
00023 #define __IPV4UNDERLAYCONFIGURATOR_H__
00024 
00025 #include <vector>
00026 #include <deque>
00027 #include <set>
00028 
00029 #include <omnetpp.h>
00030 
00031 #include <UnderlayConfigurator.h>
00032 
00033 class IPvXAddress;
00034 
00041 class InetUnderlayConfigurator : public UnderlayConfigurator
00042 {
00043 public:
00050     TransportAddress* createNode(NodeType type, bool initialize=false);
00051 
00058     void preKillNode(NodeType type, TransportAddress* addr=NULL);
00059 
00066     void migrateNode(NodeType type, TransportAddress* addr=NULL);
00067 
00068 private:
00069     // parameters
00070     int accessRouterNum; 
00071     int overlayAccessRouterNum; 
00072     int overlayTerminalNum; 
00074 protected:
00075 
00083     void initializeUnderlay(int stage);
00084 
00090     void handleTimerEvent(cMessage* msg);
00091 
00095     void finishUnderlay();
00096 
00100     void setDisplayString();
00101     std::vector<cModule*> accessNode; 
00102     std::deque<IPvXAddress> killList; 
00103     std::set<int> scheduledID; 
00104 
00105     // statistics
00106     int numCreated; 
00107     int numKilled; 
00108 };
00109 
00119 double uniform2(double start, double end, double index, double new_calc);
00120 
00130 double intuniform2(double start, double end, double index, double new_calc);
00131 
00132 
00133 #endif
Generated on Wed May 26 16:21:14 2010 for OverSim by  doxygen 1.6.3