Sun SPOT API
Green Release  


com.sun.spot.peripheral
Interface ISpot

All Known Implementing Classes:
Spot

public interface ISpot

The interface to the root object of the Spot base library.

This interface provides access to the LED on the Spot board, to the AT91 peripherals, and to other resources such as the software SPI implementation.


Method Summary
 void flashConfigPage(ConfigPage configPage)
          Write a ConfigPage into the flash.
 IAT91_AIC getAT91_AIC()
          Get access to the AT91 Interrupt Controller
 IAT91_PIO getAT91_PIO(int pioSelector)
          Get access to the AT91 Parallel I/O Controller.
 IAT91_TC getAT91_TC(int index)
          Get access to an AT91 Timer-Counter.
 ConfigPage getConfigPage()
          Get the configuration page held in flash
 IDriverRegistry getDriverRegistry()
          Get the Driver Registry.
 Hashtable getExternalBoardMap()
          Get the map of external boards.
 FiqInterruptDaemon getFiqInterruptDaemon()
          Get the FiqInterruptDaemon.
 IFlashMemoryDevice getFlashMemoryDevice()
          Get access to the flash memory on the Spot
 ILed getGreenLed()
          Get access to the green LED on the Spot processor board.
 byte getHardwareType()
          Get the hardware type code for this device, as defined in ConfigPage.
 I802_15_4_MAC getI802_15_4_MAC()
          Get access to the I802.15.4 radio MAC layer
 I802_15_4_PHY getI802_15_4_PHY()
          Get access to the physical I802.15.4 radio device
 IProprietaryRadio getIProprietaryRadio()
          Get access to the radio via its proprietary (non-I802.15.4) interface.
 ILTC3455 getLTC3455()
          power control chip driver
 OTACommandServer getOTACommandServer()
          Get the OTA Command Server, creating one if necessary
 IPBPMFactory getPBPMFactory()
          Get the factory for creating port-based protocol managers
 Properties getPersistentProperties()
          Get all the persistent properties, as held in the flash memory
 String getPersistentProperty(String key)
          Get a persistent property, as held in the flash memory
 IPowerController getPowerController()
          Get the PowerController - the AVR on the spot.
 byte[] getPublicKey()
          Get the Public Key used to sign and verify application and library suites, and the config page.
 ILed getRedLed()
          Get access to the red LED on the Spot processor board.
 ISecuredSiliconArea getSecuredSiliconArea()
          Get the SecuredSiliconArea
 ISleepManager getSleepManager()
          Get access to the sleep manager for the Spot
 ISpiMaster getSPI()
          Get access to the SPI interface.
 ISpotPins getSpotPins()
          Get the singleton SpotPins instance.
 IUSBPowerDaemon getUsbPowerDaemon()
          Get the usb power daemon
 boolean isMasterIsolate()
           
 boolean isRunningOnHost()
           
 void refreshConfigPage()
          Force the Spot to re-read the configuration page, or at least invalidate any cached copy.
 void resetExternalBoardMap()
          Clear the cache of external board properties.
 void setPersistentProperty(String key, String value)
          Set a persistent property in the flash memory
 

Method Detail

isRunningOnHost

boolean isRunningOnHost()
Returns:
true if running on the host, false if on the SPOT

isMasterIsolate

boolean isMasterIsolate()
Returns:
true if this method has been called in the context of the master isolate

getHardwareType

byte getHardwareType()
Get the hardware type code for this device, as defined in ConfigPage.

Returns:
the hardware type code

getSpotPins

ISpotPins getSpotPins()
Get the singleton SpotPins instance.

Returns:
ISpotPins the SpotPins

getGreenLed

ILed getGreenLed()
Get access to the green LED on the Spot processor board. Use with caution as this LED is intended for system use.

Returns:
ILed the green LED on the Spot processor board

getRedLed

ILed getRedLed()
Get access to the red LED on the Spot processor board. Use with caution as this LED is intended for system use.

Returns:
The red LED on the Spot processor board

getFiqInterruptDaemon

FiqInterruptDaemon getFiqInterruptDaemon()
Get the FiqInterruptDaemon. This handles interrupts from the power controller.

Returns:
the FiqInterruptDaemon

getAT91_PIO

IAT91_PIO getAT91_PIO(int pioSelector)
Get access to the AT91 Parallel I/O Controller.

Parameters:
pioSelector - selects the PIO required (use one of the selector symbols found in IAT91_PIO)
Returns:
the AT91 Parallel Input-Output Controller.

getAT91_AIC

IAT91_AIC getAT91_AIC()
Get access to the AT91 Interrupt Controller

Returns:
the AT91 Interrupt Controller

getI802_15_4_PHY

I802_15_4_PHY getI802_15_4_PHY()
Get access to the physical I802.15.4 radio device

Returns:
the I802.15.4 physical radio device

getI802_15_4_MAC

I802_15_4_MAC getI802_15_4_MAC()
Get access to the I802.15.4 radio MAC layer

Returns:
the I802.15.4 MAC layer

getIProprietaryRadio

IProprietaryRadio getIProprietaryRadio()
Get access to the radio via its proprietary (non-I802.15.4) interface.

Returns:
the proprietary interface to the radio device

getSPI

ISpiMaster getSPI()
Get access to the SPI interface. This interface is used to communicate with the radio and the sensor boards

Returns:
the SPI interface.

getDriverRegistry

IDriverRegistry getDriverRegistry()
Get the Driver Registry.

Returns:
the Driver Registry

getSecuredSiliconArea

ISecuredSiliconArea getSecuredSiliconArea()
Get the SecuredSiliconArea

Returns:
the SecuredSiliconArea

getAT91_TC

IAT91_TC getAT91_TC(int index)
Get access to an AT91 Timer-Counter.

Parameters:
index - The index of the required TC in the range 0-5
Returns:
The AT91 TC

getConfigPage

ConfigPage getConfigPage()
Get the configuration page held in flash

Returns:
the configuration page

getPublicKey

byte[] getPublicKey()
Get the Public Key used to sign and verify application and library suites, and the config page.

Returns:
byte[] The Public Key

flashConfigPage

void flashConfigPage(ConfigPage configPage)
Write a ConfigPage into the flash.


refreshConfigPage

void refreshConfigPage()
Force the Spot to re-read the configuration page, or at least invalidate any cached copy.


getExternalBoardMap

Hashtable getExternalBoardMap()
Get the map of external boards. Returns a Properties object for each board detected containing the properties read from the board's serial flash. For each board, also return as the key in the map the chip select pin used to select the board.

Returns:
a Hashtable where the key is the SpiPcs used as the chip selects for the boards, and the value is board Properties

resetExternalBoardMap

void resetExternalBoardMap()
Clear the cache of external board properties. The cache will be re-read from the boards next time it is used.


getFlashMemoryDevice

IFlashMemoryDevice getFlashMemoryDevice()
Get access to the flash memory on the Spot

Returns:
the flash memory controller as an IFlashMemoryDevice

getSleepManager

ISleepManager getSleepManager()
Get access to the sleep manager for the Spot

Returns:
The sleep manager

getLTC3455

ILTC3455 getLTC3455()
power control chip driver

Returns:
the power control chip driver

getUsbPowerDaemon

IUSBPowerDaemon getUsbPowerDaemon()
Get the usb power daemon

Returns:
the usb power daemon

getPowerController

IPowerController getPowerController()
Get the PowerController - the AVR on the spot.

Returns:
the PowerController

getPBPMFactory

IPBPMFactory getPBPMFactory()
Get the factory for creating port-based protocol managers

Returns:
the PBPM factory

setPersistentProperty

void setPersistentProperty(String key,
                           String value)
Set a persistent property in the flash memory

Parameters:
key -
value - the value required or null to erase

getPersistentProperty

String getPersistentProperty(String key)
Get a persistent property, as held in the flash memory

Parameters:
key -
Returns:
the value or null if no property with the specified key

getPersistentProperties

Properties getPersistentProperties()
Get all the persistent properties, as held in the flash memory

Returns:
the set of persistent properties

getOTACommandServer

OTACommandServer getOTACommandServer()
                                     throws IOException
Get the OTA Command Server, creating one if necessary

Returns:
the OTA command server
Throws:
IOException

Sun SPOT API
Green Release  


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