com.buglabs.bug.base.pub
Interface IBUG20BaseControl

All Known Implementing Classes:
BUGBaseControl

public interface IBUG20BaseControl

Provides control of BUGbase 20 LEDs.


Field Summary
static int COLOR_BLUE
           
static int COLOR_GREEN
           
static int COLOR_RED
           
static int LED_BATTERY
           
static int LED_BLUETOOTH
           
static int LED_POWER
           
static int LED_WLAN
           
 
Method Summary
 int getLEDBrightness(int led, int color)
           
 java.util.List getLEDDevices()
           
 java.lang.String getLEDTrigger(int led, int color)
           
 java.lang.String[] getLEDTriggers(int led, int color)
           
 void setLEDBrightness(int led, int brightness)
          Set brightness level for PWM-controlled LED.
 void setLEDColor(int led, int color, boolean on)
          Turn on or off a specific color on a multi color LED.
 void setLEDTrigger(int led, int color, java.lang.String trigger)
          Set the trigger for a given LED and Color
 

Field Detail

COLOR_BLUE

static final int COLOR_BLUE
See Also:
Constant Field Values

COLOR_RED

static final int COLOR_RED
See Also:
Constant Field Values

COLOR_GREEN

static final int COLOR_GREEN
See Also:
Constant Field Values

LED_BATTERY

static final int LED_BATTERY
See Also:
Constant Field Values

LED_POWER

static final int LED_POWER
See Also:
Constant Field Values

LED_WLAN

static final int LED_WLAN
See Also:
Constant Field Values

LED_BLUETOOTH

static final int LED_BLUETOOTH
See Also:
Constant Field Values
Method Detail

setLEDColor

void setLEDColor(int led,
                 int color,
                 boolean on)
                 throws java.io.IOException
Turn on or off a specific color on a multi color LED.

Parameters:
led - IBUGBaseControl.LED_*
color - IBUGBaseControl.COLOR_*
on - TRUE if LED is to be on, false otherwise.
Throws:
java.io.IOException - is thrown if invalid LED or color value is passed

getLEDBrightness

int getLEDBrightness(int led,
                     int color)
                     throws java.io.IOException
Parameters:
led -
color -
Throws:
java.io.IOException

setLEDTrigger

void setLEDTrigger(int led,
                   int color,
                   java.lang.String trigger)
                   throws java.io.IOException
Set the trigger for a given LED and Color

Parameters:
led -
color -
trigger -
Throws:
java.io.IOException

getLEDTrigger

java.lang.String getLEDTrigger(int led,
                               int color)
                               throws java.io.IOException
Parameters:
led -
color -
Returns:
The trigger a given light is currently set to.
Throws:
java.io.IOException

getLEDTriggers

java.lang.String[] getLEDTriggers(int led,
                                  int color)
                                  throws java.io.IOException
Parameters:
led -
color -
Returns:
A list of string names of triggers that can be set for LEDs.
Throws:
java.io.IOException

setLEDBrightness

void setLEDBrightness(int led,
                      int brightness)
                      throws java.io.IOException
Set brightness level for PWM-controlled LED.

Parameters:
led - IBUGBaseControl.LED_*
brightness - 0 - 255
Throws:
java.io.IOException - is thrown if invalid LED value is passed.

getLEDDevices

java.util.List getLEDDevices()
Returns:
A list of LEDDevices controllable on BUG 2.0 base.