com.dalsemi.onewire.application.tag
Class Humidity
java.lang.Object
|
+--com.dalsemi.onewire.application.tag.TaggedDevice
|
+--com.dalsemi.onewire.application.tag.Humidity
- All Implemented Interfaces:
- TaggedSensor
- public class Humidity
- extends TaggedDevice
- implements TaggedSensor
This class provides a default object for the Humidity type
of a tagged 1-Wire device.
Constructor Summary |
Humidity()
Creates an object for the device. |
Humidity(DSPortAdapter adapter,
String netAddress)
Creates an object for the device with the supplied address and device type connected
to the supplied port adapter. |
Method Summary |
String |
readSensor()
The readSensor method returns a relative humidity reading
in %RH |
Methods inherited from class com.dalsemi.onewire.application.tag.TaggedDevice |
getBranches, getChannel, getChannelAsString, getClusterName, getDeviceContainer, getDeviceType, getInit, getLabel, getMax, getMin, getOWPath, setBranches, setChannel, setChannelFromString, setClusterName, setDeviceContainer, setDeviceType, setInit, setLabel, setOWPath, setOWPath |
Humidity
public Humidity()
- Creates an object for the device.
Humidity
public Humidity(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.
readSensor
public String readSensor()
throws OneWireException
- The readSensor method returns a relative humidity reading
in %RH
- Specified by:
readSensor
in interface TaggedSensor
- Returns:
- String humidity in %RH