com.ibutton.tmex.container
Class iButtonContainer10

java.lang.Object
  |
  +--com.ibutton.tmex.container.iButtonContainerGeneral
        |
        +--com.ibutton.tmex.container.iButtonContainer10

public class iButtonContainer10
extends iButtonContainerGeneral
implements iButtonContainer

iButton container for iButton family type 10 (hex). This family type is a 'temperature' iButton (DS1920 (can) DS1820 (plastic)).

//\\//\\//\\// Does not yet support alarm registers \\//\\//\\// History:


Fields inherited from class com.ibutton.tmex.container.iButtonContainerGeneral
adapter, ID
 
Constructor Summary
iButtonContainer10()
          Constructs a General purpose iButton container class.
 
Method Summary
 float convertToFahrenheit(float celciusTemperature)
          Convert a temperature from celcius to fahrenheit.
 java.lang.String getAlternateNames()
          Retrieve the alternate Dallas Semiconductor part numbers or names.
 java.lang.String getDescription()
          Retrieve a short description of the function of the iButton type.
 java.lang.String getiButtonPartName()
          Retrieve the Dallas Semiconductor part number of the iButton as a string.
 float readTemperature()
          Read the temperature value from this iButton.
 
Methods inherited from class com.ibutton.tmex.container.iButtonContainerGeneral
dataBlock, getBit, getBlock, getByte, getID, getIDString, isAlarming, isPresent, putBit, putByte, reset, select, setupContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

iButtonContainer10

public iButtonContainer10()
Constructs a General purpose iButton container class. This constructor does not contain a source adapter. The method setSourceAdapter must be called right after before this container can be used.
Method Detail

getiButtonPartName

public java.lang.String getiButtonPartName()
Retrieve the Dallas Semiconductor part number of the iButton as a string. For example 'DS1992'.
Specified by:
getiButtonPartName in interface iButtonContainer
Returns:
string represetation of the iButton name.
Overrides:
getiButtonPartName in class iButtonContainerGeneral

getAlternateNames

public java.lang.String getAlternateNames()
Retrieve the alternate Dallas Semiconductor part numbers or names. A 'family' of MicroLAN devices may have more than one part number depending on packaging. There can also be nicknames such as 'Crypto iButton'.
Specified by:
getAlternateNames in interface iButtonContainer
Returns:
string represetation of the alternate names.
Overrides:
getAlternateNames in class iButtonContainerGeneral

getDescription

public java.lang.String getDescription()
Retrieve a short description of the function of the iButton type.
Specified by:
getDescription in interface iButtonContainer
Returns:
string represetation of the function description.
Overrides:
getDescription in class iButtonContainerGeneral

readTemperature

public float readTemperature()
                      throws PortNotSelectedException,
                             PortInUseException,
                             AdapterNotDetectedException,
                             MicroLanIOException,
                             HardwareOptionNotAvailException
Read the temperature value from this iButton. The temperature that is returned is in celcius. Warning, this method takes over 1/2 second to complete.
Returns:
temperature in celcius from iButton
Throws:
PortNotSelectedException -  
PortInUseException -  
AdapterNotDetectedException -  
MicroLanIOException -  

convertToFahrenheit

public float convertToFahrenheit(float celciusTemperature)
Convert a temperature from celcius to fahrenheit.
Returns:
the fahrenheit conversion of the supplied temperature