|
Sun SPOT Telemetry Demo -- SPOT-side v1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sunspotworld.demo.util.LocateService
public class LocateService
Helper class to handle locating a remote service.
Broadcasts a service request periodically and listens for a response. When found calls back to report the IEEE address where the service can be found.
LocateServiceListener| Constructor Summary | |
|---|---|
LocateService(LocateServiceListener listener,
java.lang.String port,
long checkInterval,
byte requestCmd,
byte replyCmd)
Creates a new instance of LocateService. |
|
LocateService(LocateServiceListener listener,
java.lang.String port,
long checkInterval,
byte requestCmd,
byte replyCmd,
int numHops)
Creates a new instance of LocateService. |
|
| Method Summary | |
|---|---|
void |
setStatusLed(com.sun.spot.sensorboard.peripheral.ITriColorLED led)
Specify an LED to use to display status of search. |
void |
start()
Start searching for a service |
void |
stop()
Stop searching for a service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocateService(LocateServiceListener listener,
java.lang.String port,
long checkInterval,
byte requestCmd,
byte replyCmd)
listener - class to callback when the service is foundport - the port to broadcast & listen oncheckInterval - how long to wait between checkingrequestCmd - the command requesting a connection with the servicereplyCmd - the command the service replys with to indicate it is available
public LocateService(LocateServiceListener listener,
java.lang.String port,
long checkInterval,
byte requestCmd,
byte replyCmd,
int numHops)
listener - class to callback when the service is foundport - the port to broadcast & listen oncheckInterval - how long to wait between checkingrequestCmd - the command requesting a connection with the servicereplyCmd - the command the service replys with to indicate it is availablenumHops - the number of hops the broadcast command should traverse| Method Detail |
|---|
public void setStatusLed(com.sun.spot.sensorboard.peripheral.ITriColorLED led)
led - the LED to use to show the search statuspublic void start()
public void stop()
|
Sun SPOT Telemetry Demo -- SPOT-side v1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||