|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.buglabs.bug.sysfs.SysfsNode
com.buglabs.bug.sysfs.LEDDevice
public class LEDDevice
A class to control a single-color or multi-color LED.
| Field Summary | |
|---|---|
static int |
COLOR_MONO
Constant for single color LED |
static int |
TYPE_MONO_COLOR
LED is single color. |
static int |
TYPE_TRI_COLOR
LED is tri color |
| Fields inherited from class com.buglabs.bug.sysfs.SysfsNode |
|---|
root |
| Constructor Summary | |
|---|---|
LEDDevice(java.io.File root,
java.lang.String name)
Constructor for tri-color LED |
|
LEDDevice(java.io.File root,
java.lang.String name,
java.lang.String color)
Constructor for mono LED. |
|
| Method Summary | |
|---|---|
int |
getBrightness(int color)
|
int |
getColorCount()
|
java.lang.String |
getLEDTrigger(int color)
|
java.lang.String[] |
getLEDTriggers(int color)
Get the Trigger types this LED supports. |
java.lang.String |
getName()
|
int |
getType()
|
void |
setBrightness(int color,
int brightness)
Set the brightness for the specified LED. |
void |
setTrigger(int color,
java.lang.String trigger)
Set a trigger on a LED. |
| Methods inherited from class com.buglabs.bug.sysfs.SysfsNode |
|---|
getFirstLineofFile, pad, parseHexInt, parseInt, parseMultiInt, println |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_MONO_COLOR
public static final int TYPE_TRI_COLOR
public static final int COLOR_MONO
| Constructor Detail |
|---|
public LEDDevice(java.io.File root,
java.lang.String name,
java.lang.String color)
root - name - color -
public LEDDevice(java.io.File root,
java.lang.String name)
root - name - | Method Detail |
|---|
public java.lang.String getName()
public int getType()
public void setBrightness(int color,
int brightness)
throws java.io.IOException
color - brightness -
java.io.IOExceptionpublic int getBrightness(int color)
color -
public void setTrigger(int color,
java.lang.String trigger)
throws java.io.IOException
color - trigger -
java.io.IOException
public java.lang.String getLEDTrigger(int color)
throws java.io.IOException
color -
java.io.IOException
public java.lang.String[] getLEDTriggers(int color)
throws java.io.IOException
color -
java.io.IOExceptionpublic int getColorCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||