SunSPOT API V5.0


com.sun.spot.sensorboard.io
Class OutputPin

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

public class OutputPin
extends Object
implements IOutputPin

Accessor object for output only GPIO pins.


Constructor Summary
OutputPin(PinDescriptor idx, IGPIOController cntrl)
          Do not call: for internal use only.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this output pin.
 PinDescriptor getIndex()
          Return the PinDescriptor for this pin.
 boolean getState()
          Return the current state of this pin.
 int hashCode()
          Returns a hash code value for the object.
 void setHigh()
          Set the value of this pin to high.
 void setHigh(boolean high)
          Set the value of this pin.
 void setLow()
          Set the value of this pin to low.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputPin

public OutputPin(PinDescriptor idx,
                 IGPIOController cntrl)
Do not call: for internal use only. Use EDemoBoard#getOutputPins() to get an array of all available high current output pins: H0-H3. Use EDemoBoard#getIOPins() to get an array of all available bidirectional digital pins: D0-D4.

Method Detail

getIndex

public PinDescriptor getIndex()
Return the PinDescriptor for this pin.

Specified by:
getIndex in interface IOutputPin
Returns:
PinDescriptor for this output

setHigh

public void setHigh()
Set the value of this pin to high.

Specified by:
setHigh in interface IOutputPin

setLow

public void setLow()
Set the value of this pin to low.

Specified by:
setLow in interface IOutputPin

setHigh

public void setHigh(boolean high)
Set the value of this pin.

Specified by:
setHigh in interface IOutputPin
Parameters:
high - if true then pin is set to high

getState

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

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

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this output pin.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this output pin is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.