PortMux Class Reference

Inheritance diagram for PortMux:

Inheritance graph
[legend]
Collaboration diagram for PortMux:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PortMux ()
virtual ~PortMux ()
virtual void recv (Packet *p)
virtual void recv (Packet *p, int idSrc)
virtual int command (int argc, const char *const *argv)

Protected Attributes

int * ports_
int * ids_
int allocatedPort_
int allocatedId_

Detailed Description

Definition at line 35 of file port-mux.h.


Member Function Documentation

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

Abstract method which has to be filled with the ad-hoc operations that the module has to do to the packet received

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

Implements Module.

Definition at line 114 of file port-mux.cc.

void PortMux::recv ( Packet *  p,
int  idSrc 
) [virtual]

Call the recv method with only the Packet parameter, by extending it it is possible to use the information stored in idSrc to understand with module has sent this packet

Parameters:
p pointer to the packet will be received
idSrc unique id of the module that has sent the packet
See also:
SAP, ChSAP

Reimplemented from Module.

Definition at line 120 of file port-mux.cc.

References allocatedPort_, ids_, ports_, Module::sendDown(), Module::sendUp(), and UP.

Here is the call graph for this function:

int PortMux::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 PlugIn

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:
PlugIn

Reimplemented from Module.

Definition at line 54 of file port-mux.cc.

References allocatedId_, allocatedPort_, Module::command(), PlugIn::getId(), Module::getUpLaySAP(), Module::getUpLaySAPnum(), ids_, and ports_.

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