SunSPOT API V3.0


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

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

public class RoutingPolicy
extends Object

An object that describes the basic routing policy


Field Summary
static int ALWAYS
          The node routes all packets and disables deepSleep
static int ENDNODE
          The policy is a routing consumer only
static int IFAWAKE
          we route all packets, but only if we are awake
static int SHAREDBASESTATION
          we are a shared basestation - route always, but also pass broadcasts without decrementing hopcount
static int UNDEFINED
          The policy is a routing consumer only
 
Constructor Summary
RoutingPolicy(int state)
          create a routing policy object
 
Method Summary
 boolean equals(int val)
          compare this policy to a numerical equivilent
 boolean equals(RoutingPolicy rp)
          compare two policy objects
 String toString()
          create a string representation of this routing policy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
The policy is a routing consumer only

See Also:
Constant Field Values

ENDNODE

public static final int ENDNODE
The policy is a routing consumer only

See Also:
Constant Field Values

ALWAYS

public static final int ALWAYS
The node routes all packets and disables deepSleep

See Also:
Constant Field Values

IFAWAKE

public static final int IFAWAKE
we route all packets, but only if we are awake

See Also:
Constant Field Values

SHAREDBASESTATION

public static final int SHAREDBASESTATION
we are a shared basestation - route always, but also pass broadcasts without decrementing hopcount

See Also:
Constant Field Values
Constructor Detail

RoutingPolicy

public RoutingPolicy(int state)
create a routing policy object

Parameters:
state - the type of routing this policy object represents
Method Detail

toString

public String toString()
create a string representation of this routing policy

Overrides:
toString in class Object
Returns:
a string description of the routing policy

equals

public boolean equals(int val)
compare this policy to a numerical equivilent

Parameters:
val - a numerical equivilent for a policy
Returns:
true if the policy matches

equals

public boolean equals(RoutingPolicy rp)
compare two policy objects

Parameters:
rp - the policy to compare this with
Returns:
true if the two policies match

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.