OverSim
NoChurn Class Reference

No churn generating class (only bootstraps a networks) More...

#include <NoChurn.h>

Inheritance diagram for NoChurn:
ChurnGenerator

Public Member Functions

void handleMessage (cMessage *msg)
void initializeChurn ()
 ~NoChurn ()
- Public Member Functions inherited from ChurnGenerator
virtual int numInitStages () const
virtual void initialize (int stage)
void setNodeType (const NodeType &t)
const NodeTypegetNodeType ()

Protected Member Functions

void updateDisplayString ()

Private Attributes

double initialMean
 mean of update interval during initalization phase
double initialDeviation
 deviation of update interval during initalization phase
bool initAddMoreTerminals
 true, if we're still adding more terminals in the init phase
cMessage * mobilityTimer
 message to schedule events

Additional Inherited Members

- Public Attributes inherited from ChurnGenerator
bool init
 still in initialization phase?
int terminalCount
 current number of overlay terminals
- Protected Attributes inherited from ChurnGenerator
UnderlayConfiguratorunderlayConfigurator
int targetOverlayTerminalNum
 final number of overlay terminals
NodeType type
 the nodeType this generator is responsible for

Detailed Description

No churn generating class (only bootstraps a networks)

Definition at line 36 of file NoChurn.h.

Constructor & Destructor Documentation

NoChurn::~NoChurn ( )

Definition at line 77 of file NoChurn.cc.

{
// destroy self timer messages
cancelAndDelete(mobilityTimer);
}

Member Function Documentation

void NoChurn::handleMessage ( cMessage *  msg)
virtual

Implements ChurnGenerator.

Definition at line 45 of file NoChurn.cc.

{
if (!msg->isSelfMessage()) {
throw cRuntimeError("NoChurn::handleMessage(): "
"Unknown message received!");
delete msg;
return;
}
if (msg == mobilityTimer) {
delete ta; // Address not needed in this churn model
}
} else {
scheduleAt(simTime()
+ truncnormal(initialMean, initialDeviation), msg);
}
}
}
void NoChurn::initializeChurn ( )
virtual

Implements ChurnGenerator.

Definition at line 31 of file NoChurn.cc.

{
Enter_Method_Silent();
initialMean = par("initPhaseCreationInterval");
targetOverlayTerminalNum = par("targetOverlayTerminalNum");
mobilityTimer = new cMessage("mobilityTimer");
scheduleAt(simTime(), mobilityTimer);
}
void NoChurn::updateDisplayString ( )
protectedvirtual

Implements ChurnGenerator.

Definition at line 70 of file NoChurn.cc.

{
char buf[80];
sprintf(buf, "No churn");
getDisplayString().setTagArg("t", 0, buf);
}

Member Data Documentation

bool NoChurn::initAddMoreTerminals
private

true, if we're still adding more terminals in the init phase

Definition at line 49 of file NoChurn.h.

Referenced by handleMessage(), and initializeChurn().

double NoChurn::initialDeviation
private

deviation of update interval during initalization phase

Definition at line 48 of file NoChurn.h.

Referenced by handleMessage(), and initializeChurn().

double NoChurn::initialMean
private

mean of update interval during initalization phase

Definition at line 47 of file NoChurn.h.

Referenced by handleMessage(), and initializeChurn().

cMessage* NoChurn::mobilityTimer
private

message to schedule events

Definition at line 50 of file NoChurn.h.

Referenced by handleMessage(), initializeChurn(), and ~NoChurn().


The documentation for this class was generated from the following files: