#include <ChurnGenerator.h>

Public Member Functions | |
| virtual int | numInitStages () const |
| virtual void | initialize (int stage) |
| virtual void | initializeChurn ()=0 |
| virtual void | handleMessage (cMessage *msg)=0 |
| void | setNodeType (NodeType t) |
Public Attributes | |
| bool | init |
| still in initialization phase? | |
| int | terminalCount |
| current number of overlay terminals | |
Protected Member Functions | |
| virtual void | updateDisplayString ()=0 |
Protected Attributes | |
| UnderlayConfigurator * | underlayConfigurator |
| int | targetOverlayTerminalNum |
| final number of overlay terminals | |
| NodeType | type |
| the nodeType this generator is responsible for | |
| virtual int ChurnGenerator::numInitStages | ( | ) | const [inline, virtual] |
| void ChurnGenerator::initialize | ( | int | stage | ) | [virtual] |
00028 { 00029 // because of IPAddressResolver, we need to wait until interfaces are registered, 00030 // address auto-assignment takes place etc. 00031 if (stage != MAX_STAGE_UNDERLAY) 00032 return; 00033 00034 if (type.typeID == 0) { 00035 opp_error("NodeType not set when initializing ChurnGenerator"); 00036 } 00037 00038 underlayConfigurator = UnderlayConfiguratorAccess().get(); 00039 // get desired # of terminals 00040 targetOverlayTerminalNum = par("targetOverlayTerminalNum"); 00041 00042 type.overlayType = std::string(par("overlayType")); 00043 type.tier1Type = std::string(par("tier1Type")); 00044 type.tier2Type = std::string(par("tier2Type")); 00045 type.tier3Type = std::string(par("tier3Type")); 00046 type.channelTypes = cStringTokenizer(par("channelTypes"), " ").asVector(); 00047 00048 init = true; 00049 // set churn type 00050 updateDisplayString(); 00051 WATCH(terminalCount); 00052 }
| virtual void ChurnGenerator::initializeChurn | ( | ) | [pure virtual] |
Implemented in LifetimeChurn, ParetoChurn, RandomChurn, and TraceChurn.
| virtual void ChurnGenerator::handleMessage | ( | cMessage * | msg | ) | [pure virtual] |
Implemented in LifetimeChurn, ParetoChurn, RandomChurn, and TraceChurn.
| virtual void ChurnGenerator::updateDisplayString | ( | ) | [protected, pure virtual] |
Implemented in LifetimeChurn, ParetoChurn, RandomChurn, and TraceChurn.
| bool ChurnGenerator::init |
still in initialization phase?
current number of overlay terminals
UnderlayConfigurator* ChurnGenerator::underlayConfigurator [protected] |
int ChurnGenerator::targetOverlayTerminalNum [protected] |
NodeType ChurnGenerator::type [protected] |
the nodeType this generator is responsible for
1.5.3