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 |
Method Summary |
byte[] |
asByteArray()
Create a byte[] representation of the config page |
String |
getAdminCmdLineParams()
Get the command line parameters used to start Squawk in admin mode |
int |
getBootloaderSpace()
Get the amount of memory allocated to the bootloader |
int |
getBootstrapAddress()
Get the memory address of the bootstrap suite |
int |
getBootstrapSpace()
Get the amount of memory allocated to the bootstrap suite |
String |
getCmdLineParams()
Get the command line parameters used to start Squawk |
int |
getConfigSpace()
Get the amount of memory allocated to the config page / properties |
int |
getConfigVersion()
Get the version number of this page |
static int[] |
getDefaultFreeSectors()
Answer the indices of the flash sectors that are by default free for use by the FlashFile system |
int |
getImageSpace()
Get the total amount of space allocated to a complete SPOT image
(bootloader, vm, bootstrap, library and 2 applications). |
byte[] |
getPublicKey()
|
long |
getTargetID()
Get the serial number of the device |
int |
getVmAddress()
Get the memory address of the VM executable |
int |
getVmSpace()
Get the amount of memory allocated to the VM executable |
boolean |
isSlowStartup()
|
void |
reset()
|
void |
setAdminCmdLineParams(String params)
Set the command line parameter string used to start Squawk in admin mode |
void |
setCmdLineParams(String params)
Set the command line parameter string used to start Squawk |
void |
setPublicKey(byte[] key)
|
void |
setSlowStartup(boolean startSlowly)
|
void |
setTargetID(long targetID)
Set the serial number of the device |
void |
setVmAddress(int vmAddress)
Set the memory address of the VM executable |
void |
setWasLoaded(boolean b)
For testing purposes only - not to be used |
boolean |
wasLoaded()
Discover whether this config page was initialized by loading from a byte array
or by initialization from default values |
FLASH_SIZE_IN_BYTES
public static final int FLASH_SIZE_IN_BYTES
- See Also:
- Constant Field Values
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_FILE_SYSTEM_SECTOR
public static final int LAST_FILE_SYSTEM_SECTOR
- See Also:
- Constant Field Values
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
LIBRARY_VIRTUAL_ADDRESS
public static final int LIBRARY_VIRTUAL_ADDRESS
- See Also:
- Constant Field Values
APP_VIRTUAL_ADDRESS
public static final int APP_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
INITIAL_ADMIN_COMMAND_LINE
public static final String INITIAL_ADMIN_COMMAND_LINE
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()
getDefaultFreeSectors
public static int[] getDefaultFreeSectors()
- Answer the indices of the flash sectors that are by default free for use by the FlashFile system
- Returns:
- an array of sector indices
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
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
getImageSpace
public int getImageSpace()
- Get the total amount of space allocated to a complete SPOT 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)
reset
public void reset()
Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.