MMacAloha Class Reference

#include <mmac-aloha.h>

Inheritance diagram for MMacAloha:

Inheritance graph
[legend]
Collaboration diagram for MMacAloha:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MMacAloha ()

Protected Member Functions

virtual void recvFromUpperLayers (Packet *p)
virtual void Phy2MacEndTx (const Packet *p)
virtual void Phy2MacStartRx (const Packet *p)
virtual void Phy2MacEndRx (Packet *p)

Protected Attributes

std::queue< Packet * > Q
bool TxActive
 MAC queue used for packet scheduling.

Detailed Description

Very very basic ALOHA implementation. No backoff, no ACK, no retransmission, infinite queue.

Definition at line 57 of file mmac-aloha.h.


Member Function Documentation

void MMacAloha::recvFromUpperLayers ( Packet *  p  )  [protected, virtual]

Handle a packet coming from upper layers

Parameters:
p pointer to the packet

Reimplemented from MMac.

Definition at line 67 of file mmac-aloha.cc.

References MMac::Mac2PhyStartTx(), Q, and TxActive.

Here is the call graph for this function:

void MMacAloha::Phy2MacEndTx ( const Packet *  p  )  [protected, virtual]

Handle the end-of-PHY-transmission event

This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.

Parameters:
p pointer to the packet whose transmission has ended. Note that the Packet is not any more under control of the MAC at the time this event occurs, hence the 'const' declaration.

Reimplemented from MMac.

Definition at line 88 of file mmac-aloha.cc.

References MMac::Mac2PhyStartTx(), Q, and TxActive.

Here is the call graph for this function:

void MMacAloha::Phy2MacStartRx ( const Packet *  p  )  [protected, virtual]

Handle the detected-start-of-PHY-reception event (e.g., PHY preamble successfully detected, so we expect to receive a new packet, possibly with errors)

This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.

Parameters:
p pointer to the packet whose reception has begun. Note that the Packet is not yet under control of the MAC at the time this event occurs, hence the 'const' declaration.

Reimplemented from MMac.

Definition at line 114 of file mmac-aloha.cc.

void MMacAloha::Phy2MacEndRx ( Packet *  p  )  [protected, virtual]

Handle the end-of-PHY-reception event

This method is expected to be re- implemented by a class inheriting from MMac in order to perform the necessary MAC operations.

Parameters:
p pointer to the packet whose reception has ended. The receiving MAC can modify it at will (changing header fields, deleting it...)

Reimplemented from MMac.

Definition at line 121 of file mmac-aloha.cc.

References Module::drop(), and Module::sendUp().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:49:59 2008 for NS-MIRACLE library by  doxygen 1.5.2