Private Member Functions | |
void | initializeI3 () |
Application I3 initialize - should be overwritten by application. | |
void | handleTimerEvent (cMessage *msg) |
Handles timers - should be overwritten by application. |
Definition at line 40 of file I3TriggerRoutingTime.cc.
void I3TRTClient::handleTimerEvent | ( | cMessage * | msg | ) | [private, virtual] |
Handles timers - should be overwritten by application.
msg | Timer to be handled |
Reimplemented from I3BaseApp.
Definition at line 89 of file I3TriggerRoutingTime.cc.
00089 { 00090 if (msg->getKind() == TRIGGER_TIMER) { 00091 00092 I3Identifier id; 00093 I3Trigger t; 00094 I3InsertTriggerMessage *imsg = new I3InsertTriggerMessage(); 00095 I3IPAddress myAddress(nodeIPAddress, par("clientPort")); 00096 00097 id.createRandomKey(); 00098 t.setIdentifier(id); 00099 t.getIdentifierStack().push(myAddress); 00100 00101 00102 imsg->setTrigger(t); 00103 imsg->setSendReply(true); 00104 imsg->setSource(myAddress); 00105 imsg->setBitLength(INSERT_TRIGGER_L(imsg)); 00106 imsg->setContextPointer(new simtime_t(simTime())); 00107 00108 sendThroughUDP(imsg, gateway.address); 00109 scheduleAt(simTime() + int(par("triggerDelay")), msg); 00110 } 00111 }
void I3TRTClient::initializeI3 | ( | ) | [private, virtual] |
Application I3 initialize - should be overwritten by application.
Reimplemented from I3BaseApp.
Definition at line 83 of file I3TriggerRoutingTime.cc.
00083 { 00084 cMessage *msg = new cMessage(); 00085 msg->setKind(TRIGGER_TIMER); 00086 scheduleAt(simTime() + int(par("triggerDelay")), msg); 00087 }