|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.tmote.Leds
public class Leds
Tmote implementation of Leds. The tmote has 3 leds that can represent binary values 0-7.
Field Summary |
---|
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Constructor Summary | |
---|---|
protected |
Leds()
|
Method Summary | |
---|---|
Action |
block()
Block an indefinite amount of time until this Action is no longer pending. |
Action |
block(int timeoutMilli)
Block a defined amount of time or until the Action is no longer pending. |
Action |
cancel()
Cancel this Action if PENDING. |
byte |
getActionState()
Get the current state of this Action: IDLE, PENDING, DONE, or ERROR. |
boolean |
isDone()
Return true is this Action is DONE. |
void |
off(int value)
Turns off selected LEDs. |
void |
on(int value)
Turns on selected LEDs. |
void |
set(int value)
Set all LED values. |
Leds |
setOff(int value)
Asynchronous interface to turn off selected LEDs. |
Leds |
setOn(int value)
Asynchronous interface to turn on selected LEDs. |
Leds |
setSet(int value)
Asynchronous interface to set all LED values. |
Leds |
setToggle(int value)
Asynchronous interface to toggle selected LEDs. |
Action |
submit()
Submit this Action for processing by the action engine. |
void |
toggle(int value)
Toggle selected LEDs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Leds()
Method Detail |
---|
public void set(int value)
Leds
set
in interface Leds
value
- a bit mask where true means on and false means offpublic void on(int value)
Leds
on
in interface Leds
value
- a bit mask where true means on and false means ignorepublic void off(int value)
Leds
off
in interface Leds
value
- a bit mask where true means off and false means ignorepublic void toggle(int value)
Leds
toggle
in interface Leds
value
- a bit mask where true means toggle and false means ignorepublic Leds setSet(int value)
Leds
Prepares the Action to set all LED values but does not initiate the
operation until submit()
is called.
setSet
in interface Leds
value
- a bit mask where true means on and false means off
public Leds setOn(int value)
Leds
Prepares the Action to turn on selected LEDs but does not initiate the
operation until submit()
is called.
setOn
in interface Leds
value
- a bit mask where true means on and false means ignore
public Leds setOff(int value)
Leds
Prepares the Action to turn off selected LEDs but does not initiate the
operation until submit()
is called.
setOff
in interface Leds
value
- a bit mask where true means off and false means ignore
public Leds setToggle(int value)
Leds
Prepares the Action to toggle selected LEDs but does not initiate the
operation until submit()
is called.
setToggle
in interface Leds
value
- a bit mask where true means toggle and false means ignore
public Action submit()
Action
submit
in interface Action
public Action block()
Action
block
in interface Action
public Action block(int timeoutMilli)
Action
block
in interface Action
timeoutMilli
- the maximum number of milliseconds to block
public Action cancel()
Action
cancel
in interface Action
public byte getActionState()
Action
getActionState
in interface Action
public boolean isDone()
Action
isDone
in interface Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |