SunSPOT host API V3.0


com.sun.spot.client
Class SpotState

java.lang.Object
  extended by com.sun.spot.client.SpotState

public class SpotState
extends Object

SpotState is internal to the implementation of the ISpotClientCommandHelper and all the information it contains should be accessed via that interface. The implementation of SpotState is subject to change without notice in future releases.


Field Summary
static String UNKNOWN_BOOTLOADER_TIMESTAMP
           
 
Constructor Summary
SpotState(String bootloaderIdentificationString, String expectedBootloaderTimestamp)
          Construct a SpotState to represent a connected SPOT (local or remote).
 
Method Summary
 void checkStateForBootloaderCmd(boolean checkConfig)
          Check whether the remote SPOT is up to date and can execute a command.
 String getBootloaderIdentificationString()
           
 String getBootloaderTimeStamp()
           
 ConfigPage getConfigPage()
           
 String getExtendedBootloaderIdentificationString()
           
 boolean isBootloaderUpToDate()
           
 void setBootloaderIdentificationString(String bootloaderIdentificationString)
           
 void setConfigPage(ConfigPage configPage)
          Set the ConfigPage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_BOOTLOADER_TIMESTAMP

public static final String UNKNOWN_BOOTLOADER_TIMESTAMP
See Also:
Constant Field Values
Constructor Detail

SpotState

public SpotState(String bootloaderIdentificationString,
                 String expectedBootloaderTimestamp)
          throws IOException
Construct a SpotState to represent a connected SPOT (local or remote). Throws SpotClientFatalException if the SPOT is remote and is running a version of the admin command processor that does not match the SDK.

Parameters:
bootloaderIdentificationString - the identification string obtained from the SPOT
expectedBootloaderTimestamp - the timestamp the SDK is expecting as part of the identification string
Throws:
IOException
Method Detail

isBootloaderUpToDate

public boolean isBootloaderUpToDate()
Returns:
whether the bootloader is up to date with the SDK. Will always return true for remote SPOTs, as the constructor will have thrown a SpotClientFatalException for obsolete remote SPOTs.

setConfigPage

public void setConfigPage(ConfigPage configPage)
Set the ConfigPage. Note that this only affects this local representation, and does not update an actual SPOT.

Parameters:
configPage - the new ConfigPage

checkStateForBootloaderCmd

public void checkStateForBootloaderCmd(boolean checkConfig)
Check whether the remote SPOT is up to date and can execute a command.

Parameters:
checkConfig - Whether to check bootloader and config page, or just bootloader.

getBootloaderIdentificationString

public String getBootloaderIdentificationString()
Returns:
the identification string obtained from the SPOT.

getExtendedBootloaderIdentificationString

public String getExtendedBootloaderIdentificationString()
Returns:
the identification string obtained from the SPOT plus its serial number.

getBootloaderTimeStamp

public String getBootloaderTimeStamp()
Returns:
the timestamp parsed from the identification string obtained from the SPOT.

getConfigPage

public ConfigPage getConfigPage()

setBootloaderIdentificationString

public void setBootloaderIdentificationString(String bootloaderIdentificationString)

SunSPOT host API V3.0


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