#include <port-map.h>
Inheritance diagram for PortMap:
Public Member Functions | |
PortMap () | |
virtual | ~PortMap () |
virtual void | recv (Packet *p) |
virtual void | recv (Packet *p, int idSrc) |
virtual int | assignPort (Module *m) |
virtual int | command (int argc, const char *const *argv) |
Protected Attributes | |
int | portcounter |
map< int, int > | port_map |
map< int, int > | id_map |
int | debug_ |
Definition at line 47 of file port-map.h.
void PortMap::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
p | pointer to the packet will be received |
Implements Module.
Definition at line 78 of file port-map.cc.
void PortMap::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
p | pointer to the packet will be received | |
idSrc | unique id of the module that has sent the packet |
Reimplemented from Module.
Definition at line 87 of file port-map.cc.
References debug_, Module::drop(), id_map, port_map, portcounter, Module::sendDown(), Module::sendUp(), and UP.
Here is the call graph for this function:
int PortMap::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
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) |
Reimplemented from Module.
Definition at line 53 of file port-map.cc.
References assignPort(), and Module::command().
Here is the call graph for this function:
map<int, int> PortMap::id_map [protected] |
value = port; key = id
Definition at line 61 of file port-map.h.
Referenced by assignPort(), and recv().
int PortMap::debug_ [protected] |
value = id; key = port
Definition at line 63 of file port-map.h.
Referenced by assignPort(), PortMap(), and recv().