OverSim
I3TRTClient Class Reference
Inheritance diagram for I3TRTClient:
I3BaseApp

Private Member Functions

void initializeI3 ()
void handleTimerEvent (cMessage *msg)

Additional Inherited Members

- Public Member Functions inherited from I3BaseApp
 I3BaseApp ()
 Constructor.
 ~I3BaseApp ()
 Destructor.
- Protected Types inherited from I3BaseApp
enum  I3MobilityStage { I3_MOBILITY_BEFORE_UPDATE, I3_MOBILITY_UPDATED }
- Protected Member Functions inherited from I3BaseApp
int numInitStages () const
 Returns number of init stages required.
void initialize (int stage)
 Basic initialization.
virtual void initializeApp (int stage)
 App initialization - should be overwritten by application.
void bootstrapI3 ()
 Internal I3 bootstrap - connects to I3, inserts sampling triggers and initializes timers.
virtual void initializeI3 ()
 Application I3 initialize - should be overwritten by application.
virtual void handleTimerEvent (cMessage *msg)
 Handles timers - should be overwritten by application.
virtual void handleUDPMessage (cMessage *msg)
 Handles messages incoming from UDP gate.
void handleMessage (cMessage *msg)
 Handles incoming messages.
virtual void deliver (I3Trigger &trigger, I3IdentifierStack &stack, cPacket *msg)
 Delivers packets coming from I3 - should be overwritten by application.
void sendToI3 (I3Message *msg)
 Sends a message to I3.
void sendThroughUDP (cMessage *msg, const I3IPAddress &ip)
 Sends a message through UDP.
void refreshTriggers ()
 Refreshes (reinserts) stored triggers.
void refreshSamples ()
 Refreshes sampling triggers and selects fastest server as gateway.
I3Identifier retrieveClosestIdentifier ()
void sendPacket (const I3Identifier &id, cPacket *msg, bool useHint=false)
 Routes a packet through I3, passing an identifier stack composed of a single identifier.
void sendPacket (const I3IdentifierStack &stack, cPacket *msg, bool useHint=false)
 Routes a packet through I3.
void insertTrigger (const I3Identifier &identifier, bool store=true)
 Inserts a trigger into I3, composed by the given identifier and an identifier stack containing only this node's IP address.
void insertTrigger (const I3Identifier &identifier, const I3IdentifierStack &stack, bool store=true)
 Inserts a trigger into I3 with the given identifier and identifier stack.
void insertTrigger (const I3Trigger &t, bool store=true)
 Inserts the given trigger into I3.
void removeTrigger (const I3Identifier &identifier)
 Removes all triggers from the list of inserted triggers whose identifiers equal the one given.
void removeTrigger (const I3Trigger &trigger)
 Removes a trigger from I3.
std::set< I3Trigger > & getInsertedTriggers ()
 Returns the list of inserted triggers.
void receiveChangeNotification (int category, const cPolymorphic *details)
virtual void doMobilityEvent (I3MobilityStage stage)
- Protected Attributes inherited from I3BaseApp
int numSent
 Number of sent messages.
int sentBytes
int numReceived
 Number of received messages.
int receivedBytes
int numIsolations
 Number of times this node has been isolated - i.e.
IPvXAddress nodeIPAddress
 Cached IP address of this node.
std::set< I3TriggerinsertedTriggers
 Stored I3 triggers sent from this node, to be refreshed automatically.
std::map< I3Identifier,
I3CachedServer
samplingCache
std::map< I3Identifier,
I3CachedServer
identifierCache
I3CachedServer gateway
cMessage * refreshTriggersTimer
int refreshTriggersTime
cMessage * refreshSamplesTimer
int refreshSamplesTime
cMessage * initializeTimer
cMessage * bootstrapTimer

Detailed Description

Definition at line 40 of file I3TriggerRoutingTime.cc.

Member Function Documentation

void I3TRTClient::handleTimerEvent ( cMessage *  msg)
private

Definition at line 89 of file I3TriggerRoutingTime.cc.

{
if (msg->getKind() == TRIGGER_TIMER) {
I3IPAddress myAddress(nodeIPAddress, par("clientPort"));
id.createRandomKey();
t.getIdentifierStack().push(myAddress);
imsg->setTrigger(t);
imsg->setSendReply(true);
imsg->setSource(myAddress);
imsg->setBitLength(INSERT_TRIGGER_L(imsg));
imsg->setContextPointer(new simtime_t(simTime()));
scheduleAt(simTime() + int(par("triggerDelay")), msg);
}
}
void I3TRTClient::initializeI3 ( )
private

Definition at line 83 of file I3TriggerRoutingTime.cc.

{
cMessage *msg = new cMessage();
msg->setKind(TRIGGER_TIMER);
scheduleAt(simTime() + int(par("triggerDelay")), msg);
}

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