SunSPOT API V3.0


com.sun.spot.peripheral
Interface IUSBPowerDaemon


public interface IUSBPowerDaemon


Field Summary
static int STATE_AWAITING_ENUM
          Power detected, waiting to see if enumeration occurs
static int STATE_BATTERY
          Power detected but enumeration did not occur
static int STATE_ENUMERATED
          Enumerated
static int STATE_UNCONNECTED
          No power applied to USB socket
 
Method Summary
 int getCurrentState()
          Get the current state of the USB connection
 boolean isUsbEnumerated()
           
 boolean isUsbInUse()
           
 boolean isUsbPowered()
           
 

Field Detail

STATE_UNCONNECTED

static final int STATE_UNCONNECTED
No power applied to USB socket

See Also:
Constant Field Values

STATE_AWAITING_ENUM

static final int STATE_AWAITING_ENUM
Power detected, waiting to see if enumeration occurs

See Also:
Constant Field Values

STATE_ENUMERATED

static final int STATE_ENUMERATED
Enumerated

See Also:
Constant Field Values

STATE_BATTERY

static final int STATE_BATTERY
Power detected but enumeration did not occur

See Also:
Constant Field Values
Method Detail

getCurrentState

int getCurrentState()
Get the current state of the USB connection

Returns:
a state as defined in IUSBPowerDaemon

isUsbPowered

boolean isUsbPowered()
Returns:
true if power is being applied to the USB socket

isUsbEnumerated

boolean isUsbEnumerated()
Returns:
true if the host has enumerated the USB device

isUsbInUse

boolean isUsbInUse()
Returns:
true if a host process is connected to the USB (may not work for all host OSs)

SunSPOT API V3.0


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