|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
com.sun.spot.service.BasicService
com.sun.spot.peripheral.radio.mhrp.aodv.AODVManager
public class AODVManager
Implements a Routing Manager based on the Ad Hoc On Demand Distance Vector (AODV) Routing protocol.
| Field Summary |
|---|
| Fields inherited from interface com.sun.spot.service.IService |
|---|
PAUSED, PAUSING, READY, RESUMING, RUNNING, STARTING, STOPPED, STOPPING |
| Method Summary | |
|---|---|
void |
addEventListener(IMHEventListener listener)
Registers an event listener that is notified when this node initiates/receives supported route events |
void |
deregisterEventListener(IMHEventListener listener)
Deregisters an application etc. that wasregistered for route events |
void |
enableAdvertising(boolean enable)
Control if an advertising thread will be run. |
boolean |
findRoute(long address,
RouteEventClient eventClient,
Object uniqueKey)
This method triggers a new route request. |
int |
getCurrentSequenceNumber()
|
boolean |
getEnabled()
Return whether service is started automatically on reboot. |
static AODVManager |
getInstance()
|
int |
getMaximumHops()
Returns the "Network Diameter" of this mesh network. |
int |
getNextSequenceNumber()
This method creates new sequence numbers. |
int |
getNextSequenceNumber(int givenNumber)
This method creates new sequence numbers. |
RouteInfo |
getRouteInfo(long address)
This method is called to obtain a route info, and to refreshen a route whenever it is used |
RouteTable |
getRoutingTable()
This method returns a snapshot of the routing table |
String |
getServiceName()
Return the name of this service. |
int |
getStatus()
Return the current status of this service. |
void |
initialize(long ourAddress,
ILowPan lowPan)
initializes this routing manager |
boolean |
initiateRouteDiscovery(long address)
|
boolean |
invalidateRoute(long originator,
long destination)
This method is called when it is recognized that the route is broken somewhere. |
boolean |
isRunning()
Return whether the service is currently running. |
boolean |
pause()
Pause the service, and return whether successful. |
void |
registerEventListener(IMHEventListener listener)
Registers an application etc. that is notified when this node processes supported route events |
void |
removeEventListener(IMHEventListener listener)
Remove the specified event listener that was registered for route events |
boolean |
resume()
Resume the service, and return whether successful. |
void |
setEnabled(boolean enable)
Enable/disable whether service is started automatically. |
void |
setServiceName(String who)
Assign a name to this service. |
boolean |
start()
Start the service, and return whether successful. |
boolean |
stop()
Stop the service, and return whether successful. |
| Methods inherited from class com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Method Detail |
|---|
public static AODVManager getInstance()
public void initialize(long ourAddress,
ILowPan lowPan)
initialize in interface IRoutingManagerlowPan - LowPan layer that is our route clientpublic RouteTable getRoutingTable()
getRoutingTable in interface IRoutingManagerpublic RouteInfo getRouteInfo(long address)
getRouteInfo in interface IRoutingManageraddress - destination for which this method returns a route info
public boolean findRoute(long address,
RouteEventClient eventClient,
Object uniqueKey)
throws NoRouteException
findRoute in interface IRoutingManagerNoRouteExceptionpublic boolean initiateRouteDiscovery(long address)
public boolean invalidateRoute(long originator,
long destination)
invalidateRoute in interface IRoutingManagerpublic void registerEventListener(IMHEventListener listener)
registerEventListener in interface IRoutingManagerlistener - object that is notified when route events occurpublic void deregisterEventListener(IMHEventListener listener)
deregisterEventListener in interface IRoutingManagerlistener - object that is notified when route events occurpublic void addEventListener(IMHEventListener listener)
addEventListener in interface IRoutingManagerlistener - object that is notified when route events occurpublic void removeEventListener(IMHEventListener listener)
removeEventListener in interface IRoutingManagerlistener - object that is notified when route events occurpublic int getNextSequenceNumber()
public int getNextSequenceNumber(int givenNumber)
givenNumber -
public int getCurrentSequenceNumber()
public void setServiceName(String who)
setServiceName in interface IServicesetServiceName in class BasicServicewho - the name for this servicepublic void setEnabled(boolean enable)
setEnabled in interface IServicesetEnabled in class BasicServiceenable - true if the service should be started automatically on rebootpublic void enableAdvertising(boolean enable)
The AODV Routing Manager normally starts up a special thread to periodically send out a route reply message to advertise this nodes presence to its neighbors. If a SPOT application will be deep sleeping it may want to disable this advertising thread, so the SPOT will not wake up every 30 seconds.
enable - true if advertisements should be sent periodically.public boolean stop()
stop in interface IServicestop in class BasicServicepublic boolean start()
start in interface IServicestart in class BasicServicepublic boolean resume()
resume in interface IServiceresume in class BasicServicepublic boolean pause()
pause in interface IServicepause in class BasicServicepublic boolean isRunning()
isRunning in interface IServiceisRunning in class BasicServicepublic int getStatus()
getStatus in interface IServicegetStatus in class BasicServicepublic String getServiceName()
getServiceName in interface IServicegetServiceName in class BasicServicepublic boolean getEnabled()
getEnabled in interface IServicegetEnabled in class BasicServicepublic int getMaximumHops()
getMaximumHops in interface IRoutingManager
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||