SunSPOT API V6.0


com.sun.spot.sensorboard.peripheral
Class ADT7411TemperatureInputEvent

java.lang.Object
  extended by com.sun.spot.resources.transducers.SensorEvent
      extended by com.sun.spot.resources.transducers.TemperatureInputEvent
          extended by com.sun.spot.sensorboard.peripheral.ADT7411TemperatureInputEvent

public class ADT7411TemperatureInputEvent
extends TemperatureInputEvent

Capture the state of an ADT7411 temperature input event so it can be reported to a callback.


Field Summary
protected  boolean inCelsius
           
protected  double newHighThreshold
           
protected  double newLowThreshold
           
protected  boolean thresholdChanged
           
 
Fields inherited from class com.sun.spot.resources.transducers.TemperatureInputEvent
value
 
Fields inherited from class com.sun.spot.resources.transducers.SensorEvent
sensor, when
 
Constructor Summary
ADT7411TemperatureInputEvent(ITransducer sensor, boolean inCelsius)
          Constructor
 
Method Summary
 double getHighThresholdCelsius()
          Get the new high threshold value in Celsius.
 double getHighThresholdFahrenheit()
          Get the new high threshold value in Fahrenheit.
 double getLowThresholdCelsius()
          Get the new low threshold value in Celsius.
 double getLowThresholdFahrenheit()
          Get the new low threshold value in Fahrenheit.
 boolean isInCelsius()
          Are the threshold values in Celsius?
 boolean isThresholdChanged()
          Is this a threshold changed event?
 void setThresholds(double newLow, double newHigh)
          Set the new threshold values.
 
Methods inherited from class com.sun.spot.resources.transducers.TemperatureInputEvent
getCelsius, getFahrenheit, getTemperatureInput, setCelsius, setFahrenheit
 
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

thresholdChanged

protected boolean thresholdChanged

newLowThreshold

protected double newLowThreshold

newHighThreshold

protected double newHighThreshold

inCelsius

protected boolean inCelsius
Constructor Detail

ADT7411TemperatureInputEvent

public ADT7411TemperatureInputEvent(ITransducer sensor,
                                    boolean inCelsius)
Constructor

Parameters:
sensor - the ISwitch sensor
Method Detail

setThresholds

public void setThresholds(double newLow,
                          double newHigh)
Set the new threshold values.

Parameters:
newLow - the new low threshold value
newHigh - the new high threshold value

isThresholdChanged

public boolean isThresholdChanged()
Is this a threshold changed event?

Returns:
if true then a threshold changed event

isInCelsius

public boolean isInCelsius()
Are the threshold values in Celsius?

Returns:
true if threshold values in Celsius

getLowThresholdCelsius

public double getLowThresholdCelsius()
Get the new low threshold value in Celsius.

Returns:
the new low threshold value in Celsius

getHighThresholdCelsius

public double getHighThresholdCelsius()
Get the new high threshold value in Celsius.

Returns:
the new high threshold value in Celsius

getLowThresholdFahrenheit

public double getLowThresholdFahrenheit()
Get the new low threshold value in Fahrenheit.

Returns:
the new low threshold value in Fahrenheit

getHighThresholdFahrenheit

public double getHighThresholdFahrenheit()
Get the new high threshold value in Fahrenheit.

Returns:
the new high threshold value in Fahrenheit

SunSPOT API V6.0


Copyright © 2006-2010 Oracle. All Rights Reserved.