RouteReachable Class Reference

#include <routing-module.h>

Inheritance diagram for RouteReachable:

Inheritance graph
[legend]
Collaboration diagram for RouteReachable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RouteReachable (int source)
virtual ~RouteReachable ()
void setAddress (char *a)
char * getAddress ()
void addRouteInfo (RouteInfo *i)
int length ()
RouteInfogetRouteInfo (int id)
RouteInfo ** getRouteInfo ()
void empty ()
int isMyIP ()
void setMyIP ()
void processed (int value)
int processed ()
int getIndex (int id)

Private Attributes

RouteInfo ** info_
int nInfo_
int * modules_
int nModules_
int infoLen_
char addr_ [MRCL_ADDRESS_MAX_LEN]
int myIP_
int processed_

Detailed Description

The cross layer message is used in order to discover if there is any module which know the route to the destination

Definition at line 59 of file routing-module.h.


Constructor & Destructor Documentation

RouteReachable::RouteReachable ( int  source  ) 

Class constructor

Parameters:
source Id of the module which send the message

Definition at line 35 of file routing-module.cc.

References addr_, MRCL_ADDRESS_MAX_LEN, and ClMessage::setSource().

Here is the call graph for this function:

RouteReachable::~RouteReachable (  )  [virtual]

Class destructor

Definition at line 41 of file routing-module.cc.

References info_, and infoLen_.


Member Function Documentation

void RouteReachable::setAddress ( char *  a  ) 

Set the Address for which the route can be found

Parameters:
a pointer to the destination address

Definition at line 47 of file routing-module.cc.

References addr_, and MrclAddress::storeAddr().

Referenced by MrclRouting::getConfiguration().

Here is the call graph for this function:

char * RouteReachable::getAddress (  ) 

Returns:
The address for which the route can be found

Definition at line 52 of file routing-module.cc.

References addr_.

Referenced by MrclRouting::getRoute().

void RouteReachable::addRouteInfo ( RouteInfo i  ) 

Add a RouteInfo in the internal data structure. This method is used by the modules which receives the message in order to add newer route information

Parameters:
i the new Routeinf which can be added

Definition at line 57 of file routing-module.cc.

References RouteInfo::getModuleId(), info_, infoLen_, modules_, nInfo_, nModules_, and ROUTE_REACHABLE_ALLOC_INFO_PER_TIME.

Referenced by MrclRouting::getConfiguration(), and MrclRouting::recvSyncClMsg().

Here is the call graph for this function:

int RouteReachable::length (  ) 

Returns:
The number of RouteInfo which are stored in the internal data structure

Definition at line 100 of file routing-module.cc.

References nInfo_.

Referenced by MrclRouting::findNextLeaf(), and MrclRouting::getConfiguration().

RouteInfo * RouteReachable::getRouteInfo ( int  id  ) 

Parameters:
id id of the module which you looking for the RouteInfo
Returns:
The pointer to the RouteInfo with id equal to id, 0 whether the RouteInfo is not found.
Remarks:
The returned array cannot be deallocated

Definition at line 105 of file routing-module.cc.

References info_, modules_, and nModules_.

Referenced by MrclRouting::findNextLeaf(), MrclRouting::getConfiguration(), MrclRouting::getRoute(), and MrclRouting::recvSyncClMsg().

RouteInfo ** RouteReachable::getRouteInfo (  ) 

Returns:
The list of the discovered RouteInfo.

Definition at line 118 of file routing-module.cc.

References info_.

void RouteReachable::empty (  ) 

Empty the internal data structure

Definition at line 123 of file routing-module.cc.

References info_, modules_, myIP_, nInfo_, and nModules_.

Referenced by MrclRouting::getConfiguration(), and MrclRouting::recvSyncClMsg().


Member Data Documentation

RouteInfo** RouteReachable::info_ [private]

Array which contain the collected RouteInfo

Definition at line 119 of file routing-module.h.

Referenced by addRouteInfo(), empty(), getRouteInfo(), and ~RouteReachable().

int RouteReachable::nInfo_ [private]

Number of RouteInfo stored in info_

Definition at line 123 of file routing-module.h.

Referenced by addRouteInfo(), empty(), and length().

int* RouteReachable::modules_ [private]

Array which contain the position of a modules RouteInfo in the info_ array

Definition at line 127 of file routing-module.h.

Referenced by addRouteInfo(), empty(), getIndex(), and getRouteInfo().

int RouteReachable::nModules_ [private]

Length of modules_;

Definition at line 131 of file routing-module.h.

Referenced by addRouteInfo(), empty(), getIndex(), and getRouteInfo().

int RouteReachable::infoLen_ [private]

Length of info_

Definition at line 135 of file routing-module.h.

Referenced by addRouteInfo(), and ~RouteReachable().

char RouteReachable::addr_[MRCL_ADDRESS_MAX_LEN] [private]

The address for which the route can be found

Definition at line 139 of file routing-module.h.

Referenced by getAddress(), RouteReachable(), and setAddress().


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