#include <WirelessMacBase.h>
Inheritance diagram for WirelessMacBase:
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 | |
NotificationBoard * | nb |
Cached pointer to the NotificationBoard module. | |
int | uppergateIn |
int | uppergateOut |
int | lowergateIn |
int | lowergateOut |
|
Handle messages from lower layer.
Implemented in CSMAMacLayer, and Mac80211. |
|
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 }
|
|
Handle self messages such as timers.
Implemented in CSMAMacLayer, and Mac80211. |
|
Handle messages from upper layer.
Implemented in CSMAMacLayer, and Mac80211. |
|
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 }
|
|
Sends a message to the lower layer.
00054 { 00055 EV << "sending down " << msg << "\n"; 00056 send(msg, lowergateOut); 00057 }
|
|
Sends a message to the upper layer.
00060 { 00061 EV << "sending up " << msg << "\n"; 00062 send(msg, uppergateOut); 00063 }
|
|
|
|
|
|
Cached pointer to the NotificationBoard module.
|
|
|
|
|