com.sentilla.system
Interface Button

All Superinterfaces:
Action
All Known Implementing Classes:
Button

public interface Button
extends Action

A Button detects press and release events.

Action verbs are read, press, release, and change.


Field Summary
 
Fields inherited from interface com.sentilla.system.Action
DONE, ERROR, IDLE, PENDING
 
Method Summary
 void change()
          Returns when the state of the user button changes.
 int getId()
          Returns digital pin ID.
 int getTime()
          Returns the time of a state transition.
 boolean getValue()
          Returns true if digital pin value is set.
 void press()
          Returns when the user button transitions from released to pressed.
 boolean read()
          Returns true if the user button is pressed.
 void release()
          Returns when the user button transitions from pressed to released.
 Button setChange()
          Sets the button to await a state transition.
 Button setPress()
          Sets the button to await transition from released to pressed.
 Button setRead()
          Sets the button to read the button state.
 Button setRelease()
          Sets the button to await transition from pressed to released.
 
Methods inherited from interface com.sentilla.system.Action
block, block, cancel, getActionState, isDone, submit
 

Method Detail

read

boolean read()
Returns true if the user button is pressed.

Returns:
ture if button is pressed.

release

void release()
Returns when the user button transitions from pressed to released.


press

void press()
Returns when the user button transitions from released to pressed.


change

void change()
Returns when the state of the user button changes.


setRead

Button setRead()
Sets the button to read the button state.


setRelease

Button setRelease()
Sets the button to await transition from pressed to released.


setPress

Button setPress()
Sets the button to await transition from released to pressed.


setChange

Button setChange()
Sets the button to await a state transition.


getId

int getId()
Returns digital pin ID.


getValue

boolean getValue()
Returns true if digital pin value is set.


getTime

int getTime()
Returns the time of a state transition.



Copyright © 2007 Sentilla Corporation. All Rights Reserved.