|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.sensorboard.io.IOPin
public class IOPin
| Constructor Summary | |
|---|---|
IOPin(PinDescriptor idx,
IGPIOController cntrl)
|
|
| Method Summary | |
|---|---|
void |
addIInputPinListener(IInputPinListener who)
Adds the specified input pin listener to receive callbacks from this input pin. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this iopin. |
IInputPinListener[] |
getIInputPinListeners()
Returns an array of all the input pin listeners registered on this input pin. |
PinDescriptor |
getIndex()
Return the PinDescriptor associated with this input pin. |
boolean |
getState()
Return the current state of this (output) pin. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isHigh()
Return true if the input bit is high. |
boolean |
isLow()
Return true if the input bit is low. |
boolean |
isOutput()
Ask if this pin is an output. |
void |
notifyIInputPinListeners(boolean nowHigh)
Called by pin's IGPIOController when pin state changes. |
void |
removeIInputPinListener(IInputPinListener who)
Removes the specified input pin listener so that it no longer receives callbacks from this input pin. |
void |
setAsOutput(boolean b)
|
void |
setHigh()
Sets pin output high |
void |
setHigh(boolean high)
|
void |
setLow()
Sets pin output low |
void |
waitForChange()
Block the current thread until the pin's state changes. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOPin(PinDescriptor idx,
IGPIOController cntrl)
| Method Detail |
|---|
public void setHigh()
IOutputPin
setHigh in interface IOutputPinpublic void setLow()
IOutputPin
setLow in interface IOutputPinpublic void setHigh(boolean high)
setHigh in interface IOutputPinhigh - boolean. If true, output is set high, otherwise output is set low.public boolean isLow()
IInputPin
isLow in interface IInputPinpublic boolean isHigh()
IInputPin
isHigh in interface IInputPinpublic boolean getState()
getState in interface IOutputPinpublic void waitForChange()
IInputPin
waitForChange in interface IInputPinpublic boolean isOutput()
IIOPin
isOutput in interface IIOPinpublic void setAsOutput(boolean b)
setAsOutput in interface IIOPinb - if b is true the pin becomes an output, if false it becomes an inputpublic PinDescriptor getIndex()
getIndex in interface IInputPingetIndex in interface IOutputPinpublic void addIInputPinListener(IInputPinListener who)
addIInputPinListener in interface IInputPinwho - the input pin listener to add.public void removeIInputPinListener(IInputPinListener who)
removeIInputPinListener in interface IInputPinwho - the input pin listener to remove.public IInputPinListener[] getIInputPinListeners()
getIInputPinListeners in interface IInputPinpublic void notifyIInputPinListeners(boolean nowHigh)
nowHigh - true if pin is currently set to high state.public boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
Boolean.hashCode(),
Hashtablepublic int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtable
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||