Sun SPOT API
Green Release  


com.sun.spot.sensorboard.io
Class InvertingInputPin

java.lang.Object
  extended by com.sun.spot.sensorboard.io.InvertingInputPin
All Implemented Interfaces:
IInputPin

public class InvertingInputPin
extends Object
implements IInputPin

Class implementing single bit input with inversion of values read, i.e. low signal is returned as high and high signal is returned as low.

Author:
jn151271 11-Mar-2005

Constructor Summary
InvertingInputPin(IInputPin input)
          Constructor.
 
Method Summary
 boolean isHigh()
           
 boolean isLow()
           
 void waitForChange()
          Blocks until there is a change, either way, in the input, as defined for the interface SingleBitInput
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvertingInputPin

public InvertingInputPin(IInputPin input)
Constructor. Stores the single-bit input to be used

Parameters:
input - single-bit input to be used
Method Detail

isLow

public boolean isLow()
Specified by:
isLow in interface IInputPin
Returns:
true if the input is high, false if the input is low, i.e. the exact opposite of the returned value as described for the interface SingleBitInput
See Also:
IInputPin.isLow()

isHigh

public boolean isHigh()
Specified by:
isHigh in interface IInputPin
Returns:
true if the input is low, false if the input is high, i.e. the exact opposite of the returned value as described for the interface SingleBitInput
See Also:
IInputPin.isHigh()

waitForChange

public void waitForChange()
Blocks until there is a change, either way, in the input, as defined for the interface SingleBitInput

Specified by:
waitForChange in interface IInputPin
See Also:
IInputPin.waitForChange()

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.