Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

TestApplLayer Class Reference
[applLayer - application layer modules]

Test class for the application layer. More...

#include <TestApplLayer.h>

Inherits BasicApplLayer.

Inherited by BurstApplLayer.

Inheritance diagram for TestApplLayer:

Inheritance graph
[legend]
Collaboration diagram for TestApplLayer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  APPL_MSG_TYPES { SEND_BROADCAST_TIMER, BROADCAST_MESSAGE, BROADCAST_REPLY_MESSAGE }

Public Member Functions

 Module_Class_Members (TestApplLayer, BasicApplLayer, 0)
virtual void initialize (int)
 Initialization of the module and some variables.
virtual void finish ()

Protected Member Functions

virtual void handleSelfMsg (cMessage *)
 Handle self messages such as timer...
virtual void handleLowerMsg (cMessage *)
 Handle messages from lower layer.
void sendBroadcast ()
 send a broadcast packet to all connected neighbors
void sendReply (ApplPkt *msg)
 send a reply to a broadcast message

Protected Attributes

cMessage * delayTimer

Detailed Description

Test class for the application layer.

In this implementation all nodes randomly send broadcast packets to all connected neighbors. Every node who receives this packet will send a reply to the originator node.

Author:
Daniel Willkomm


Member Function Documentation

void TestApplLayer::handleLowerMsg cMessage *  msg  )  [protected, virtual]
 

Handle messages from lower layer.

There are two kinds of messages that can arrive at this module: The first (kind = BROADCAST_MESSAGE) is a broadcast packet from a neighbor node to which we have to send a reply. The second (kind = BROADCAST_REPLY_MESSAGE) is a reply to a broadcast packet that we have send and just causes some output before it is deleted

Reimplemented from BasicApplLayer.

void TestApplLayer::handleSelfMsg cMessage *  msg  )  [protected, virtual]
 

Handle self messages such as timer...

A timer with kind = SEND_BROADCAST_TIMER indicates that a new broadcast has to be send (sendBroadcast).

There are no other timer implemented for this module.

See also:
sendBroadcast

Reimplemented from BasicApplLayer.

Reimplemented in BurstApplLayer.

void TestApplLayer::initialize int  stage  )  [virtual]
 

Initialization of the module and some variables.

First we have to initialize the module from which we derived ours, in this case BasicModule.

Then we will set a timer to indicate the first time we will send a message

Reimplemented from BasicApplLayer.

Reimplemented in BurstApplLayer.

void TestApplLayer::sendBroadcast  )  [protected]
 

send a broadcast packet to all connected neighbors

This function creates a new broadcast message and sends it down to the network layer


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 08:30:24 2007 for Mobility Framework by  doxygen 1.4.4