OverSim
|
Sets up a SimpleNetwork. More...
#include <SimpleUnderlayConfigurator.h>
Public Member Functions | |
~SimpleUnderlayConfigurator () | |
virtual TransportAddress * | createNode (NodeType type, bool initialize=false) |
Creates an overlay node. | |
virtual void | preKillNode (NodeType type, TransportAddress *addr=NULL) |
Notifies and schedules overlay nodes for removal. | |
virtual void | migrateNode (NodeType type, TransportAddress *addr=NULL) |
Migrates overlay nodes from one access net to another. | |
uint32_t | getFieldSize () |
uint32_t | getFieldDimension () |
uint32_t | getSendQueueLenghth () |
IPvXAddress | migrateNode (NodeType type, IPvXAddress addr, const BaseLocation &locID) |
double | getDistance (const BaseLocation &IDa, const BaseLocation &IDb) |
BaseLocation * | getNearLocation (const BaseLocation &ID, double radius) |
BaseLocation * | getLocation (IPvXAddress addr) |
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) |
Enables access to the globalHashMap, sets some parameters and adds the initial number of nodes to the network. | |
void | handleTimerEvent (cMessage *msg) |
void | finishUnderlay () |
Saves statistics, prints simulation time. | |
void | setDisplayString () |
Prints statistics. | |
uint32_t | parseCoordFile (const char *nodeCoordinateSource) |
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 | |
uint32 | nextFreeAddress |
address of the node that will be created next | |
std::deque< IPvXAddress > | killList |
stores nodes scheduled to be killed | |
std::set< int > | scheduledID |
stores nodeIds to prevent migration of prekilled nodes | |
uint32_t | sendQueueLength |
send queue length of overlay terminals | |
uint32_t | fieldSize |
int | dimensions |
bool | fixedNodePositions |
bool | useIPv6 |
bool | useXmlCoords |
const char * | nodeCoordinateSource |
uint32_t | maxCoordinate |
std::vector< std::pair < NodeRecord *, bool > > | nodeRecordPool |
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 |
Additional Inherited Members | |
Static Protected Attributes inherited from UnderlayConfigurator | |
static const int | NUM_COLORS = 8 |
static const char * | colorNames [] |
Sets up a SimpleNetwork.
Adds overlay nodes to the network in init phase and adds/removes/migrates overlay nodes after init phase.
Definition at line 42 of file SimpleUnderlayConfigurator.h.
SimpleUnderlayConfigurator::~SimpleUnderlayConfigurator | ( | ) |
Definition at line 56 of file SimpleUnderlayConfigurator.cc.
|
virtual |
Creates an overlay node.
type | NodeType of the node to create |
initialize | are we in init phase? |
Implements UnderlayConfigurator.
Definition at line 115 of file SimpleUnderlayConfigurator.cc.
|
protectedvirtual |
Saves statistics, prints simulation time.
Reimplemented from UnderlayConfigurator.
Definition at line 523 of file SimpleUnderlayConfigurator.cc.
double SimpleUnderlayConfigurator::getDistance | ( | const BaseLocation & | IDa, |
const BaseLocation & | IDb | ||
) |
Definition at line 639 of file SimpleUnderlayConfigurator.cc.
|
inline |
Definition at line 72 of file SimpleUnderlayConfigurator.h.
|
inline |
Definition at line 71 of file SimpleUnderlayConfigurator.h.
BaseLocation * SimpleUnderlayConfigurator::getLocation | ( | IPvXAddress | addr | ) |
Definition at line 658 of file SimpleUnderlayConfigurator.cc.
BaseLocation * SimpleUnderlayConfigurator::getNearLocation | ( | const BaseLocation & | ID, |
double | radius | ||
) |
Definition at line 646 of file SimpleUnderlayConfigurator.cc.
|
inline |
Definition at line 73 of file SimpleUnderlayConfigurator.h.
|
protectedvirtual |
Reimplemented from UnderlayConfigurator.
Definition at line 475 of file SimpleUnderlayConfigurator.cc.
|
protectedvirtual |
Enables access to the globalHashMap, sets some parameters and adds the initial number of nodes to the network.
stage | the phase of the initialisation |
Implements UnderlayConfigurator.
Definition at line 65 of file SimpleUnderlayConfigurator.cc.
|
virtual |
Migrates overlay nodes from one access net to another.
type | NodeType of the node to migrate |
addr | NULL for random node |
Implements UnderlayConfigurator.
Definition at line 387 of file SimpleUnderlayConfigurator.cc.
IPvXAddress SimpleUnderlayConfigurator::migrateNode | ( | NodeType | type, |
IPvXAddress | addr, | ||
const BaseLocation & | locID | ||
) |
Definition at line 539 of file SimpleUnderlayConfigurator.cc.
|
protected |
Definition at line 260 of file SimpleUnderlayConfigurator.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 320 of file SimpleUnderlayConfigurator.cc.
|
protectedvirtual |
Prints statistics.
Implements UnderlayConfigurator.
Definition at line 515 of file SimpleUnderlayConfigurator.cc.
|
protected |
Definition at line 110 of file SimpleUnderlayConfigurator.h.
Referenced by getFieldDimension().
|
protected |
Definition at line 109 of file SimpleUnderlayConfigurator.h.
Referenced by getFieldSize().
|
protected |
Definition at line 111 of file SimpleUnderlayConfigurator.h.
|
protected |
stores nodes scheduled to be killed
Definition at line 105 of file SimpleUnderlayConfigurator.h.
|
protected |
Definition at line 116 of file SimpleUnderlayConfigurator.h.
|
protected |
address of the node that will be created next
Definition at line 104 of file SimpleUnderlayConfigurator.h.
|
protected |
Definition at line 115 of file SimpleUnderlayConfigurator.h.
|
protected |
Definition at line 118 of file SimpleUnderlayConfigurator.h.
|
protected |
number of overall created overlay terminals
Definition at line 121 of file SimpleUnderlayConfigurator.h.
|
protected |
number of overall killed overlay terminals
Definition at line 122 of file SimpleUnderlayConfigurator.h.
|
protected |
stores nodeIds to prevent migration of prekilled nodes
Definition at line 106 of file SimpleUnderlayConfigurator.h.
|
protected |
send queue length of overlay terminals
Definition at line 108 of file SimpleUnderlayConfigurator.h.
Referenced by getSendQueueLenghth().
|
protected |
Definition at line 112 of file SimpleUnderlayConfigurator.h.
|
protected |
Definition at line 114 of file SimpleUnderlayConfigurator.h.