Sun SPOT API
Green Release  


com.sun.spot.sensorboard.hardware
Class ADT7411InternalTemperatureInput

java.lang.Object
  extended by com.sun.spot.sensorboard.hardware.AbstractADT7411RangeInput
      extended by com.sun.spot.sensorboard.hardware.ADT7411InternalTemperatureInput
All Implemented Interfaces:
IScalarInput, ITemperatureInput

public class ADT7411InternalTemperatureInput
extends AbstractADT7411RangeInput
implements ITemperatureInput

Sub-class of AbstractADT7411RangeInput that accesses the ADT7411 temperature sensor. Once constructed, the ADT7411InternalTemperatureInput object provides values from the temperature sensor via the RangeInput interface implemented by AbstractADT7411RangeInput

Author:
Syntropy

Field Summary
 
Fields inherited from class com.sun.spot.sensorboard.hardware.AbstractADT7411RangeInput
adt7411, lsbAddress, lsbBitShift, msbAddress
 
Constructor Summary
ADT7411InternalTemperatureInput(IADT7411 adt7411)
          Constructor; stores addressing values
 
Method Summary
 double getCelsius()
           
 double getFahrenheit()
           
 
Methods inherited from class com.sun.spot.sensorboard.hardware.AbstractADT7411RangeInput
getRange, getValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.spot.sensorboard.io.IScalarInput
getRange, getValue
 

Constructor Detail

ADT7411InternalTemperatureInput

public ADT7411InternalTemperatureInput(IADT7411 adt7411)
Constructor; stores addressing values

Parameters:
adt7411 - the ADT7411 to be accessed
Method Detail

getCelsius

public double getCelsius()
                  throws IOException
Specified by:
getCelsius in interface ITemperatureInput
Returns:
the current temperature as degrees celsius
Throws:
IOException

getFahrenheit

public double getFahrenheit()
                     throws IOException
Specified by:
getFahrenheit in interface ITemperatureInput
Returns:
the current temperature as degrees fahrenheit
Throws:
IOException

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.