#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 (const NodeType &t) |
| const NodeType & | getNodeType () |
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 | |
Definition at line 57 of file ChurnGenerator.h.
| const NodeType& ChurnGenerator::getNodeType | ( | ) | [inline] |
Definition at line 65 of file ChurnGenerator.h.
Referenced by Nps::coordsReqRpcResponse(), and Landmark::initializeApp().
00065 { return type; }
| virtual void ChurnGenerator::handleMessage | ( | cMessage * | msg | ) | [pure virtual] |
Implemented in LifetimeChurn, NoChurn, ParetoChurn, RandomChurn, and TraceChurn.
| void ChurnGenerator::initialize | ( | int | stage | ) | [virtual] |
Definition at line 27 of file ChurnGenerator.cc.
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 = par("overlayType").stdstringValue(); 00043 type.tier1Type = par("tier1Type").stdstringValue(); 00044 type.tier2Type = par("tier2Type").stdstringValue(); 00045 type.tier3Type = par("tier3Type").stdstringValue(); 00046 type.channelTypesTx = cStringTokenizer(par("channelTypes"), " ").asVector(); 00047 type.channelTypesRx = cStringTokenizer(par("channelTypesRx"), " ").asVector(); 00048 00049 if (type.channelTypesRx.size() != type.channelTypesTx.size()) { 00050 type.channelTypesRx = type.channelTypesTx; 00051 } 00052 00053 00054 terminalCount = 0; 00055 init = true; 00056 00057 updateDisplayString(); 00058 WATCH(terminalCount); 00059 00060 initializeChurn(); 00061 }
| virtual void ChurnGenerator::initializeChurn | ( | ) | [pure virtual] |
Implemented in LifetimeChurn, NoChurn, ParetoChurn, RandomChurn, and TraceChurn.
Referenced by initialize().
| virtual int ChurnGenerator::numInitStages | ( | ) | const [inline, virtual] |
| void ChurnGenerator::setNodeType | ( | const NodeType & | t | ) | [inline] |
Definition at line 64 of file ChurnGenerator.h.
Referenced by UnderlayConfigurator::initialize().
00064 { type = t; }
| virtual void ChurnGenerator::updateDisplayString | ( | ) | [protected, pure virtual] |
Implemented in LifetimeChurn, NoChurn, ParetoChurn, RandomChurn, and TraceChurn.
Referenced by initialize().
| bool ChurnGenerator::init |
still in initialization phase?
Definition at line 66 of file ChurnGenerator.h.
Referenced by initialize().
int ChurnGenerator::targetOverlayTerminalNum [protected] |
final number of overlay terminals
Reimplemented in RandomChurn.
Definition at line 72 of file ChurnGenerator.h.
Referenced by NoChurn::handleMessage(), initialize(), ParetoChurn::initializeChurn(), NoChurn::initializeChurn(), and LifetimeChurn::initializeChurn().
current number of overlay terminals
Definition at line 67 of file ChurnGenerator.h.
Referenced by RandomChurn::handleMessage(), NoChurn::handleMessage(), and initialize().
NodeType ChurnGenerator::type [protected] |
the nodeType this generator is responsible for
Definition at line 73 of file ChurnGenerator.h.
Referenced by TraceChurn::createNode(), ParetoChurn::createNode(), LifetimeChurn::createNode(), getNodeType(), RandomChurn::handleMessage(), NoChurn::handleMessage(), initialize(), and setNodeType().
UnderlayConfigurator* ChurnGenerator::underlayConfigurator [protected] |
Definition at line 70 of file ChurnGenerator.h.
Referenced by TraceChurn::createNode(), ParetoChurn::createNode(), LifetimeChurn::createNode(), TraceChurn::deleteNode(), ParetoChurn::deleteNode(), LifetimeChurn::deleteNode(), RandomChurn::handleMessage(), ParetoChurn::handleMessage(), NoChurn::handleMessage(), LifetimeChurn::handleMessage(), initialize(), and TraceChurn::initializeChurn().
1.5.8