Sun SPOT Telemetry Demo -- SPOT-side
v1.1
A B C D F G H I L M N O P Q R S T U W

A

ACCEL_2G_DATA_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply with current accelerometer readings taken using the 2G scale.
ACCEL_6G_DATA_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply with current accelerometer readings taken using the 6G scale.
AccelMonitor - Class in org.sunspotworld.demo
Routines to control and read data from the SPOT's accelerometer and send them via Radiogram packets to a display program running on a host computer.
AccelMonitor(TelemetryMain, int) - Constructor for class org.sunspotworld.demo.AccelMonitor
Create a new accelerometer controller.

B

BLINK_LEDS_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to blink the remote SPOT's LEDs.
BROADCAST_PORT - Static variable in interface org.sunspotworld.demo.PacketTypes
Port to use to locate the host application.

C

calibrate() - Method in class org.sunspotworld.demo.AccelMonitor
Have the accelerometer calculate the current rest offsets.
CALIBRATE_ACCEL_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply to indicate the current accelerometer rest offsets.
CALIBRATE_ACCEL_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to request the accelerometer be calibrated.
cleanup() - Method in class org.sunspotworld.demo.util.Spotlet
Cleanup any resources used by the Spot application.
clk_index - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
closeConnection() - Method in class org.sunspotworld.demo.TelemetryMain
Called to declare that the connection to the host is no longer present.
CONNECTED_PORT - Static variable in interface org.sunspotworld.demo.PacketTypes
Port to use for sending commands and replies between the SPOT and the host application.

D

destroyApp(boolean) - Method in class org.sunspotworld.demo.util.Spotlet
Only called if startApp throws any exception other than MIDletStateChangeException.
DISPLAY_SERVER_AVAIL_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Host reply to indicate it is available.
DISPLAY_SERVER_QUITTING - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to indicate it is quiting.
DISPLAY_SERVER_RESTART - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to indicate it is restarting.
doTask() - Method in class org.sunspotworld.demo.AccelMonitor
Called once per task period to pack up accelerometer readings.
doTask() - Method in class org.sunspotworld.demo.util.PeriodicTask
Called once per task period to perform measurements.

F

firstRun() - Method in class org.sunspotworld.demo.util.Spotlet
Indicate if this is the first time the application has been run.
free(Datagram) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Routine to put a data packet onto the free list.

G

GET_ACCEL_INFO2_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply to return the accelerometer gains.
GET_ACCEL_INFO_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply to indicate the current accelerometer scale & zero offsets.
GET_ACCEL_INFO_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to request the current accelerometer scale & calibration.
getAccInfo() - Method in class org.sunspotworld.demo.AccelMonitor
Send a packet to inform host of current accelerometer settings.
getCounter() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return the current counter value.
getCurrentRunTime() - Method in class org.sunspotworld.demo.util.Spotlet
Return the elapsed time for the current call to the application's run method.
getEnabled() - Method in class org.sunspotworld.demo.util.PacketReceiver
Return whether service is started automatically on reboot.
getEnabled() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Return whether service is started automatically on reboot.
getEnabled() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return whether service is started automatically on reboot.
getLastError() - Method in class org.sunspotworld.demo.util.Spotlet
Return the last Error or Exception thrown by the application.
getLastRunTime() - Method in class org.sunspotworld.demo.util.Spotlet
Return the elapsed time for the previous call to the application's run method.
getNumberRetries() - Method in class org.sunspotworld.demo.util.Spotlet
Return the number of times to retry the application after an error.
getNumberRuns() - Method in class org.sunspotworld.demo.util.Spotlet
Return the number of times the application has been run.
getServiceName() - Method in class org.sunspotworld.demo.util.PacketReceiver
Return service name
getServiceName() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Return service name
getServiceName() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return service name
getStatus() - Method in class org.sunspotworld.demo.util.PacketReceiver
Return current service status.
getStatus() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Return current service status.
getStatus() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return current task execution status.
getTaskPeriod() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return the current doTask period in milliseconds.
getTaskPeriodCount() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return the current doTask period in clock cycles.
getTimeBetweenRetries() - Method in class org.sunspotworld.demo.util.Spotlet
Return the time in milliseconds to wait before retrying the application after an error.
getTotalRunTime() - Method in class org.sunspotworld.demo.util.Spotlet
Return the total time that this application has been running.

H

handlePacket(byte, Radiogram) - Method in class org.sunspotworld.demo.AccelMonitor
Callback from PacketReceiver when a new command is received from the host.
handlePacket(byte, Radiogram) - Method in class org.sunspotworld.demo.TelemetryMain
Callback from PacketReceiver when a new command is received from the host.
handlePacket(byte, Radiogram) - Method in interface org.sunspotworld.demo.util.PacketHandler
Application specific callback routine to receive packets that the class has registered with the PacketReceiver.

I

immediateSend(Datagram) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Routine to immediately send a data packet.
initialize() - Method in class org.sunspotworld.demo.TelemetryMain
Initialize any needed variables.
initialize() - Method in class org.sunspotworld.demo.util.Spotlet
Do any initialization needed by the Spot application.
is2GScale() - Method in class org.sunspotworld.demo.AccelMonitor
Is the accelerometer using the 2G scale?
isRunning() - Method in class org.sunspotworld.demo.util.PacketReceiver
Return if service is currently running.
isRunning() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Return if service is currently running.
isRunning() - Method in class org.sunspotworld.demo.util.PeriodicTask
Return if currently running.

L

LOCATE_DISPLAY_SERVER_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Client command to locate a display server.
LocateService - Class in org.sunspotworld.demo.util
Helper class to handle locating a remote service.
LocateService(LocateServiceListener, String, long, byte, byte) - Constructor for class org.sunspotworld.demo.util.LocateService
Creates a new instance of LocateService.
LocateService(LocateServiceListener, String, long, byte, byte, int) - Constructor for class org.sunspotworld.demo.util.LocateService
Creates a new instance of LocateService.
LocateServiceListener - Interface in org.sunspotworld.demo.util
Interface used by a class wanting to be called back when the requested service has been found.

M

MESSAGE_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply with any error message for the host to display.

N

newDataPacket(byte) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Get a free data packet and write its header.

O

org.sunspotworld.demo - package org.sunspotworld.demo
Sample telemetry application to show use of various helper classes.
org.sunspotworld.demo.util - package org.sunspotworld.demo.util
Helper classes to make it easier to write SPOT applications.

P

PacketHandler - Interface in org.sunspotworld.demo.util
Interface used by a class wanting to be called back when packets are received with a packet type that the class has registered an interest in receiving.
PacketReceiver - Class in org.sunspotworld.demo.util
Simple helper class to monitor a radiogram connection and redirect packets to handlers that have registered an interest in that packet type.
PacketReceiver(RadiogramConnection) - Constructor for class org.sunspotworld.demo.util.PacketReceiver
Creates a new instance of a PacketReceiver.
PacketTransmitter - Class in org.sunspotworld.demo.util
Simple transmit loop to pull packets off of a xmitQueue and send them.
PacketTransmitter(RadiogramConnection) - Constructor for class org.sunspotworld.demo.util.PacketTransmitter
Create a new transmit loop thread.
PacketTransmitter(RadiogramConnection, int) - Constructor for class org.sunspotworld.demo.util.PacketTransmitter
Create a new transmit loop thread and use (multi-packet) datagrams.
PacketTypes - Interface in org.sunspotworld.demo
Packet types for Telemetry app
pause() - Method in class org.sunspotworld.demo.util.PacketReceiver
Pause the service, and return whether successful.
pause() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Pause the service, and return whether successful.
pause() - Method in class org.sunspotworld.demo.util.PeriodicTask
Pause the service, and return whether successful.
pause(long) - Static method in class org.sunspotworld.demo.util.Spotlet
Pause for a specified time.
pauseApp() - Method in class org.sunspotworld.demo.util.Spotlet
This will never be called by the Squawk VM.
PeriodicTask - Class in org.sunspotworld.demo.util
Framework to provide for running a task, such as taking samples, at a regular interval.
PeriodicTask(int) - Constructor for class org.sunspotworld.demo.util.PeriodicTask
Creates a new instance of PeriodicTask.
PeriodicTask(int, int) - Constructor for class org.sunspotworld.demo.util.PeriodicTask
Creates a new instance of PeriodicTask.
PeriodicTask(int, int, int) - Constructor for class org.sunspotworld.demo.util.PeriodicTask
Creates a new instance of PeriodicTask.
PING_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply to a ping includes the radio signal strength & battery level.
PING_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to ping the remote SPOT and get the radio signal strength.
postFlash() - Method in class org.sunspotworld.demo.util.Spotlet
Called by OTACommandServer after flashing a new application.
preFlash() - Method in class org.sunspotworld.demo.util.Spotlet
Called by OTACommandServer before flashing a new application.
prepareToExit() - Method in class org.sunspotworld.demo.util.Spotlet
Callback from USB serial listener indicating that application should quit and control be passed to the system bootloader.
priority - Variable in class org.sunspotworld.demo.util.PeriodicTask
 

Q

queueMessage(String) - Method in class org.sunspotworld.demo.TelemetryMain
Add a message to the queue to be sent to the host at a later time.
quit() - Method in class org.sunspotworld.demo.util.Spotlet
If the Spot application is running have it stop.

R

registerHandler(PacketHandler, byte) - Method in class org.sunspotworld.demo.util.PacketReceiver
Register a handler for some packet type.
reinitialize() - Method in class org.sunspotworld.demo.TelemetryMain
Reinitialize any needed variables after an error.
reinitialize() - Method in class org.sunspotworld.demo.util.Spotlet
Reinitialize the world before re-running the Spot application.
resume() - Method in class org.sunspotworld.demo.util.PacketReceiver
Resume the service, and return whether successful.
resume() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Resume the service, and return whether successful.
resume() - Method in class org.sunspotworld.demo.util.PeriodicTask
Resume the service, and return whether successful.
run() - Method in class org.sunspotworld.demo.TelemetryMain
Main application run loop.
run() - Method in class org.sunspotworld.demo.util.Spotlet
The Spot application code to run as defined by a subclass of Spotlet.

S

send(Datagram) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Routine to queue a data packet for later sending.
SEND_ACCEL_DATA_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to request accelerometer data be sent.
serviceLocated(long) - Method in class org.sunspotworld.demo.TelemetryMain
Callback from LocateService when the host display service has been contacted.
serviceLocated(long) - Method in interface org.sunspotworld.demo.util.LocateServiceListener
Application specific callback routine for when the service is located.
SET_ACCEL_SCALE_REPLY - Static variable in interface org.sunspotworld.demo.PacketTypes
Client reply to indicate the current accelerometer scale being used.
SET_ACCEL_SCALE_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to specify the accelerometer scale to be used.
setBlinkLEDs(boolean) - Method in class org.sunspotworld.demo.util.Spotlet
Set whether the LEDs should be blinked between retries of the application and when done.
setEnabled(boolean) - Method in class org.sunspotworld.demo.util.PacketReceiver
Enable/disable whether service is started automatically.
setEnabled(boolean) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Enable/disable whether service is started automatically.
setEnabled(boolean) - Method in class org.sunspotworld.demo.util.PeriodicTask
Enable/disable whether service is started automatically.
setListenForBootloader(boolean) - Method in class org.sunspotworld.demo.util.Spotlet
Set whether or not to monitor for OTA download requests or bootloader commands over the USB connection.
setName(String) - Method in class org.sunspotworld.demo.AccelMonitor
temporary fix until IService interface fixed
setNumberRetries(int) - Method in class org.sunspotworld.demo.util.Spotlet
Set the number of times to retry the application after an error.
setPacketConnection(PacketTransmitter, PacketReceiver) - Method in class org.sunspotworld.demo.AccelMonitor
Get the PacketTransmitter & PacketReceiver to use to talk with the host.
setScale(byte) - Method in class org.sunspotworld.demo.AccelMonitor
Set the accelerometer to use either the 2G or 6G scale.
setServiceName(String) - Method in class org.sunspotworld.demo.util.PacketReceiver
Assign a name to this service.
setServiceName(String) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Assign a name to this service.
setServiceName(String) - Method in class org.sunspotworld.demo.util.PeriodicTask
Assign a name to this service.
setStatusLed(ITriColorLED) - Method in class org.sunspotworld.demo.util.LocateService
Specify an LED to use to display status of search.
setTaskPeriod(int) - Method in class org.sunspotworld.demo.util.PeriodicTask
Set the current doTask period.
setTaskPriority(int) - Method in class org.sunspotworld.demo.util.PeriodicTask
Set the priority for the task loop thread.
setTimeBetweenRetries(long) - Method in class org.sunspotworld.demo.util.Spotlet
Set the time in milliseconds to wait before retrying the application after an error.
shiftStart(int) - Method in class org.sunspotworld.demo.util.PeriodicTask
Shift when the task gets run by N milliseconds.
shiftTask - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
SINGLE_PACKET_PAYLOAD_SIZE - Static variable in class org.sunspotworld.demo.util.PacketTransmitter
Number of bytes of data that will fit in a single packet, not including the header
Spotlet - Class in org.sunspotworld.demo.util
Start of a framework for robust SPOT applications.
Spotlet() - Constructor for class org.sunspotworld.demo.util.Spotlet
Creates a new instance of Spotlet
start() - Method in class org.sunspotworld.demo.util.LocateService
Start searching for a service
start() - Method in class org.sunspotworld.demo.util.PacketReceiver
Start packet receiver service running.
start() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Start service running.
start() - Method in class org.sunspotworld.demo.util.PeriodicTask
Start periodic task execution.
startApp() - Method in class org.sunspotworld.demo.util.Spotlet
MIDlet call to start our application.
starting() - Method in class org.sunspotworld.demo.AccelMonitor
Routine called when task execution is about to start up.
starting() - Method in class org.sunspotworld.demo.util.PeriodicTask
Routine called when task execution is about to start up.
status - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
stop() - Method in class org.sunspotworld.demo.util.LocateService
Stop searching for a service
stop() - Method in class org.sunspotworld.demo.util.PacketReceiver
Stop packet receiver service if running.
stop() - Method in class org.sunspotworld.demo.util.PacketTransmitter
Stop service running.
stop() - Method in class org.sunspotworld.demo.util.PeriodicTask
Stop future task execution.
STOP_ACCEL_DATA_REQ - Static variable in interface org.sunspotworld.demo.PacketTypes
Host command to request accelerometer data stop being sent.
stopping() - Method in class org.sunspotworld.demo.AccelMonitor
Routine called when task execution is finished.
stopping() - Method in class org.sunspotworld.demo.util.PeriodicTask
Routine called when task execution is finished.

T

taskPeriod - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
taskPeriodCount - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
TelemetryMain - Class in org.sunspotworld.demo
Sample application that sends a stream of accelerometer telemetry information back from the SPOT to a host application.
TelemetryMain() - Constructor for class org.sunspotworld.demo.TelemetryMain
 
thread - Variable in class org.sunspotworld.demo.util.PeriodicTask
 
timer - Variable in class org.sunspotworld.demo.util.PeriodicTask
 

U

unregisterHandler(PacketHandler, byte) - Method in class org.sunspotworld.demo.util.PacketReceiver
Unregister a handler for some packet type.
unregisterHandler(PacketHandler) - Method in class org.sunspotworld.demo.util.PacketReceiver
Unregister a handler from all packet types.

W

writeHeader(Radiogram, byte) - Method in class org.sunspotworld.demo.util.PacketTransmitter
Write the common header into a Radiogram.

A B C D F G H I L M N O P Q R S T U W
Sun SPOT Telemetry Demo -- SPOT-side
v1.1

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