urv.olsr.data.routing
Class RoutingTable

java.lang.Object
  extended by urv.olsr.data.routing.RoutingTable
All Implemented Interfaces:
Loggable, BandwidthUpdatable

public class RoutingTable
extends java.lang.Object
implements Loggable, BandwidthUpdatable

Contains routing information. It defines which is the next intermediate node A that should receive the message when we want to deliver a message to node B

Author:
Marcel Arrufat Arias

Constructor Summary
RoutingTable(OLSRNode localNode)
           
 
Method Summary
 void addRoutingTableEntry(OLSRNode destAddr, OLSRNode nextAddr, int hops)
          Adds a new entry to the routing table
 void clear()
          Empties the routing table
 RoutingTableEntry getRoutingTableEntry(OLSRNode node)
          Obtains an entry from the routing table
 void setCopyOfTable(RoutingTable tmpRoutingTable)
          Copies an existing routing table, which is calculated in another thread, to the current table
 java.lang.String toString()
           
 void updateBwOf(OLSRNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutingTable

public RoutingTable(OLSRNode localNode)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface Loggable
Overrides:
toString in class java.lang.Object

updateBwOf

public void updateBwOf(OLSRNode node)
Specified by:
updateBwOf in interface BandwidthUpdatable

addRoutingTableEntry

public void addRoutingTableEntry(OLSRNode destAddr,
                                 OLSRNode nextAddr,
                                 int hops)
Adds a new entry to the routing table

Parameters:
destAddr -
nextAddr -
hops -

clear

public void clear()
Empties the routing table


getRoutingTableEntry

public RoutingTableEntry getRoutingTableEntry(OLSRNode node)
Obtains an entry from the routing table

Parameters:
node -
Returns:

setCopyOfTable

public void setCopyOfTable(RoutingTable tmpRoutingTable)
Copies an existing routing table, which is calculated in another thread, to the current table

Parameters:
tmpRoutingTable -