|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.sensorboard.io.InvertingInputPin
public class InvertingInputPin
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.
Constructor Summary | |
---|---|
InvertingInputPin(IInputPin input)
Constructor. |
Method Summary | |
---|---|
void |
addIInputPinListener(IInputPinListener who)
Adds the specified input pin listener to receive callbacks from this input pin. |
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 |
isHigh()
Return true if the actual input bit is low. |
boolean |
isLow()
Return true if the actual input bit is high. |
void |
pinSetHigh(IInputPin pin)
Callback from associated InputPin to when switch released. |
void |
pinSetLow(IInputPin pin)
Callback from associated InputPin to when switch pressed. |
void |
removeIInputPinListener(IInputPinListener who)
Removes the specified input pin listener so that it no longer receives callbacks from this input pin. |
void |
waitForChange()
Blocks until there is a change, either way, in the input, as defined for the interface IInputPin |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvertingInputPin(IInputPin input)
input
- single-bit input to be usedMethod Detail |
---|
public PinDescriptor getIndex()
getIndex
in interface IInputPin
public boolean isLow()
isLow
in interface IInputPin
IInputPin.isLow()
public boolean isHigh()
isHigh
in interface IInputPin
IInputPin.isHigh()
public void waitForChange()
waitForChange
in interface IInputPin
IInputPin.waitForChange()
public void addIInputPinListener(IInputPinListener who)
addIInputPinListener
in interface IInputPin
who
- the input pin listener to add.public void removeIInputPinListener(IInputPinListener who)
removeIInputPinListener
in interface IInputPin
who
- the input pin listener to remove.public IInputPinListener[] getIInputPinListeners()
getIInputPinListeners
in interface IInputPin
public void pinSetLow(IInputPin pin)
pinSetLow
in interface IInputPinListener
public void pinSetHigh(IInputPin pin)
pinSetHigh
in interface IInputPinListener
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |