SunSPOT API V6.0


com.sun.spot.sensorboard.peripheral
Interface ITemperatureInput

All Superinterfaces:
IResource, IScalarInput, ITemperatureInput, ITransducer

Deprecated. Use ITemperatureInput instead

public interface ITemperatureInput
extends IScalarInput, ITemperatureInput

Simple extension of IScalarInput to handle temperature.


Field Summary
static boolean CELSIUS
          Deprecated.  
static boolean FAHRENHEIT
          Deprecated.  
 
Method Summary
 void addITemperatureInputThresholdListener(ITemperatureInputThresholdListener who)
          Deprecated. Adds the specified temperature sensor threshold listener to receive callbacks from this temperature sensor.
 double convert(double val, boolean celsius)
          Deprecated. Convert between Celsius and Fahrenheit.
 double getCelsius()
          Deprecated. Return the current temperature in degrees Celsius.
 double getFahrenheit()
          Deprecated. Return the current temperature in degrees Fahrenheit.
 double getHighThreshold(boolean celsius)
          Deprecated. Return the current high threshold value.
 ITemperatureInputThresholdListener[] getITemperatureInputThresholdListeners()
          Deprecated. Returns an array of all the temperature sensor threshold listeners registered on this temperature sensor.
 double getLowThreshold(boolean celsius)
          Deprecated. Return the current low threshold value.
 void removeITemperatureInputThresholdListener(ITemperatureInputThresholdListener who)
          Deprecated. Removes the specified temperature sensor threshold listener so that it no longer receives callbacks from this temperature sensor.
 void setThresholds(double low, double high, boolean celsius)
          Deprecated. Set the high and low thresholds for the temperature sensor.
 
Methods inherited from interface com.sun.spot.sensorboard.io.IScalarInput
addIScalarInputThresholdListener, areThresholdEventsEnabled, enableThresholdEvents, getHighThreshold, getIndex, getIScalarInputThresholdListeners, getLowThreshold, getRange, getValue, removeIScalarInputThresholdListener, setThresholds, supportsThresholdEvents
 
Methods inherited from interface com.sun.spot.resources.transducers.ITransducer
createSensorEvent, getDescription, getMaxSamplingRate, saveEventState
 
Methods inherited from interface com.sun.spot.resources.IResource
addTag, getTags, getTagValue, hasTag, removeTag
 
Methods inherited from interface com.sun.spot.resources.transducers.ITemperatureInput
convertC2F, convertF2C
 
Methods inherited from interface com.sun.spot.resources.transducers.ITransducer
createSensorEvent, getDescription, getMaxSamplingRate, saveEventState
 
Methods inherited from interface com.sun.spot.resources.IResource
addTag, getTags, getTagValue, hasTag, removeTag
 

Field Detail

CELSIUS

static final boolean CELSIUS
Deprecated. 
See Also:
Constant Field Values

FAHRENHEIT

static final boolean FAHRENHEIT
Deprecated. 
See Also:
Constant Field Values
Method Detail

convert

double convert(double val,
               boolean celsius)
Deprecated. 
Convert between Celsius and Fahrenheit.

Parameters:
val - value to convert
celsius - if true convert value from Fahrenheit to Celsius, if false convert value from Celsius to Fahrenheit
Returns:
the input value converted to Celsius or Fahrenheit

getCelsius

double getCelsius()
                  throws IOException
Deprecated. 
Return the current temperature in degrees Celsius.

Specified by:
getCelsius in interface ITemperatureInput
Returns:
the current temperature in degrees Celsius
Throws:
IOException

getFahrenheit

double getFahrenheit()
                     throws IOException
Deprecated. 
Return the current temperature in degrees Fahrenheit.

Specified by:
getFahrenheit in interface ITemperatureInput
Returns:
the current temperature in degrees Fahrenheit
Throws:
IOException

setThresholds

void setThresholds(double low,
                   double high,
                   boolean celsius)
Deprecated. 
Set the high and low thresholds for the temperature sensor. Note: some devices, such as the internal thremometer in the ADT7411, only compare against the integer value.

Parameters:
low - the new low threshold value
high - the new high threshold value
celsius - true if the new thresholds are in degrees Celsius

getLowThreshold

double getLowThreshold(boolean celsius)
Deprecated. 
Return the current low threshold value.

Parameters:
celsius - if true report the low threshold in degrees Celsius
Returns:
the current low threshold value.

getHighThreshold

double getHighThreshold(boolean celsius)
Deprecated. 
Return the current high threshold value.

Parameters:
celsius - if true report the high threshold in degrees Celsius
Returns:
the current high threshold value.

addITemperatureInputThresholdListener

void addITemperatureInputThresholdListener(ITemperatureInputThresholdListener who)
Deprecated. 
Adds the specified temperature sensor threshold listener to receive callbacks from this temperature sensor. Callbacks occur when the temperature reading falls below or equal to the low threshold value, or when it rises above or equal to the high threshold value.

Parameters:
who - the temperature sensor threshold listener to add.

removeITemperatureInputThresholdListener

void removeITemperatureInputThresholdListener(ITemperatureInputThresholdListener who)
Deprecated. 
Removes the specified temperature sensor threshold listener so that it no longer receives callbacks from this temperature sensor. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this temperature sensor.

Parameters:
who - the temperature sensor threshold listener to remove.

getITemperatureInputThresholdListeners

ITemperatureInputThresholdListener[] getITemperatureInputThresholdListeners()
Deprecated. 
Returns an array of all the temperature sensor threshold listeners registered on this temperature sensor.

Returns:
all of this temperature sensor's ITemperatureInputThresholdListener or an empty array if no temperature sensor threshold listeners are currently registered.

SunSPOT API V6.0


Copyright © 2006-2010 Oracle. All Rights Reserved.