SunSPOT API V6.0


com.sun.spot.resources.transducers
Interface ITemperatureInput

All Superinterfaces:
IResource, ITransducer
All Known Subinterfaces:
ITemperatureInput
All Known Implementing Classes:
TemperatureInput

public interface ITemperatureInput
extends ITransducer

Simple interface to read temperature.

Note the values returned from methods in the IMeasurementInfo Interface (e.g. getMinValue(), getMaxValue(), getResolution()) should be in Celsius.


Method Summary
 double convertC2F(double val)
          Convert from Celsius to Fahrenheit.
 double convertF2C(double val)
          Convert from Fahrenheit to Celsius.
 double getCelsius()
          Return the current temperature in degrees Celsius.
 double getFahrenheit()
          Return the current temperature in degrees Fahrenheit.
 
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
 

Method Detail

convertC2F

double convertC2F(double val)
Convert from Celsius to Fahrenheit.

Parameters:
val - Celsius value to convert
Returns:
the input value converted to Fahrenheit

convertF2C

double convertF2C(double val)
Convert from Fahrenheit to Celsius.

Parameters:
val - Fahrenheit value to convert
Returns:
the input value converted to Celsius

getCelsius

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

Returns:
the current temperature in degrees Celsius
Throws:
IOException

getFahrenheit

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

Returns:
the current temperature in degrees Fahrenheit
Throws:
IOException

SunSPOT API V6.0


Copyright © 2006-2010 Oracle. All Rights Reserved.