#include <mmac-aloha.h>
Inheritance diagram for MMacAloha:
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. |
Definition at line 57 of file mmac-aloha.h.
void MMacAloha::recvFromUpperLayers | ( | Packet * | p | ) | [protected, virtual] |
Handle a packet coming from upper layers
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.
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.
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.
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: