com.dalsemi.onewire.container
Interface OneWireSensor
- All Known Subinterfaces:
- ADContainer, ClockContainer, PotentiometerContainer, SwitchContainer, TemperatureContainer
- public interface OneWireSensor
1-Wire sensor interface class for basic sensor operations.
This class should be implemented for each sensor type
1-Wire device.
- Version:
- 0.00, 28 Aug 2000
Method Summary |
byte[] |
readDevice()
This method retrieves the 1-Wire device sensor state. |
void |
writeDevice(byte[] state)
This method write the 1-Wire device sensor state that
have been changed by the 'set' methods. |
readDevice
public byte[] readDevice()
throws OneWireIOException,
OneWireException
- This method retrieves the 1-Wire device sensor state. This state is
returned as a byte array. Pass this byte array to the static query
and set methods. If the device state needs to be changed then call
the 'writeDevice' to finalize the one or more change.
- Returns:
byte[]<\code> 1-Wire device sensor state *- Throws:
OneWireIOException
- OneWireException
-
writeDevice
public void writeDevice(byte[] state)
throws OneWireIOException,
OneWireException
- This method write the 1-Wire device sensor state that
have been changed by the 'set' methods. It knows which registers have
changed by looking at the bitmap fields appended to the state
data.
- Parameters:
state
- - byte array of clock register page contents- Throws:
OneWireIOException
- OneWireException
-