SunSPOT API V4.0


com.sun.spot.peripheral.ota
Interface IOTACommandServer

All Superinterfaces:
IService
All Known Implementing Classes:
OTACommandServer

public interface IOTACommandServer
extends IService


Field Summary
static int HARDWARE_MAJOR_REV_ESPOT
          Major version of the eSPOT hardware to report in response to HELLO_CMD
static String HELLO_CMD
          Command to respond information about the SPOT
static int HELLO_COMMAND_MINOR_VERSION
          Starting with (major) version 2, we support major/minor version numbering.
static int HELLO_COMMAND_VERSION
          Version of the HELLO_CMD that we support
static int PORT
          The radiostream port on which to listen for hosts connecting
static String START_OTA_SESSION_CMD
          Command that we recognise to start a new session
 
Fields inherited from interface com.sun.spot.service.IService
PAUSED, PAUSING, RESUMING, RUNNING, STARTING, STOPPED, STOPPING
 
Method Summary
 void addListener(IOTACommandServerListener sml)
          Attach a listener to be notified of the start and stop of flash operations.
 String getBaseStationAddress()
          Answer the IEEE address of the sender of the last command received.
 boolean isSuspended()
           
 void setSuspended(boolean suspended)
           
 Date timeOfLastMessageFromHost()
           
 
Methods inherited from interface com.sun.spot.service.IService
getEnabled, getServiceName, getStatus, isRunning, pause, resume, setEnabled, setServiceName, start, stop
 

Field Detail

PORT

static final int PORT
The radiostream port on which to listen for hosts connecting

See Also:
Constant Field Values

START_OTA_SESSION_CMD

static final String START_OTA_SESSION_CMD
Command that we recognise to start a new session

See Also:
Constant Field Values

HELLO_CMD

static final String HELLO_CMD
Command to respond information about the SPOT

See Also:
Constant Field Values

HELLO_COMMAND_VERSION

static final int HELLO_COMMAND_VERSION
Version of the HELLO_CMD that we support

See Also:
Constant Field Values

HELLO_COMMAND_MINOR_VERSION

static final int HELLO_COMMAND_MINOR_VERSION
Starting with (major) version 2, we support major/minor version numbering. This lets us signal/detect changes that are backward compatible and those that aren't.

See Also:
Constant Field Values

HARDWARE_MAJOR_REV_ESPOT

static final int HARDWARE_MAJOR_REV_ESPOT
Major version of the eSPOT hardware to report in response to HELLO_CMD

See Also:
Constant Field Values
Method Detail

addListener

void addListener(IOTACommandServerListener sml)
Attach a listener to be notified of the start and stop of flash operations.

Parameters:
sml - the listener

getBaseStationAddress

String getBaseStationAddress()
Answer the IEEE address of the sender of the last command received.

Returns:
-- the address

isSuspended

boolean isSuspended()
Returns:
Returns true if the server has been suspended by software.

setSuspended

void setSuspended(boolean suspended)
Parameters:
suspended - Suspends or resumes the server (it is initially running).

timeOfLastMessageFromHost

Date timeOfLastMessageFromHost()
Returns:
The time when the server last received a message from the host

SunSPOT API V4.0


Copyright © 2006-2008 Sun Microsystems, Inc. All Rights Reserved.