SunSPOT API V5.0


com.sun.spot.peripheral.radio.routing
Class RouteInfo

java.lang.Object
  extended by com.sun.spot.peripheral.radio.routing.RouteInfo

public class RouteInfo
extends Object

An object that describes a basic route entry. It contains the final destination, next hop and number of hops between this node and the destination

Version:
0.1
Author:
Allen Ajit George

Field Summary
 long destination
          The final destination address
 int hopCount
          total number of hops between this node and the destination
 long nextHop
          next node on the route to the destination
 
Constructor Summary
RouteInfo(long destination, long nextHop, int hopCount)
          Create a RouteInfo object using all three components: destination, next hop and total hop count
 
Method Summary
static RouteInfo fromString(String s)
           
 long getDestination()
          return the destination for this RouteInfo object
 String toString()
          create a string represenation of this object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

destination

public long destination
The final destination address


nextHop

public long nextHop
next node on the route to the destination


hopCount

public int hopCount
total number of hops between this node and the destination

Constructor Detail

RouteInfo

public RouteInfo(long destination,
                 long nextHop,
                 int hopCount)
Create a RouteInfo object using all three components: destination, next hop and total hop count

Parameters:
destination - The IEEE Address (as a long) of the route destination
nextHop - The IEEE Address (as a long) of the next hop to the detination address
hopCount - number of hops to the final destination of this route
Method Detail

getDestination

public long getDestination()
return the destination for this RouteInfo object

Returns:
the destination address for this route entry

toString

public String toString()
create a string represenation of this object

Overrides:
toString in class Object
Returns:
the string representation of this destination, next hop, hop count tuple.

fromString

public static RouteInfo fromString(String s)

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.