Class Thermal

  • All Implemented Interfaces:

    public class Thermal
    extends TaggedDevice
    implements TaggedSensor
    This class provides a default object for the Thermal type of a tagged 1-Wire device.
    • Constructor Detail

      • Thermal

        public Thermal()
        Creates an object for the device.
      • Thermal

        public Thermal​(DSPortAdapter adapter,
                       java.lang.String netAddress)
        Creates an object for the device with the supplied address and device type connected to the supplied port adapter.
        adapter - The adapter serving the sensor.
        netAddress - The 1-Wire network address of the sensor.
    • Method Detail

      • readSensor

        public java.lang.String readSensor()
                                    throws OneWireException
        The readSensor method returns a temperature in degrees Celsius
        Specified by:
        readSensor in interface TaggedSensor
        String temperature in degrees Celsius
        OneWireIOException - on a 1-Wire communication error such as reading an incorrect CRC from a 1-Wire device. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter