|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.resources.Resource
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. |
void |
addIInputPinListener(IInputPinListener who)
|
SensorEvent |
createSensorEvent()
Create a SensorEvent of the appropriate type for this sensor. |
String |
getDescription()
This method returns a readable description of the sensor. |
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. |
double |
getMaxSamplingRate()
Return the maximum sampling rate per second for this sensor. |
boolean |
isHigh()
Return true if the actual input bit is low. |
boolean |
isLow()
Return true if the actual input bit is high. |
void |
pinSetHigh(InputPinEvent ev)
Callback from associated InputPin to when switch released. |
void |
pinSetLow(InputPinEvent ev)
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 |
removeIInputPinListener(IInputPinListener who)
|
void |
saveEventState(SensorEvent evt)
Save the current sensor state in the specified event. |
void |
waitForChange()
Blocks until there is a change, either way, in the input, as defined for the interface IInputPin |
| Methods inherited from class com.sun.spot.resources.Resource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Constructor Detail |
|---|
public InvertingInputPin(IInputPin input)
input - single-bit input to be used| Method Detail |
|---|
public PinDescriptor getIndex()
public boolean isLow()
isLow in interface IInputPinIInputPin.isLow()public boolean isHigh()
isHigh in interface IInputPinIInputPin.isHigh()public void waitForChange()
waitForChange in interface IInputPinIInputPin.waitForChange()public 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 void addIInputPinListener(IInputPinListener who)
public void removeIInputPinListener(IInputPinListener who)
public IInputPinListener[] getIInputPinListeners()
getIInputPinListeners in interface IInputPinpublic void pinSetLow(InputPinEvent ev)
pinSetLow in interface IInputPinListenerev - the SensorEvent describing this eventpublic void pinSetHigh(InputPinEvent ev)
pinSetHigh in interface IInputPinListenerev - the SensorEvent describing this eventpublic String getDescription()
ITransducer
getDescription in interface ITransducerpublic double getMaxSamplingRate()
ITransducer
getMaxSamplingRate in interface ITransducerpublic SensorEvent createSensorEvent()
ITransducer
createSensorEvent in interface ITransducerpublic void saveEventState(SensorEvent evt)
ITransducer
saveEventState in interface ITransducerevt - the event to store the sensor state in
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||