MMacModule Class Reference

#include <mmac-module.h>

Inheritance diagram for MMacModule:

Inheritance graph
[legend]
Collaboration diagram for MMacModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MMacModule ()
virtual ~MMacModule ()=0
virtual int command (int argc, const char *const *argv)
virtual void recv (Packet *p)
virtual void recv (Packet *p, Handler *callback)
virtual void rx (Packet *p)=0
virtual void tx (Packet *p)=0
int crLaySynchronousCommand (ClMessage *m)
int recvSyncClMsg (ClMessage *m)
virtual int addr ()
virtual void resume ()

Private Attributes

int index_
Queue * ifq_

Detailed Description

Base class for mac layer modules

Definition at line 40 of file mmac-module.h.


Constructor & Destructor Documentation

MMacModule::MMacModule (  ) 

Constructor

Definition at line 36 of file mmac-module.cc.

MMacModule::~MMacModule (  )  [pure virtual]

Desctructor

Definition at line 40 of file mmac-module.cc.


Member Function Documentation

int MMacModule::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL commander

Reimplemented from Module.

Definition at line 44 of file mmac-module.cc.

References Module::command(), and ifq_.

Here is the call graph for this function:

void MMacModule::recv ( Packet *  p  )  [virtual]

Recieve method, Used in Miracle communication If ifq_ is set, send downgoing packets through the queue

Implements Module.

Definition at line 80 of file mmac-module.cc.

References ifq_, rx(), tx(), and UP.

Here is the call graph for this function:

void MMacModule::recv ( Packet *  p,
Handler *  callback 
) [virtual]

Recieve method, used for packets comming from queue

Reimplemented from Module.

Definition at line 97 of file mmac-module.cc.

References rx(), tx(), and UP.

Here is the call graph for this function:

virtual void MMacModule::rx ( Packet *  p  )  [pure virtual]

Recieve packet from layers below Needs to be implemented in implementing classes

Parameters:
p The received packet

Implemented in GenericMacModule.

Referenced by recv().

virtual void MMacModule::tx ( Packet *  p  )  [pure virtual]

Transmit packet from layers above Needs to be implemented in implementing classes

Parameters:
p The packet to transmit

Implemented in GenericMacModule.

Referenced by recv().

int MMacModule::crLaySynchronousCommand ( ClMessage m  )  [virtual]

Receive syncronous commands (DEPRECATED interface)

Parameters:
m The incomming message

Reimplemented from PlugIn.

Definition at line 107 of file mmac-module.cc.

References addr(), PlugIn::crLaySynchronousCommand(), and ClMessage::type().

Here is the call graph for this function:

int MMacModule::recvSyncClMsg ( ClMessage m  )  [virtual]

Receive syncronous commands (DEPRECATED interface)

Parameters:
m The incomming message

Reimplemented from PlugIn.

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

References addr(), PlugIn::recvSyncClMsg(), and ClMessage::type().

Here is the call graph for this function:

int MMacModule::addr (  )  [virtual]

Get the MAC address

Returns:
The MAC address

Definition at line 135 of file mmac-module.cc.

References index_.

Referenced by crLaySynchronousCommand(), and recvSyncClMsg().

void MMacModule::resume (  )  [virtual]

Tell a queue that we are clear to send new packets Should be called after sendDown()

Definition at line 140 of file mmac-module.cc.

References ifq_.

Referenced by GenericMacModule::tx().


Member Data Documentation

int MMacModule::index_ [private]

MAC address

Definition at line 104 of file mmac-module.h.

Referenced by addr().

Queue* MMacModule::ifq_ [private]

Pointer to a queue used to queue incomming packets

Definition at line 107 of file mmac-module.h.

Referenced by command(), recv(), and resume().


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