SunSPOT host API V5.0


com.sun.spot.peripheral.radio
Class RadioFactory

java.lang.Object
  extended by com.sun.spot.peripheral.radio.RadioFactory

public class RadioFactory
extends Object

Static factory for public access to the radio in various guises.


Field Summary
static String SPOT_BASESTATION_MANAGER
          Some routines moved here so spotlibhost does not need to reference Spot.java
static String SPOT_BASESTATION_SHARING
           
 
Method Summary
static void closeBaseStation()
          Close down a local basestation, if any.
static I802_15_4_MAC getI802_15_4_MAC()
          Answer the interface for dealing with the radio at the I802.15.4 MAC level.
static I802_15_4_MAC[] getI802_15_4_MACs()
          Get access to the I802.15.4 MAC layers
static I802_15_4_PHY getI802_15_4_PHY()
          Get access to the physical I802.15.4 radio device
static IProprietaryRadio getIProprietaryRadio()
          Get access to the radio via its proprietary (non-I802.15.4) interface.
static IRadioPolicyManager getRadioPolicyManager()
          Get the singleton radio policy manager
static IResourceRegistry getResourceRegistry()
          Get the singleton resource registry
static ISleepManager getSleepManager()
          Get access to the sleep manager for the Spot
static I802_15_4_MAC getSocketMAC()
          Answer the interface for accessing the socket MAC.
static boolean isMasterIsolate()
           
static boolean isRunningOnHost()
           
static void setAsDaemonThread(Thread thread)
          Set thread to be a daemon thread.
static void setPersistentProperty(String key, String value)
          Set a persistent property "key" to have the value "value"
static void setProperty(String key, String value)
          Set the system property "key" to have the value "value"
static void setRadioPolicyManager(IRadioPolicyManager radioPolicyManager)
          For testing only
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPOT_BASESTATION_MANAGER

public static final String SPOT_BASESTATION_MANAGER
Some routines moved here so spotlibhost does not need to reference Spot.java

See Also:
Constant Field Values

SPOT_BASESTATION_SHARING

public static final String SPOT_BASESTATION_SHARING
See Also:
Constant Field Values
Method Detail

getI802_15_4_MAC

public static I802_15_4_MAC getI802_15_4_MAC()
Answer the interface for dealing with the radio at the I802.15.4 MAC level.

Returns:
the radio MAC layer object

getSocketMAC

public static I802_15_4_MAC getSocketMAC()
Answer the interface for accessing the socket MAC.

Returns:
the socket MAC layer object

isRunningOnHost

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

isMasterIsolate

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

setProperty

public static void setProperty(String key,
                               String value)
Set the system property "key" to have the value "value"

Parameters:
key -
value -

setPersistentProperty

public static void setPersistentProperty(String key,
                                         String value)
Set a persistent property "key" to have the value "value"

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

getResourceRegistry

public static IResourceRegistry getResourceRegistry()
Get the singleton resource registry

Returns:
the resource registry

getSleepManager

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

Returns:
The sleep manager

getRadioPolicyManager

public static IRadioPolicyManager getRadioPolicyManager()
Get the singleton radio policy manager

Returns:
the radio policy manager

setRadioPolicyManager

public static void setRadioPolicyManager(IRadioPolicyManager radioPolicyManager)
For testing only


getI802_15_4_PHY

public static 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_MACs

public static I802_15_4_MAC[] getI802_15_4_MACs()
Get access to the I802.15.4 MAC layers

Returns:
the I802.15.4 MAC layers

getIProprietaryRadio

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

Returns:
the proprietary interface to the radio device

setAsDaemonThread

public static void setAsDaemonThread(Thread thread)
Set thread to be a daemon thread. Not really part of this class, but placed here as it's a convenient way to handle the different treatment of dameon threads in JME and J2SE.

Parameters:
thread - to be converted to daemon status

closeBaseStation

public static void closeBaseStation()
Close down a local basestation, if any. The serial port is released. This has no effect on shared basestations.


SunSPOT host API V5.0


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