I3TRTServer Class Reference

Inheritance diagram for I3TRTServer:

I3 BaseApp BaseRpc RpcListener

List of all members.

Private Member Functions

void initializeApp (int stage)
 Actual initialization function.
void deliver (OverlayKey &key, cMessage *msg)
 Delivers a packet from the overlay.
void finish ()
 collects statistical data


Member Function Documentation

void I3TRTServer::initializeApp ( int  stage  )  [private, virtual]

Actual initialization function.

Parameters:
stage Actual stage

Reimplemented from I3.

00045                                          {
00046     statsDumped = false;
00047     I3::initializeApp(stage);
00048 }

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

Delivers a packet from the overlay.

Parameters:
key Key from the overlay
msg Message to deliver

Reimplemented from I3.

00050                                                         {
00051     I3InsertTriggerMessage *i3msg;
00052 
00053     i3msg = dynamic_cast<I3InsertTriggerMessage*>(msg);
00054     if (i3msg) {
00055         simtime_t *pt = (simtime_t*)i3msg->contextPointer();
00056         if (pt) {
00057             stats.collect(simulation.simTime() - *pt);
00058             //cout << "Trigger reach time " << simulation.simTime() - *pt << endl;
00059             delete pt;
00060             i3msg->setContextPointer(0);
00061         }
00062     }
00063     I3::deliver(key, msg);
00064 }

void I3TRTServer::finish (  )  [private, virtual]

collects statistical data

Reimplemented from I3.

00066                          {
00067     if (!statsDumped) {
00068         statsDumped = true;
00069         recordScalar("I3Sim Number of samples", stats.samples());
00070         recordScalar("I3Sim Min time", stats.min());
00071         recordScalar("I3Sim Max time", stats.max());
00072         recordScalar("I3Sim Mean time", stats.mean());
00073         recordScalar("I3Sim Stardard dev", stats.stddev());
00074         stats.clearResult();
00075     }
00076 }


The documentation for this class was generated from the following file:
Generated on Thu Apr 17 13:19:29 2008 for ITM OverSim by  doxygen 1.5.3