SunSPOT API V5.0


com.sun.spot.peripheral.ota
Interface IOTACommandServer

All Superinterfaces:
IService
All Known Implementing Classes:
OTACommandServer

public interface IOTACommandServer
extends IService

Defines constants used by Over-the-air command sessions.


Field Summary
static byte BASIC_HELLO_TYPE
           
static int DEFAULT_DATAGRAM_PORT
          The default port on which to listen for hosts connecting
static String DEFAULT_DATAGRAM_PROTOCOL
          The default datagram protocol to use
static int DEFAULT_STREAM_PORT
          The default port for stream command connections
static String DEFAULT_STREAM_PROTOCOL
          The default stream protocol to use
static byte ESPOT_SUBTYPE
          eSPOT device subtype
static byte GENERIC_HOST_APP_SUBTYPE
          generic host app subtype
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_MAJOR_VERSION
          Version of the HELLO_CMD that we support
static int HELLO_COMMAND_MINOR_VERSION
          Starting with (major) version 2, we support major/minor version numbering.
static byte HOST_APP_TYPE
          Host application device type
static byte PHYSICAL_NEIGHBORS_HELLO_TYPE
           
static byte SHARED_BASESTATION_SUBTYPE
          shared basestation host app subtype
static byte SPOT_TYPE
          SPOT device type
static String START_OTA_SESSION_CMD
          Command that we recognise to start a new session
static byte VIRTUAL_ESPOT_SUBTYPE
          virtual eSPOT device subtype
 
Fields inherited from interface com.sun.spot.service.IService
PAUSED, PAUSING, READY, 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.
 byte getSubType()
          Get the device subtype for the Hello command.
 boolean isSuspended()
           
 void setSubType(byte subtype)
          Set the device subtype for the Hello command.
 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

DEFAULT_DATAGRAM_PORT

static final int DEFAULT_DATAGRAM_PORT
The default port on which to listen for hosts connecting

See Also:
Constant Field Values

DEFAULT_STREAM_PORT

static final int DEFAULT_STREAM_PORT
The default port for stream command connections

See Also:
Constant Field Values

DEFAULT_DATAGRAM_PROTOCOL

static final String DEFAULT_DATAGRAM_PROTOCOL
The default datagram protocol to use

See Also:
Constant Field Values

DEFAULT_STREAM_PROTOCOL

static final String DEFAULT_STREAM_PROTOCOL
The default stream protocol to use

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_MAJOR_VERSION

static final int HELLO_COMMAND_MAJOR_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

BASIC_HELLO_TYPE

static final byte BASIC_HELLO_TYPE
See Also:
Constant Field Values

PHYSICAL_NEIGHBORS_HELLO_TYPE

static final byte PHYSICAL_NEIGHBORS_HELLO_TYPE
See Also:
Constant Field Values

SPOT_TYPE

static final byte SPOT_TYPE
SPOT device type

See Also:
Constant Field Values

ESPOT_SUBTYPE

static final byte ESPOT_SUBTYPE
eSPOT device subtype

See Also:
Constant Field Values

VIRTUAL_ESPOT_SUBTYPE

static final byte VIRTUAL_ESPOT_SUBTYPE
virtual eSPOT device subtype

See Also:
Constant Field Values

HOST_APP_TYPE

static final byte HOST_APP_TYPE
Host application device type

See Also:
Constant Field Values

GENERIC_HOST_APP_SUBTYPE

static final byte GENERIC_HOST_APP_SUBTYPE
generic host app subtype

See Also:
Constant Field Values

SHARED_BASESTATION_SUBTYPE

static final byte SHARED_BASESTATION_SUBTYPE
shared basestation host app subtype

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

setSubType

void setSubType(byte subtype)
Set the device subtype for the Hello command.

Parameters:
subtype - specify the type of SPOT this is

getSubType

byte getSubType()
Get the device subtype for the Hello command.

Returns:
the type of SPOT this is

SunSPOT API V5.0


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