OverSim
I3TRTServer Class Reference
Inheritance diagram for I3TRTServer:
I3 BaseApp BaseRpc BaseTcpSupport RpcListener

Private Member Functions

void initializeApp (int stage)
void deliver (OverlayKey &key, cMessage *msg)
void finish ()

Additional Inherited Members

- Public Types inherited from BaseTcpSupport
enum  EvCode {
  NO_EST_CONNECTION, PEER_CLOSED, PEER_TIMEDOUT, PEER_REFUSED,
  CONNECTION_RESET, CONNECTION_SUCC_ClOSED
}
- Public Member Functions inherited from I3
I3TriggerTablegetTriggerTable ()
 Returns the table of inserted triggers.
const I3IdentifierfindClosestMatch (const I3Identifier &t) const
 Finds the closest match to t from the stored trigger identifiers.
void insertTrigger (I3Trigger &t)
 Inserts a trigger into I3.
void removeTrigger (I3Trigger &t)
 Removes a trigger from I3.
void sendPacket (I3SendPacketMessage *msg)
 Sends a packet through I3.
void sendToNode (I3SendPacketMessage *imsg)
 Sends packet to matching IP address (used by sendPacket)
- Protected Member Functions inherited from I3
int numInitStages () const
 Returns number of required init stages.
virtual void initializeApp (int stage)
 Actual initialization function.
virtual void deliver (OverlayKey &key, cMessage *msg)
 Delivers a packet from the overlay.
virtual void handleUDPMessage (cMessage *msg)
 Handles a message from UDP.
virtual void handleTimerEvent (cMessage *msg)
 Handles timers.
void sendQueryReply (const I3Identifier &id, const I3IPAddress &add)
 Replies to a query of which server is responsible for the given identifier (this server)
virtual void forward (OverlayKey *key, cPacket **msg, NodeHandle *nextHopNode)
 Common API function: handles messages from overlay to be forwarded.
void updateTriggerTableString ()
 Updates TriggerTable's module display string.
virtual void finish ()
 collects statistical data
- Protected Attributes inherited from I3
int numDroppedPackets
 Number of dropped packets.
int byteDroppedPackets
int numForwardedPackets
int numForwardedBytes
int triggerTimeToLive
 Time before inserted triggers expire.
I3TriggerTable triggerTable
 Table containing inserted triggers.
cMessage * expirationTimer
 Timer to check for trigger expiration.

Detailed Description

Definition at line 31 of file I3TriggerRoutingTime.cc.

Member Function Documentation

void I3TRTServer::deliver ( OverlayKey key,
cMessage *  msg 
)
private

Definition at line 53 of file I3TriggerRoutingTime.cc.

{
i3msg = dynamic_cast<I3InsertTriggerMessage*>(msg);
if (i3msg) {
simtime_t *pt = (simtime_t*)i3msg->getContextPointer();
if (pt) {
stats.collect(simTime() - *pt);
//cout << "Trigger reach time " << simTime() - *pt << endl;
delete pt;
i3msg->setContextPointer(0);
}
}
I3::deliver(key, msg);
}
void I3TRTServer::finish ( )
private

Definition at line 69 of file I3TriggerRoutingTime.cc.

{
if (!statsDumped) {
statsDumped = true;
recordScalar("I3Sim Number of samples", stats.getCount());
recordScalar("I3Sim Min time", stats.getMin());
recordScalar("I3Sim Max time", stats.getMax());
recordScalar("I3Sim Mean time", stats.getMean());
recordScalar("I3Sim Stardard dev", stats.getStddev());
stats.clearResult();
}
}
void I3TRTServer::initializeApp ( int  stage)
private

Definition at line 48 of file I3TriggerRoutingTime.cc.

{
statsDumped = false;
}

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