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

AlohaMacLayer Class Reference
[macLayer - MAC layer modules]

MAC module which provides pure Aloha. More...

#include <AlohaMacLayer.h>

Inherits BasicMacLayer.

Inheritance diagram for AlohaMacLayer:

Inheritance graph
Collaboration diagram for AlohaMacLayer:

Collaboration graph
List of all members.

Public Member Functions

 Module_Class_Members (AlohaMacLayer, BasicMacLayer, 0)
virtual void initialize (int)
 Initialization of the module and some variables.
virtual void finish ()
 Delete all dynamically allocated objects of the module.
virtual void handleUpperMsg (cMessage *)
 Handle messages from upper layer.
virtual void handleSelfMsg (cMessage *)
 Handle self messages such as timers.
virtual void handleLowerControl (cMessage *msg)
 Handle control messages from lower layer.
virtual void receiveBBItem (int category, const BBItem *details, int scopeModuleId)
 Called by the Blackboard whenever a change occurs we're interested in.

Protected Types

typedef std::list< MacPkt * > MacQueue
enum  States { RX, TX }
 MAC states. More...

Protected Member Functions

void prepareSend ()
 Prepare sending of a packet (switch the radio).

Protected Attributes

States macState
 kepp track of MAC state
RadioState::States radioState
 Current state of active channel (radio), set using radio, updated via BB.
int catRadioState
 category number given by bb for RadioState
 cached pointer to radio module
MacQueue macQueue
 A queue to store packets from upper layer in case another packet is still waiting for transmission..
unsigned int queueLength
 length of the queue

Detailed Description

MAC module which provides pure Aloha.

This is an implementation of a pure Aloha (not slottes). The idea of Aloha is to send a packet whenever a packet is ready to be sent.

If a packet from the upper layer arrives although there is still another packet waiting for its transmission or being transmitted the new packet is stored in a queue. The length of this queue can be specified by the user in the omnetpp.ini file. By default the length is 10. The minimum queue length is 1. If the queue is full new packet(s) will be deleted.

Marc Löbbers, Yosia Hadisusanto, Andreas Koepke

Member Enumeration Documentation

enum AlohaMacLayer::States [protected]

MAC states.

The MAC states help to keep track what the MAC is actually trying to do -- this is esp. useful when radio switching takes some time. RX -- MAC accepts packets from PHY layer TX -- MAC transmits a packet

Member Function Documentation

void AlohaMacLayer::handleSelfMsg cMessage *  msg  )  [virtual]

Handle self messages such as timers.

After the timer expires try to retransmit the message by calling handleUpperMsg again.

Implements BasicLayer.

void AlohaMacLayer::receiveBBItem int  category,
const BBItem details,
int  scopeModuleId

Called by the Blackboard whenever a change occurs we're interested in.

Update the internal copies of interesting BB variables

Reimplemented from BasicModule.

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