Class Contact

java.lang.Object
com.dalsemi.onewire.application.tag.TaggedDevice
com.dalsemi.onewire.application.tag.Contact
All Implemented Interfaces:
TaggedSensor

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

    • Contact

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

      public Contact(DSPortAdapter adapter, String netAddress)
      Creates an object for the device with the supplied address and device type connected to the supplied port adapter.
      Parameters:
      adapter - The adapter serving the sensor.
      netAddress - The 1-Wire network address of the sensor.
  • Method Details

    • readSensor

      public String readSensor() throws OneWireException
      The readSensor method returns the "max" string if the Sensor is present or the "min" string if the Sensor is not present.
      Specified by:
      readSensor in interface TaggedSensor
      Returns:
      The "max" string if sensor is present or "min" string if not.
      Throws:
      OneWireException - on a communication or setup error with the 1-Wire adapter