|
Sun SPOT Telemetry Demo -- Host side v1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.sunspotworld.demo.AccelerometerListener
public class AccelerometerListener
Simple example class to locate a remote service (on a SPOT), to connect to it and send it a variety of commands. In this case to set or calibrate the SPOT's accelerometer and to return a stream of accelerometer telemetry information.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
AccelerometerListener()
Create a new AccelerometerListener to connect to the remote SPOT over the radio. |
|
| Method Summary | |
|---|---|
void |
clear()
Routine to reset after old data has been cleared from the GUI display. |
void |
doBlink()
Send a request to the remote SPOT to blink its LEDs. |
void |
doCalibrate()
Send a request to the remote SPOT to calibrate the accelerometer. |
void |
doGetScale()
Send a request to the remote SPOT to report on which accelerometer scale it is using. |
void |
doPing()
Send a request to the remote SPOT to report on radio signal strength. |
void |
doQuit()
Stop running. |
void |
doSendData(boolean sendIt,
GraphView gView)
Send a request to the remote SPOT to start or stop sending accelerometer readings. |
void |
doSetScale(int val)
Send a request to the remote SPOT to set which accelerometer scale it will use. |
boolean |
is2GScale()
Report which scale is the accelerometer is using. |
void |
reconnect()
Send a request to the remote SPOT to report on radio signal strength. |
void |
run()
Main runtime loop to connect to a remote SPOT. |
void |
setGUI(TelemetryFrame fr)
Specify the GUI window that shows whether connected to a remote SPOT. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AccelerometerListener()
| Method Detail |
|---|
public boolean is2GScale()
public void setGUI(TelemetryFrame fr)
fr - the TelemetryFrame GUI that will be used to display the connection status to the remote SPOTpublic void doGetScale()
public void doSetScale(int val)
val - the scale to use: 2 or 6public void doCalibrate()
public void doSendData(boolean sendIt,
GraphView gView)
sendIt - true to start sending, false to stopgView - the GraphView display to pass the data topublic void doPing()
public void doBlink()
public void doQuit()
public void reconnect()
public void clear()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
Sun SPOT Telemetry Demo -- Host side v1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||