com.sentilla.platform.tmote
Class Button

java.lang.Object
  extended by com.sentilla.platform.tmote.Action
      extended by com.sentilla.platform.tmote.DigitalPin
          extended by com.sentilla.platform.tmote.InterruptPin
              extended by com.sentilla.platform.tmote.Button
All Implemented Interfaces:
Action, Button, DigitalPin, InterruptPin

public class Button
extends InterruptPin
implements Button

Tmote implementation of the Button interface.


Field Summary
 
Fields inherited from class com.sentilla.platform.tmote.DigitalPin
digitalPinCmd, digitalPinId, digitalPinPortmask, digitalPinTime, digitalPinValue, EDGE_CHANGE, EDGE_FALLING, EDGE_RISING, GET_PORT, GET_VALUE, SET_PORT, SET_VALUE
 
Fields inherited from class com.sentilla.platform.tmote.Action
actionAuto, actionId, actionState, isolateOwner
 
Fields inherited from interface com.sentilla.system.Action
DONE, ERROR, IDLE, PENDING
 
Constructor Summary
Button(int buttonFilter)
           
 
Method Summary
 void change()
          Returns when the state of the user button changes.
 int getId()
          Asynchronous interface to get the pin id for this DigitalPin object.
 void press()
          Returns when the user button transitions from released to 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()
          Asynchronous interface to initiate a read operation.
 Button setRelease()
          Sets the button to await transition from pressed to released.
 
Methods inherited from class com.sentilla.platform.tmote.InterruptPin
checkId, edge, getEdgeTime, isRisingEdge, setEdge
 
Methods inherited from class com.sentilla.platform.tmote.DigitalPin
getTime, getValue, read, read, readPort, setId, setWrite, write, write, writePort
 
Methods inherited from class com.sentilla.platform.tmote.Action
block, block, cancel, getActionState, initAction, isDone, lookup, submit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sentilla.system.Button
getTime, getValue, read
 
Methods inherited from interface com.sentilla.system.Action
block, block, cancel, getActionState, isDone, submit
 
Methods inherited from interface com.sentilla.system.DigitalPin
getTime, getValue, read, setWrite, write, writePort
 

Constructor Detail

Button

public Button(int buttonFilter)
Method Detail

press

public void press()
Description copied from interface: Button
Returns when the user button transitions from released to pressed.

Specified by:
press in interface Button

release

public void release()
Description copied from interface: Button
Returns when the user button transitions from pressed to released.

Specified by:
release in interface Button

change

public void change()
Description copied from interface: Button
Returns when the state of the user button changes.

Specified by:
change in interface Button

setRelease

public Button setRelease()
Description copied from interface: Button
Sets the button to await transition from pressed to released.

Specified by:
setRelease in interface Button

setPress

public Button setPress()
Description copied from interface: Button
Sets the button to await transition from released to pressed.

Specified by:
setPress in interface Button

setChange

public Button setChange()
Description copied from interface: Button
Sets the button to await a state transition.

Specified by:
setChange in interface Button

setRead

public Button setRead()
Description copied from interface: DigitalPin
Asynchronous interface to initiate a read operation.

Prepares the Action to read a value but does not initiate the read operation until submit() is called.

Specified by:
setRead in interface Button
Specified by:
setRead in interface DigitalPin
Overrides:
setRead in class DigitalPin
Returns:
The DigitalPin object that has been set to the specified state

getId

public int getId()
Description copied from interface: DigitalPin
Asynchronous interface to get the pin id for this DigitalPin object.

id is specified by port and pin value in hex. For example, Port 2, Pin 3 is represented by id 0x23.

Specified by:
getId in interface Button
Specified by:
getId in interface DigitalPin
Overrides:
getId in class DigitalPin
Returns:
id The digital pin identifier


Copyright © 2007 Sentilla Corporation. All Rights Reserved.