OverSim
|
Configurator module for the InetUnderlay. More...
#include <InetUnderlayConfigurator.h>
Public Member Functions | |
TransportAddress * | createNode (NodeType type, bool initialize=false) |
Creates an overlay node. | |
void | preKillNode (NodeType type, TransportAddress *addr=NULL) |
Notifies and schedules overlay nodes for removal. | |
void | migrateNode (NodeType type, TransportAddress *addr=NULL) |
Migrates overlay nodes from one access net to another. | |
Public Member Functions inherited from UnderlayConfigurator | |
UnderlayConfigurator () | |
virtual | ~UnderlayConfigurator () |
bool | isInInitPhase () |
still in initialization phase? | |
bool | isSimulationEndingSoon () |
Is the simulation ending soon? | |
simtime_t | getGracefulLeaveDelay () |
Return the gracefulLeaveDelay. | |
bool | isTransitionTimeFinished () |
void | initFinished () |
ChurnGenerator * | getChurnGenerator (int typeID) |
uint8_t | getChurnGeneratorNum () |
int | getOverlayTerminalCount () |
Protected Member Functions | |
void | initializeUnderlay (int stage) |
Sets up backbone, assigns ip addresses, calculates routing tables, sets some parameters and adds the initial number of nodes to the network. | |
void | setUpIPv4 (cTopology &topo) |
void | setUpIPv6 (cTopology &topo) |
void | handleTimerEvent (cMessage *msg) |
process timer messages | |
void | finishUnderlay () |
Saves statistics, prints simulation time. | |
void | setDisplayString () |
Updates the statistics display string. | |
Protected Member Functions inherited from UnderlayConfigurator | |
int | numInitStages () const |
OMNeT number of init stages. | |
virtual void | initialize (int stage) |
OMNeT init methods. | |
void | finish () |
Cleans up configurator. | |
void | handleMessage (cMessage *msg) |
Node mobility simulation. |
Protected Attributes | |
std::vector< cModule * > | accessNode |
stores accessRouter | |
std::deque< IPvXAddress > | killList |
stores nodes scheduled to be killed | |
std::set< int > | scheduledID |
stores nodeIds to prevent migration of prekilled nodes | |
int | numCreated |
number of overall created overlay terminals | |
int | numKilled |
number of overall killed overlay terminals | |
Protected Attributes inherited from UnderlayConfigurator | |
int | overlayTerminalCount |
current number of overlay terminals | |
int | firstNodeId |
the Id of the overlayTerminal created first in the overlay | |
simtime_t | gracefulLeaveDelay |
delay until scheduled node is removed from overlay | |
double | gracefulLeaveProbability |
probability that node is notified befor removal | |
GlobalNodeList * | globalNodeList |
pointer to GlobalNodeList | |
GlobalStatistics * | globalStatistics |
pointer to GlobalStatistics | |
std::vector< ChurnGenerator * > | churnGenerator |
pointer to the ChurnGenerators | |
cMessage * | endSimulationTimer |
timer to signal end of simulation | |
cMessage * | endSimulationNotificationTimer |
timer to notify nodes that simulation ends soon | |
cMessage * | endTransitionTimer |
timer to signal end of transition time | |
struct timeval | initFinishedTime |
timestamp at end of init phase | |
struct timeval | initStartTime |
timestamp at begin of init phase | |
simtime_t | transitionTime |
time to wait before measuring after init phase is finished | |
simtime_t | measurementTime |
duration of the simulation after init and transition phase |
Private Attributes | |
int | accessRouterNum |
number of access router | |
int | overlayAccessRouterNum |
number of overlayAccessRouter | |
int | overlayTerminalNum |
number of terminal in the overlay |
Additional Inherited Members | |
Static Protected Attributes inherited from UnderlayConfigurator | |
static const int | NUM_COLORS = 8 |
static const char * | colorNames [] |
Configurator module for the InetUnderlay.
Definition at line 41 of file InetUnderlayConfigurator.h.
|
virtual |
Creates an overlay node.
type | the NodeType of the node to create |
initialize | creation during init phase? |
Implements UnderlayConfigurator.
Definition at line 87 of file InetUnderlayConfigurator.cc.
|
protectedvirtual |
Saves statistics, prints simulation time.
Reimplemented from UnderlayConfigurator.
Definition at line 324 of file InetUnderlayConfigurator.cc.
|
protectedvirtual |
process timer messages
msg | the received message |
Reimplemented from UnderlayConfigurator.
Definition at line 283 of file InetUnderlayConfigurator.cc.
|
protectedvirtual |
Sets up backbone, assigns ip addresses, calculates routing tables, sets some parameters and adds the initial number of nodes to the network.
stage | the phase of the initialisation |
Implements UnderlayConfigurator.
Definition at line 43 of file InetUnderlayConfigurator.cc.
|
virtual |
Migrates overlay nodes from one access net to another.
type | the NodeType of the node to migrate |
addr | NULL for random node |
Implements UnderlayConfigurator.
Definition at line 225 of file InetUnderlayConfigurator.cc.
|
virtual |
Notifies and schedules overlay nodes for removal.
type | NodeType of the node to remove |
addr | NULL for random node |
Implements UnderlayConfigurator.
Definition at line 158 of file InetUnderlayConfigurator.cc.
|
protectedvirtual |
Updates the statistics display string.
Implements UnderlayConfigurator.
Definition at line 316 of file InetUnderlayConfigurator.cc.
Referenced by createNode(), and preKillNode().
|
protected |
Definition at line 338 of file InetUnderlayConfigurator.cc.
Referenced by initializeUnderlay().
|
protected |
Definition at line 496 of file InetUnderlayConfigurator.cc.
Referenced by initializeUnderlay().
|
protected |
stores accessRouter
Definition at line 104 of file InetUnderlayConfigurator.h.
Referenced by createNode(), initializeUnderlay(), and migrateNode().
|
private |
number of access router
Definition at line 70 of file InetUnderlayConfigurator.h.
Referenced by initializeUnderlay(), and setDisplayString().
|
protected |
stores nodes scheduled to be killed
Definition at line 105 of file InetUnderlayConfigurator.h.
Referenced by handleTimerEvent(), and preKillNode().
|
protected |
number of overall created overlay terminals
Definition at line 109 of file InetUnderlayConfigurator.h.
Referenced by createNode(), finishUnderlay(), and initializeUnderlay().
|
protected |
number of overall killed overlay terminals
Definition at line 110 of file InetUnderlayConfigurator.h.
Referenced by finishUnderlay(), initializeUnderlay(), and preKillNode().
|
private |
number of overlayAccessRouter
Definition at line 71 of file InetUnderlayConfigurator.h.
Referenced by initializeUnderlay(), and setDisplayString().
|
private |
number of terminal in the overlay
Definition at line 72 of file InetUnderlayConfigurator.h.
|
protected |
stores nodeIds to prevent migration of prekilled nodes
Definition at line 106 of file InetUnderlayConfigurator.h.
Referenced by handleTimerEvent(), migrateNode(), and preKillNode().