#include <routing-module.h>
Inheritance diagram for MrclRouting:


Public Member Functions | |
| MrclRouting () | |
| virtual | ~MrclRouting () |
| virtual int | command (int argc, const char *const *argv) |
| virtual int | recvSyncClMsg (ClMessage *m) |
| void | recv (Packet *p) |
Protected Member Functions | |
| virtual int | controlPacket (Packet *p)=0 |
| virtual char * | getNextHop (Packet *p)=0 |
| int | getRoute (MrclAddress *a, Packet *p, int i) |
| int | getRoute (char *addr, Packet *p, int i) |
| virtual int | canIReach (char *a, Metric ***m)=0 |
| virtual void | forward (Packet *p)=0 |
| virtual void | resolve (Packet *p)=0 |
| void | addAddress (MrclAddress *a) |
| MrclAddress * | getAddress (int i) |
| int | nAddresses () |
| int | isMyAddress (char *addr) |
Protected Attributes | |
| int | overheadLength_ |
Private Member Functions | |
| int | getConfiguration (char *a, int source=-1) |
| int | findNextLeaf (int i=-1) |
Private Attributes | |
| MrclAddress ** | addresses_ |
| int | nAddresses_ |
| RouteReachable * | rr_ |
| double | lastGetConfiguration_ |
| DinArray | routes_ |
| double | delayUp_ |
| double | delayDown_ |
Friends | |
| class | RoutingQueue |
Definition at line 164 of file routing-module.h.
| MrclRouting::MrclRouting | ( | ) |
| MrclRouting::~MrclRouting | ( | ) | [virtual] |
| int MrclRouting::command | ( | int | argc, | |
| const char *const * | argv | |||
| ) | [virtual] |
TCL command interpreter. It implements the following OTcl methods:
| 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.
Reimplemented in MrclRoutingStatic, and AodvModule.
Definition at line 185 of file routing-module.cc.
References addAddress(), Module::command(), getAddress(), nAddresses(), rr_, MrclAddress::strlen(), and MrclAddress::toString().
Referenced by MrclRoutingStatic::command(), and AodvModule::command().
Here is the call graph for this function:

| int MrclRouting::recvSyncClMsg | ( | ClMessage * | m | ) | [virtual] |
Entry point for the synchronous cross layer message. It implements the answer to the CL_ROUTEMESSAGE.
| m | pointer to the receives cross layer message |
Reimplemented from PlugIn.
Definition at line 325 of file routing-module.cc.
References RouteReachable::addRouteInfo(), RouteReachable::empty(), getAddress(), getConfiguration(), RouteReachable::getRouteInfo(), ClMessage::getSource(), PlugIn::recvSyncClMsg(), rr_, and ClMessage::type().
Here is the call graph for this function:

| void MrclRouting::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 507 of file routing-module.cc.
References addresses_, RoutingHdr::clearModuleRoute(), controlPacket(), delayDown_, delayUp_, DOWN, MrclAddress::getAddr(), PlugIn::getId(), RoutingHdr::getModuleRoute(), getNextHop(), HDR_ROUTING, RoutingHdr::moduleRouteCount(), nAddresses(), RoutingHdr::nexthop(), RoutingHdr::saddr(), Module::sendDown(), Module::sendUp(), RoutingHdr::sendup(), and MrclAddress::storeAddr().
Here is the call graph for this function:

| virtual int MrclRouting::controlPacket | ( | Packet * | p | ) | [protected, pure virtual] |
Abstract method to be extended by the specific routing algorithm in order to get all the info it needed from its control packets
| p | pointer to the received packet |
Implemented in MrclRoutingStatic, and AodvModule.
Referenced by recv().
| virtual char* MrclRouting::getNextHop | ( | Packet * | p | ) | [protected, pure virtual] |
Abstract method used to solve the routing of the packet as function of the specific routing algorithm
| p | pointer to the received packet |
Implemented in MrclRoutingStatic, and AodvModule.
Referenced by recv().
| virtual int MrclRouting::canIReach | ( | char * | a, | |
| Metric *** | m | |||
| ) | [protected, pure virtual] |
This method is called by isReachable and it say if a particular destination can be reach by the current module.
| a | Pointer to the address of the node which can be reached | |
| m | [out] reference to a ponter of metric returned by the method |
Implemented in MrclRoutingStatic, and AodvModule.
Referenced by getConfiguration().
| int MrclRouting::getConfiguration | ( | char * | a, | |
| int | source = -1 | |||
| ) | [private] |
This method has to be called in order to understand whether a particular destination can be reached towards the current module or another module in the node.
| a | Pointer to the address of the node which can be reached | |
| source | Id of the module at which do not propagates the accessibility request. If it assumes negative values the request will be propagated to all the adjacentes modules |
Definition at line 234 of file routing-module.cc.
References RouteInfo::addChild(), RouteInfo::addFather(), RouteInfo::addMetric(), addresses_, RouteReachable::addRouteInfo(), MrclAddress::areEqual(), canIReach(), RouteReachable::empty(), Module::getDownLaySAP(), Module::getDownLaySAPnum(), PlugIn::getId(), SAP::getModuleDownId(), SAP::getModuleUpId(), RouteReachable::getRouteInfo(), Module::getUpLaySAP(), Module::getUpLaySAPnum(), RouteReachable::isMyIP(), RouteReachable::length(), MAYBE, nAddresses_, RouteReachable::processed(), REACHABLE, rr_, Module::sendSyncClMsgDown(), Module::sendSyncClMsgUp(), RouteReachable::setAddress(), ClMessage::setDest(), RouteInfo::setModuleId(), RouteInfo::setReachability(), and UNREACHABLE.
Referenced by getRoute(), and recvSyncClMsg().
Here is the call graph for this function:

MrclAddress** MrclRouting::addresses_ [private] |
Array of the addresses of the current module
Definition at line 254 of file routing-module.h.
Referenced by addAddress(), getAddress(), getConfiguration(), and recv().
int MrclRouting::nAddresses_ [private] |
Length of addresses_
Definition at line 258 of file routing-module.h.
Referenced by addAddress(), getAddress(), getConfiguration(), and nAddresses().
RouteReachable* MrclRouting::rr_ [private] |
Pointer to the cross layer message which will be propagated toward the adjectes modules in ordert to retrive information about the accessibility of a particular destination. It is allocated as soon as an id is assigned to the current module.
Definition at line 264 of file routing-module.h.
Referenced by command(), findNextLeaf(), getConfiguration(), getRoute(), recvSyncClMsg(), and ~MrclRouting().
double MrclRouting::lastGetConfiguration_ [private] |
Last instant when the configuration has been computed
Definition at line 268 of file routing-module.h.
Referenced by getRoute().
DinArray MrclRouting::routes_ [private] |
Last computed routes
Reimplemented in MrclRoutingStatic.
Definition at line 272 of file routing-module.h.
Referenced by getRoute().
double MrclRouting::delayUp_ [private] |
The delay introduced by the module before transmit to the upper module
Definition at line 276 of file routing-module.h.
Referenced by recv().
double MrclRouting::delayDown_ [private] |
The delay introduced by the module before transmit to the lower modules
Definition at line 280 of file routing-module.h.
Referenced by recv().
1.5.2