ChannelModule Class Reference

#include <channel-module.h>

Inheritance diagram for ChannelModule:

Inheritance graph
[legend]
Collaboration diagram for ChannelModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ChannelModule ()
virtual ~ChannelModule ()
virtual int command (int argc, const char *const *argv)
virtual void recv (Packet *p, Handler *h)
virtual void recv (Packet *p)
virtual void recv (Packet *p, ChSAP *chsap)=0
ChSAPgetChSAP (int i)
void swapChSAP (int i, int j)
int getChSAPnum ()

Detailed Description

The ChannelModule class is a module which has connection (SAP) only to the above layer side through the apposite ChSAP

See also:
ChSAP, Module

Definition at line 47 of file channel-module.h.


Constructor & Destructor Documentation

ChannelModule::ChannelModule (  ) 

ChannelModule constructor

Definition at line 33 of file channel-module.cc.

ChannelModule::~ChannelModule (  )  [virtual]

ChannelModule destructor

Definition at line 37 of file channel-module.cc.


Member Function Documentation

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

TCL command interpreter. It implements the following OTcl methods:

Moreover it inherits all the OTcl method of Module

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no
See also:
Module, ChSAP, PlugIn

Reimplemented from Module.

Reimplemented in LinkChannelModule, UmtsWirelessChModule, DumbWirelessChModule, and WirelessChModule.

Definition at line 43 of file channel-module.cc.

References Module::addUpSAP(), and Module::command().

Referenced by WirelessChModule::command(), DumbWirelessChModule::command(), UmtsWirelessChModule::command(), and LinkChannelModule::command().

Here is the call graph for this function:

void ChannelModule::recv ( Packet *  p,
Handler *  h 
) [virtual]

Call the recv method casting the Handler parameter as a ChSAP in order to interface old version of code with the new one

Parameters:
p pointer to the packet will be received
h pointer to a Handler class
See also:
ChSAP

Reimplemented from Module.

Reimplemented in LinkChannelModule.

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

Referenced by ChSAP::handle(), recv(), and ChSAP::sendDown().

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

Method that intefaces the basic recv method (with only packet as parameter) with the specific Channel Module recv method, which uses the ChSAP to have knowledges about the source

Parameters:
p pointer to the packet will be received
See also:
ChSAP

Implements Module.

Definition at line 85 of file channel-module.cc.

References recv().

Here is the call graph for this function:

virtual void ChannelModule::recv ( Packet *  p,
ChSAP chsap 
) [pure virtual]

Abstract method used to receive packet from the module of the above layer, it gives also knowledges about the source through the instance of ChSAP which connected them

Parameters:
p pointer to the packet will be received
chsap pointer of the instance which connects the ChannelModule with the source Module
See also:
ChSAP, Module

Implemented in LinkChannelModule, UmtsWirelessChModule, DumbWirelessChModule, and WirelessChModule.

ChSAP * ChannelModule::getChSAP ( int  i  ) 

Return a pointer to instance of the i-ChSAP

Parameters:
i index of the ChSAP requested
See also:
ChSAP

Definition at line 68 of file channel-module.cc.

References Module::getUpLaySAP().

Referenced by UmtsWirelessChModule::command(), WirelessChModule::getInfluencedNodes(), WirelessChModule::sendUpPhy(), DumbWirelessChModule::sendUpPhy(), UmtsWirelessChModule::sendUpPhy(), and WirelessChModule::sortChSAPList().

Here is the call graph for this function:

void ChannelModule::swapChSAP ( int  i,
int  j 
)

Swap two instances of the ChSAP installed, i.e., the i-ChSAP one with the j-ChSAP one

Parameters:
i index of the first ChSAP to be swapped
j index of the second ChSAP to be swapped
See also:
ChSAP

Definition at line 74 of file channel-module.cc.

References Module::swapUpLaySAP().

Referenced by WirelessChModule::sortChSAPList().

Here is the call graph for this function:

int ChannelModule::getChSAPnum (  ) 

Return the number of ChSAP installed

Returns:
the number of ChSAP installed
See also:
ChSAP

Definition at line 63 of file channel-module.cc.

References Module::getUpLaySAPnum().

Referenced by UmtsWirelessChModule::command(), WirelessChModule::getInfluencedNodes(), DumbWirelessChModule::sendUpPhy(), UmtsWirelessChModule::sendUpPhy(), and WirelessChModule::sortChSAPList().

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:48:26 2008 for NS-MIRACLE library by  doxygen 1.5.2