I3Multicast Class Reference

Inheritance diagram for I3Multicast:

I3BaseApp

List of all members.


Detailed Description

Simple module to test I3 multicast capabilities.

All nodes register the same identifier, then one node sends a message to that identifier. All participating nodes receive the packet .

Public Member Functions

void initializeApp (int stage)
 App initialization - should be overwritten by application.
void initializeI3 ()
 Application I3 initialize - should be overwritten by application.
void deliver (I3Trigger &trigger, I3IdentifierStack &stack, cMessage *msg)
 Delivers packets coming from I3 - should be overwritten by application.
void handleTimerEvent (cMessage *msg)
 Handles timers - should be overwritten by application.

Public Attributes

cMessage * sendPacketTimer


Member Function Documentation

void I3Multicast::initializeApp ( int  stage  )  [virtual]

App initialization - should be overwritten by application.

I3 related commands should go in initializeI3.

Parameters:
stage Initialization stage passed from initialize()

Reimplemented from I3BaseApp.

00042 {
00043 }

void I3Multicast::initializeI3 (  )  [virtual]

Application I3 initialize - should be overwritten by application.

Reimplemented from I3BaseApp.

00046 {
00047     sendPacketTimer = new cMessage("packet timer");
00048     scheduleAt(simulation.simTime() + 20, sendPacketTimer);
00049 
00050     I3Identifier identifier("whee");
00051     insertTrigger(identifier);
00052 }

void I3Multicast::deliver ( I3Trigger trigger,
I3IdentifierStack stack,
cMessage *  msg 
) [virtual]

Delivers packets coming from I3 - should be overwritten by application.

Parameters:
trigger Application trigger to which the packet was sent
stack Identifier stack passed from I3
msg Arriving message

Reimplemented from I3BaseApp.

00056 {
00057     parentModule()->bubble("Got a message!");
00058     delete msg;
00059 }

void I3Multicast::handleTimerEvent ( cMessage *  msg  )  [virtual]

Handles timers - should be overwritten by application.

Parameters:
msg Timer to be handled

Reimplemented from I3BaseApp.

00062 {
00063     if (msg == sendPacketTimer) {
00064         cMessage *cmsg = new cMessage("woot");
00065         I3Identifier id("whee");
00066 
00067         parentModule()->bubble("Sending message!");
00068         sendPacket(id, cmsg);
00069         scheduleAt(simulation.simTime() + 20, sendPacketTimer);
00070     } else delete msg;
00071 }


Member Data Documentation

Referenced by handleTimerEvent(), and initializeI3().


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

Generated on Fri Sep 19 13:05:07 2008 for ITM OverSim by  doxygen 1.5.5