All Implemented Interfaces:

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

    • Level

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

      public Level(DSPortAdapter adapter, 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 Details

    • readSensor

      public String readSensor() throws OneWireException
      The readSensor method returns the "max" or "min" string of the Sensor (in this case, a switch). The elements "max" and "min" represent conducting and non-conducting states of the switch, respectively.
      Specified by:
      readSensor in interface TaggedSensor
      String The "max" string is associated with the conducting switch state, and the "min" string is associated with the non-conducting state of the 1-Wire switch.
      OneWireException - on a communication or setup error with the 1-Wire adapter