Class Event
java.lang.Object
com.dalsemi.onewire.application.tag.TaggedDevice
com.dalsemi.onewire.application.tag.Event
- All Implemented Interfaces:
TaggedSensor
This class provides a default object for the Event type of a tagged 1-Wire
device.
-
Field Summary
Fields inherited from class com.dalsemi.onewire.application.tag.TaggedDevice
branchVector, channel, clusterName, DeviceContainer, DeviceType, init, label, max, min, state
-
Constructor Summary
ConstructorsConstructorDescriptionEvent()
Creates an object for the device.Event
(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
Modifier and TypeMethodDescriptionThe readSensor method returns the "max" string if the Sensor (a switch) has had activity since last time it was checked for activity.Methods inherited from class com.dalsemi.onewire.application.tag.TaggedDevice
equals, getBranches, getChannel, getChannelAsString, getClusterName, getDeviceContainer, getDeviceType, getInit, getLabel, getMax, getMin, getOWPath, hashCode, setBranches, setChannel, setChannelFromString, setClusterName, setDeviceContainer, setDeviceType, setInit, setLabel, setOWPath, setOWPath, toString
-
Constructor Details
-
Event
public Event()Creates an object for the device. -
Event
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
The readSensor method returns the "max" string if the Sensor (a switch) has had activity since last time it was checked for activity.- Specified by:
readSensor
in interfaceTaggedSensor
- Returns:
- String The "max" string associated with this Sensor.
- Throws:
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
-