#include <BasicMacLayer.h>
Inherits BasicLayer.
Inherited by AlohaMacLayer, and CSMAMacLayer.
Inheritance diagram for BasicMacLayer:
Public Member Functions | |
Module_Class_Members (BasicMacLayer, BasicLayer, 0) | |
virtual void | initialize (int) |
Initialization of the module and some variables. | |
virtual void | handleUpperMsg (cMessage *msg)=0 |
Handle messages comming from the network layer. | |
virtual void | handleLowerMsg (cMessage *msg) |
Protected Member Functions | |
virtual cMessage * | decapsMsg (MacPkt *) |
decapsulate the network message from the MacPkt | |
virtual MacPkt * | encapsMsg (cMessage *) |
Encapsulate the NetwPkt into an MacPkt. | |
Protected Attributes | |
int | headerLength |
Length of the MacPkt header. | |
int | myMacAddr |
MAC address (simply module id). | |
bool | coreDebug |
debug this core module? |
|
decapsulate the network message from the MacPkt Decapsulates the network packet from the received MacPkt |
|
Encapsulate the NetwPkt into an MacPkt. Encapsulates the received NetwPkt into a MacPkt and set all needed header fields. |
|
If message arrives from lower layer, check whether it is for us. Send it up if yes. Implements BasicLayer. Reimplemented in CSMAMacLayer. |
|
Handle messages comming from the network layer. Here is the place to implement a real medium access functionality. If message arrives from upper layer, make a MAC packet from it (encapsMsg) and send it down (sendDOwn).
Implements BasicLayer. Implemented in AlohaMacLayer, and CSMAMacLayer. |
|
Initialization of the module and some variables. First we have to initialize the module from which we derived ours, in this case BasicLayer. Reimplemented from BasicLayer. Reimplemented in AlohaMacLayer, and CSMAMacLayer. |