The information is not held in normal Java streamed representations because
the information must also be accessible from the C language bootstrap.
To obtain the current config page use:
Spot.getInstance().getConfigPage()
Constructor Summary |
ConfigPage()
Create a newly initialized config page
This constructor is for system use only - please use Spot.getInstance().getConfigPage() |
ConfigPage(byte[] rawConfigPage)
Create a config page from a byte array |
MAX_MANUFACTURING_IMAGE_SIZE
public static final int MAX_MANUFACTURING_IMAGE_SIZE
FLASH_BASE_ADDRESS
public static final int FLASH_BASE_ADDRESS
- See Also:
- Constant Field Values
BOOTLOADER_ADDRESS
public static final int BOOTLOADER_ADDRESS
- See Also:
- Constant Field Values
FAT_SECTOR_NUMBER
public static final int FAT_SECTOR_NUMBER
- See Also:
- Constant Field Values
FAT_ADDRESS
public static final int FAT_ADDRESS
VM_SECTOR_NUMBER
public static final int VM_SECTOR_NUMBER
- See Also:
- Constant Field Values
VM_ADDRESS
public static final int VM_ADDRESS
BOOTSTRAP_SECTOR
public static final int BOOTSTRAP_SECTOR
- See Also:
- Constant Field Values
BOOTSTRAP_ADDRESS
public static final int BOOTSTRAP_ADDRESS
FIRST_FILE_SYSTEM_SECTOR
public static final int FIRST_FILE_SYSTEM_SECTOR
- See Also:
- Constant Field Values
FIRST_FILE_SYSTEM_SECTOR_ADDRESS
public static final int FIRST_FILE_SYSTEM_SECTOR_ADDRESS
LAST_COMMON_FILE_SYSTEM_SECTOR
public static final int LAST_COMMON_FILE_SYSTEM_SECTOR
LAST_COMMON_FILE_SYSTEM_SECTOR_ADDRESS
public static final int LAST_COMMON_FILE_SYSTEM_SECTOR_ADDRESS
TRUST_MANAGER_SECTOR
public static final int TRUST_MANAGER_SECTOR
- See Also:
- Constant Field Values
SYSTEM_PROPERTIES_SECTOR
public static final int SYSTEM_PROPERTIES_SECTOR
- See Also:
- Constant Field Values
CONFIG_PAGE_SECTOR
public static final int CONFIG_PAGE_SECTOR
- See Also:
- Constant Field Values
CONFIG_PAGE_ADDRESS
public static final int CONFIG_PAGE_ADDRESS
DEFAULT_SECTOR_COUNT_FOR_RMS
public static final int DEFAULT_SECTOR_COUNT_FOR_RMS
- See Also:
- Constant Field Values
LARGE_SECTOR_SIZE
public static final int LARGE_SECTOR_SIZE
- See Also:
- Constant Field Values
SPOT_SUITE_PROTOCOL_NAME
public static final String SPOT_SUITE_PROTOCOL_NAME
- See Also:
- Constant Field Values
LIBRARY_URI
public static final String LIBRARY_URI
- See Also:
- Constant Field Values
LIBRARY_VIRTUAL_ADDRESS
public static final int LIBRARY_VIRTUAL_ADDRESS
- See Also:
- Constant Field Values
SERIAL_NUMBER_OFFSET
public static final int SERIAL_NUMBER_OFFSET
- See Also:
- Constant Field Values
CONFIG_VERSION_OFFSET
public static final int CONFIG_VERSION_OFFSET
- See Also:
- Constant Field Values
FLAGS_OFFSET
public static final int FLAGS_OFFSET
- See Also:
- Constant Field Values
CMD_LINE_PARAMETERS_NORMAL_OFFSET
public static final int CMD_LINE_PARAMETERS_NORMAL_OFFSET
- See Also:
- Constant Field Values
CMD_LINE_PARAMETERS_ADMIN_OFFSET
public static final int CMD_LINE_PARAMETERS_ADMIN_OFFSET
- See Also:
- Constant Field Values
VM_ADDRESS_OFFSET
public static final int VM_ADDRESS_OFFSET
- See Also:
- Constant Field Values
PUBLIC_KEY_OFFSET
public static final int PUBLIC_KEY_OFFSET
- See Also:
- Constant Field Values
STRINGS_OFFSET
public static final int STRINGS_OFFSET
- See Also:
- Constant Field Values
CONFIG_PAGE_SIZE
public static final int CONFIG_PAGE_SIZE
- Maximum size of the config page as stored on device.
- See Also:
- Constant Field Values
CURRENT_CONFIG_VERSION
public static final int CURRENT_CONFIG_VERSION
- See Also:
- Constant Field Values
INITIAL_COMMAND_LINE
public static final String INITIAL_COMMAND_LINE
- See Also:
- Constant Field Values
INITIAL_ADMIN_COMMAND_LINE
public static final String INITIAL_ADMIN_COMMAND_LINE
- See Also:
- Constant Field Values
ConfigPage
public ConfigPage(byte[] rawConfigPage)
- Create a config page from a byte array
- Parameters:
rawConfigPage
- Byte array to use as input
ConfigPage
public ConfigPage()
- Create a newly initialized config page
This constructor is for system use only - please use Spot.getInstance().getConfigPage()
asByteArray
public byte[] asByteArray()
- Create a byte[] representation of the config page
- Returns:
- The byte array
getConfigVersion
public int getConfigVersion()
- Get the version number of this page
getTargetID
public long getTargetID()
- Get the serial number of the device
- Returns:
- The serial number
setTargetID
public void setTargetID(long targetID)
- Set the serial number of the device
- Parameters:
targetID
- The id to be set
getCmdLineParams
public String getCmdLineParams()
- Get the command line parameters used to start Squawk
- Returns:
- The parameter string
getAdminCmdLineParams
public String getAdminCmdLineParams()
- Get the command line parameters used to start Squawk in admin mode
- Returns:
- The parameter string
setCmdLineParams
public void setCmdLineParams(String params)
- Set the command line parameter string used to start Squawk
- Parameters:
params
- The parameter string
resetCmdLine
public void resetCmdLine(String uri)
- Set the command line parameter string to execute MIDlet number 1 from the suite
specified by the uri parameter. This will also revert the ConfigPage to use the
default VM parameters.
- Parameters:
uri
- the uri of the suite to start from.
resetCmdLine
public void resetCmdLine(String uri,
String initialClass)
- Set the command line parameter string to execute the main method of initialClass
from the suite specified by the uri parameter. This will also revert the ConfigPage
to use the default VM parameters.
- Parameters:
uri
- the uri of the suite to start from.initialClass
- the class to execute
setAdminCmdLineParams
public void setAdminCmdLineParams(String params)
- Set the command line parameter string used to start Squawk in admin mode
- Parameters:
params
- The parameter string
getBootstrapAddress
public int getBootstrapAddress()
- Get the memory address of the bootstrap suite
- Returns:
- The memory address
getVmAddress
public int getVmAddress()
- Get the memory address of the VM executable
- Returns:
- The memory address
setVmAddress
public void setVmAddress(int vmAddress)
- Set the memory address of the VM executable
- Parameters:
vmAddress
- The memory address
getBootloaderSpace
public int getBootloaderSpace()
- Get the amount of memory allocated to the bootloader
- Returns:
- Size in bytes
getConfigSpace
public int getConfigSpace()
- Get the amount of memory allocated to the config page / properties
- Returns:
- Size in bytes
getVmSpace
public int getVmSpace()
- Get the amount of memory allocated to the VM executable
- Returns:
- Size in bytes
getBootstrapSpace
public int getBootstrapSpace()
- Get the amount of memory allocated to the bootstrap suite
- Returns:
- Size in bytes
getManufacturingImageSpace
public int getManufacturingImageSpace()
- Get the total amount of space allocated to a complete SPOT manufacturing image
(bootloader, vm, bootstrap, library and 2 applications).
- Returns:
- size in bytes
wasLoaded
public boolean wasLoaded()
- Discover whether this config page was initialized by loading from a byte array
or by initialization from default values
- Returns:
- true if this config page was loaded from a byte array
setWasLoaded
public void setWasLoaded(boolean b)
- For testing purposes only - not to be used
- Parameters:
b
-
setPublicKey
public void setPublicKey(byte[] key)
getPublicKey
public byte[] getPublicKey()
isSlowStartup
public boolean isSlowStartup()
setSlowStartup
public void setSlowStartup(boolean startSlowly)
setStartup
public void setStartup(String squawkArgs,
String uri,
String midletNumberOrMainClass)
getStartupUri
public String getStartupUri()
reset
public void reset()
isRunningMidletOnStartup
public boolean isRunningMidletOnStartup()
- Returns:
- true if the SPOT will run a midlet at startup, false otherwise
getStartupMidlet
public int getStartupMidlet()
- Returns:
- the midlet number to be run at startup.
- Throws:
IllegalStateException
- if the spot is running a class at startup
getStartupClass
public String getStartupClass()
- Returns:
- the class to be run at startup
- Throws:
IllegalStateException
- if the spot is running a midlet at startup
Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.