SunSPOT API V3.0


com.sun.spot.sensorboard.io
Class InvertingOutputPin

java.lang.Object
  extended by com.sun.spot.sensorboard.io.InvertingOutputPin
All Implemented Interfaces:
IOutputPin

public class InvertingOutputPin
extends Object
implements IOutputPin

Class implementing single bit output with inversion of values suppied by the calling code, i.e. a request to set output high sets it low and vice versa.

Author:
Syntropy

Constructor Summary
InvertingOutputPin(IOutputPin output)
          Constructor.
 
Method Summary
 PinDescriptor getIndex()
          Return the PinDescriptor associated with this output pin.
 boolean getState()
          Return the current state of this output pin.
 void setHigh()
          Sets the output low, i.e. the exact opposite of the output defined for interface SingleBitOutput
 void setHigh(boolean on)
           
 void setLow()
          Sets the output high, i.e. the exact opposite of the output defined for interface SingleBitOutput
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvertingOutputPin

public InvertingOutputPin(IOutputPin output)
Constructor. Stores the single-bit output to be used

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

getIndex

public PinDescriptor getIndex()
Return the PinDescriptor associated with this output pin.

Specified by:
getIndex in interface IOutputPin
Returns:
the PinDescriptor associated with this output pin.

setHigh

public void setHigh()
Sets the output low, i.e. the exact opposite of the output defined for interface SingleBitOutput

Specified by:
setHigh in interface IOutputPin
See Also:
IOutputPin.setHigh()

setLow

public void setLow()
Sets the output high, i.e. the exact opposite of the output defined for interface SingleBitOutput

Specified by:
setLow in interface IOutputPin
See Also:
IOutputPin.setLow()

setHigh

public void setHigh(boolean on)
Specified by:
setHigh in interface IOutputPin
Parameters:
on - if true, the output is set low; if false the output is set high
See Also:
IOutputPin.setHigh(boolean)

getState

public boolean getState()
Return the current state of this output pin.

Specified by:
getState in interface IOutputPin
Returns:
current state of this pin

SunSPOT API V3.0


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