Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

WirelessMacBase Class Reference

#include <WirelessMacBase.h>

Inheritance diagram for WirelessMacBase:

CSMAMacLayer Mac80211 List of all members.

Detailed Description

Base class for wireless MAC protocols that use MF's physical layer.

Author:
Daniel Willkomm, Andras Varga


Protected Member Functions

virtual void initialize (int)
 Initialization of the module and some variables.
void handleMessage (cMessage *msg)
 Called every time a message arrives.
Handle Messages
Functions to redefine by the programmer

virtual void handleSelfMsg (cMessage *msg)=0
 Handle self messages such as timers.
virtual void handleUpperMsg (cMessage *msg)=0
 Handle messages from upper layer.
virtual void handleLowerMsg (cMessage *msg)=0
 Handle messages from lower layer.
Convenience Functions
void sendDown (cMessage *msg)
 Sends a message to the lower layer.
void sendUp (cMessage *msg)
 Sends a message to the upper layer.

Protected Attributes

NotificationBoardnb
 Cached pointer to the NotificationBoard module.
int uppergateIn
int uppergateOut
int lowergateIn
int lowergateOut


Member Function Documentation

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

Handle messages from lower layer.

Implemented in CSMAMacLayer, and Mac80211.

void WirelessMacBase::handleMessage cMessage *  msg  )  [protected]
 

Called every time a message arrives.

00044 {
00045     if (msg->arrivalGateId()==uppergateIn)
00046         handleUpperMsg(msg);
00047     else if (msg->isSelfMessage())
00048         handleSelfMsg(msg);
00049     else
00050         handleLowerMsg(msg);
00051 }

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

Handle self messages such as timers.

Implemented in CSMAMacLayer, and Mac80211.

virtual void WirelessMacBase::handleUpperMsg cMessage *  msg  )  [protected, pure virtual]
 

Handle messages from upper layer.

Implemented in CSMAMacLayer, and Mac80211.

void WirelessMacBase::initialize int   )  [protected, virtual]
 

Initialization of the module and some variables.

Reimplemented in CSMAMacLayer, and Mac80211.

00029 {
00030     if (stage==0)
00031     {
00032         uppergateIn  = findGate("uppergateIn");
00033         uppergateOut = findGate("uppergateOut");
00034         lowergateIn  = findGate("lowergateIn");
00035         lowergateOut = findGate("lowergateOut");
00036 
00037         // get a pointer to the NotificationBoard module
00038         nb = NotificationBoardAccess().get();
00039     }
00040 }

void WirelessMacBase::sendDown cMessage *  msg  )  [protected]
 

Sends a message to the lower layer.

00054 {
00055     EV << "sending down " << msg << "\n";
00056     send(msg, lowergateOut);
00057 }

void WirelessMacBase::sendUp cMessage *  msg  )  [protected]
 

Sends a message to the upper layer.

00060 {
00061     EV << "sending up " << msg << "\n";
00062     send(msg, uppergateOut);
00063 }


Member Data Documentation

int WirelessMacBase::lowergateIn [protected]
 

int WirelessMacBase::lowergateOut [protected]
 

NotificationBoard* WirelessMacBase::nb [protected]
 

Cached pointer to the NotificationBoard module.

int WirelessMacBase::uppergateIn [protected]
 

int WirelessMacBase::uppergateOut [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Apr 1 20:52:25 2006 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.1