Height Class Reference

#include <tora_packet.h>

Collaboration diagram for Height:

Collaboration graph
[legend]

Detailed Description

Definition at line 56 of file tora_packet.h.

Public Member Functions

int compare (Height *h)
 Height (int ID)
int isNull ()
int isZero ()
void Null ()
void update (Height *h)
void Zero ()

Data Fields

int delta
nsaddr_t id
nsaddr_t oid
int r
double tau


Constructor & Destructor Documentation

Height::Height int  ID  )  [inline]
 

Definition at line 58 of file tora_packet.h.

00058 : tau(-1.0), oid(-1), r(-1), delta(-1), id(ID) {}


Member Function Documentation

int Height::compare Height h  )  [inline]
 

Definition at line 69 of file tora_packet.h.

References delta, id, oid, r, and tau.

Referenced by TORADest::nb_find_max_height(), TORADest::nb_find_min_height(), TORADest::nb_find_min_nonnull_height(), TORADest::nb_find_next_hop(), and TORANeighbor::update_link_status().

00069                                   {
00070         if(h->tau > tau) return 1;     if(tau > h->tau) return -1;
00071         if(h->oid > oid) return 1;     if(oid > h->oid) return -1;
00072         if(h->r > r) return 1;         if(r > h->r) return -1;
00073         if(h->delta > delta) return 1; if(delta > h->delta) return -1;
00074         if(h->id > id) return 1;       if(id > h->id) return -1;
00075 
00076         return 0;               // heights equal
00077     }

int Height::isNull  )  [inline]
 

Definition at line 66 of file tora_packet.h.

References delta, oid, r, and tau.

Referenced by TORADest::nb_check_same_ref(), TORADest::nb_find_max_height(), TORADest::nb_find_min_nonnull_height(), TORADest::nb_find_next_hop(), toraAgent::recvCLR(), toraAgent::recvUPD(), and TORANeighbor::update_link_status().

00066                         {
00067         return (tau == -1.0 && oid == -1 && r == -1 && delta == -1);
00068     }

int Height::isZero  )  [inline]
 

Definition at line 63 of file tora_packet.h.

References delta, oid, r, and tau.

00063                         {
00064         return (tau == 0.0 && oid == 0 && r == 0 && delta == 0);
00065     }

void Height::Null  )  [inline]
 

Definition at line 84 of file tora_packet.h.

References delta, oid, r, and tau.

Referenced by toraAgent::recvCLR(), and toraAgent::recvUPD().

00084 { tau = -1.0; oid = -1; r = -1; delta = -1; }

void Height::update Height h  )  [inline]
 

Definition at line 86 of file tora_packet.h.

References delta, id, oid, r, and tau.

Referenced by TORADest::update_height_nb().

00087     {
00088         tau = h->tau; oid = h->oid; r = h->r;
00089         delta = h->delta; id = h->id;
00090     }

void Height::Zero  )  [inline]
 

Definition at line 82 of file tora_packet.h.

References delta, oid, r, and tau.

Referenced by TORADest::nb_add(), toraAgent::recvCLR(), and toraAgent::recvUPD().

00082 { tau = 0.0; oid = 0; r = 0; delta = 0; }


Field Documentation

int Height::delta
 

Definition at line 95 of file tora_packet.h.

Referenced by compare(), TORANeighbor::dump(), TORADest::dump(), isNull(), isZero(), toraAgent::log_route_table(), toraAgent::logToraDest(), toraAgent::logToraNeighbor(), Null(), toraAgent::recvQRY(), toraAgent::recvUPD(), toraAgent::sendUPD(), update(), TORADest::update_height(), TORADest::update_height_nb(), and Zero().

nsaddr_t Height::id
 

Definition at line 96 of file tora_packet.h.

Referenced by compare(), TORANeighbor::dump(), TORADest::dump(), toraAgent::log_route_table(), toraAgent::logToraDest(), toraAgent::logToraNeighbor(), toraAgent::sendUPD(), update(), and TORADest::update_height().

nsaddr_t Height::oid
 

Definition at line 93 of file tora_packet.h.

Referenced by compare(), TORANeighbor::dump(), TORADest::dump(), isNull(), isZero(), toraAgent::log_route_table(), toraAgent::logToraDest(), toraAgent::logToraNeighbor(), TORADest::nb_check_same_ref(), TORADest::nb_find_min_nonnull_height(), Null(), toraAgent::recvCLR(), toraAgent::recvQRY(), toraAgent::recvUPD(), toraAgent::sendUPD(), update(), TORADest::update_height(), TORADest::update_height_nb(), and Zero().

int Height::r
 

Definition at line 94 of file tora_packet.h.

Referenced by compare(), TORANeighbor::dump(), TORADest::dump(), isNull(), isZero(), toraAgent::log_route_table(), toraAgent::logToraDest(), toraAgent::logToraNeighbor(), TORADest::nb_check_same_ref(), TORADest::nb_find_min_height(), TORADest::nb_find_min_nonnull_height(), Null(), toraAgent::recvCLR(), toraAgent::recvQRY(), toraAgent::recvUPD(), toraAgent::sendUPD(), update(), TORADest::update_height(), TORADest::update_height_nb(), and Zero().

double Height::tau
 

Definition at line 92 of file tora_packet.h.

Referenced by compare(), TORANeighbor::dump(), TORADest::dump(), isNull(), isZero(), toraAgent::log_route_table(), toraAgent::logToraDest(), toraAgent::logToraNeighbor(), TORADest::nb_check_same_ref(), TORADest::nb_find_min_nonnull_height(), Null(), toraAgent::recvCLR(), toraAgent::recvQRY(), toraAgent::recvUPD(), toraAgent::sendUPD(), update(), TORADest::update_height(), TORADest::update_height_nb(), and Zero().


The documentation for this class was generated from the following file:
Generated on Tue Mar 6 17:10:29 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6