|
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.transducers.SensorEvent
com.sun.spot.sensorboard.peripheral.ADT7411Event
public class ADT7411Event
Capture the state of an ADT7411 input event so it can be reported to a callback. Used by rev 6 eDemoboard for LightSensor & ScalarInput for thresholdChanged() & thresholdExceeded() callbacks.
| Field Summary | |
|---|---|
protected int |
newHighThreshold
|
protected int |
newLowThreshold
|
protected boolean |
thresholdChanged
|
protected int |
value
|
| Fields inherited from class com.sun.spot.resources.transducers.SensorEvent |
|---|
sensor, when |
| Constructor Summary | |
|---|---|
ADT7411Event(ITransducer sensor)
Constructor |
|
| Method Summary | |
|---|---|
int |
getHighThreshold()
Get the new high threshold value. |
int |
getLowThreshold()
Get the new low threshold value. |
int |
getValue()
Get the event state analog value. |
boolean |
isThresholdChanged()
Is this a threshold changed event? |
void |
setThresholds(int newLow,
int newHigh)
Set the new threshold values. |
void |
setValue(int value)
Record the analog value. |
| Methods inherited from class com.sun.spot.resources.transducers.SensorEvent |
|---|
getSensor, getTime, setTime |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean thresholdChanged
protected int value
protected int newLowThreshold
protected int newHighThreshold
| Constructor Detail |
|---|
public ADT7411Event(ITransducer sensor)
sensor - the appropriate ScalarInput or LightSensor sensor| Method Detail |
|---|
public void setValue(int value)
value - the current state
public void setThresholds(int newLow,
int newHigh)
newLow - the new low threshold valuenewHigh - the new high threshold valuepublic boolean isThresholdChanged()
public int getValue()
public int getLowThreshold()
public int getHighThreshold()
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||