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(byte[] rawConfigPage)
Create a config page from a byte array |
ConfigPage(int rev)
Create a newly initialized config page
This constructor is for system use only - please use Spot.getInstance().getConfigPage() |
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
BOOTLOADER_SECTOR
public static final int BOOTLOADER_SECTOR
- See Also:
- Constant Field Values
CONFIG_PAGE_SECTOR
public static final int CONFIG_PAGE_SECTOR
- See Also:
- Constant Field Values
FAT_SECTOR
public static final int FAT_SECTOR
- See Also:
- Constant Field Values
SYSTEM_PROPERTIES_SECTOR
public static final int SYSTEM_PROPERTIES_SECTOR
- See Also:
- Constant Field Values
TRUST_MANAGER_SECTOR
public static final int TRUST_MANAGER_SECTOR
- See Also:
- Constant Field Values
VM_SECTOR
public static final int VM_SECTOR
- See Also:
- Constant Field Values
BOOTSTRAP_SECTOR
public static final int BOOTSTRAP_SECTOR
- See Also:
- Constant Field Values
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
HARDWARE_REVISION_OFFSET
public static final int HARDWARE_REVISION_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
SDK_DATE_OFFSET
public static final int SDK_DATE_OFFSET
- See Also:
- Constant Field Values
STRINGS_OFFSET
public static final int STRINGS_OFFSET
- See Also:
- Constant Field Values
OLD_STRINGS_OFFSET
public static final int OLD_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
MINIMUM_CONFIG_VERSION
public static final int MINIMUM_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(int rev)
- Create a newly initialized config page
This constructor is for system use only - please use Spot.getInstance().getConfigPage()
getConfigPageAddress
public static int getConfigPageAddress(int rev)
- Return the address of the Config Page for this type of SPOT
- Parameters:
rev - hardware revision of the SPOT
- Returns:
- config page start address
getFirstFileSystemSector
public static int getFirstFileSystemSector(int rev)
getFirstFileSystemSectorAddress
public static int getFirstFileSystemSectorAddress(int rev)
getLastFileSystemSector
public static int getLastFileSystemSector(int rev)
getLastFileSystemSectorAddress
public static int getLastFileSystemSectorAddress(int rev)
getSectorAddress
public static int getSectorAddress(int sector,
int rev)
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
setSdkDate
public void setSdkDate(String date)
- Set the SDK date string
- Parameters:
date - the SDK date string
getConfigPageAddress
public int getConfigPageAddress()
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 -
getFirstFileSystemSector
public int getFirstFileSystemSector()
getFirstFileSystemSectorAddress
public int getFirstFileSystemSectorAddress()
getLastFileSystemSector
public int getLastFileSystemSector()
getLastFileSystemSectorAddress
public int getLastFileSystemSectorAddress()
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()
getHardwareRev
public int getHardwareRev()
- Returns:
- the hardware revision for this SPOT
setHardwareRev
public void setHardwareRev(int rev)
- Set the hardware revision for this SPOT
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-2010 Oracle. All Rights Reserved.