public class Humidity extends TaggedDevice implements TaggedSensor
branchVector, channel, clusterName, DeviceContainer, DeviceType, init, label, max, min, state
Constructor and Description |
---|
Humidity()
Creates an object for the device.
|
Humidity(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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
readSensor()
The readSensor method returns a relative humidity reading
in %RH
|
equals, getBranches, getChannel, getChannelAsString, getClusterName, getDeviceContainer, getDeviceType, getInit, getLabel, getMax, getMin, getOWPath, hashCode, setBranches, setChannel, setChannelFromString, setClusterName, setDeviceContainer, setDeviceType, setInit, setLabel, setOWPath, setOWPath, toString
public Humidity()
public Humidity(DSPortAdapter adapter, java.lang.String netAddress)
adapter
- The adapter serving the sensor.netAddress
- The 1-Wire network address of the sensor.public java.lang.String readSensor() throws OneWireException
readSensor
in interface TaggedSensor
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
adapterCopyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.