|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
1-Wire temperature interface class for basic temperature measuring operations. This class should be implemented for each temperature type 1-Wire device.
Field Summary | |
static int |
ALARM_HIGH
High alarm |
static int |
ALARM_LOW
Low Alarm |
Method Summary | |
void |
doTemperatureConvert(byte[] state)
Perform an temperature conversion. |
double |
getMaxTemperature()
Query to get the maximum temperature in degrees C. |
double |
getMinTemperature()
Query to get the minimum temperature in degrees C. |
double |
getTemperature(byte[] state)
This method extracts the Temperature Value in degrees C from the state data retrieved from the 'readDevice()' method. |
double |
getTemperatureAlarm(int alarmType,
byte[] state)
This method extracts the specified Alarm value in degrees C from the state data retrieved from the 'readDevice()' method. |
double |
getTemperatureAlarmResolution()
Query to get the high/low resolution in degrees C. |
double |
getTemperatureResolution(byte[] state)
This method extracts the current resolution in degrees C from the state data retrieved from the 'readDevice()' method. |
double[] |
getTemperatureResolutions()
Query to get an array of available resolutions in degrees C. |
boolean |
hasSelectableTemperatureResolution()
Query to see if this device has selectable resolution. |
boolean |
hasTemperatureAlarms()
Query to see if this temperature measuring device has high/low trip alarms. |
void |
setTemperatureAlarm(int alarmType,
double alarmValue,
byte[] state)
This method sets the alarm value in degrees C in the provided state data. |
void |
setTemperatureResolution(double resolution,
byte[] state)
This method sets the current resolution in degrees C in the provided state data. |
Methods inherited from interface com.dalsemi.onewire.container.OneWireSensor |
readDevice, writeDevice |
Field Detail |
public static final int ALARM_HIGH
public static final int ALARM_LOW
Method Detail |
public boolean hasTemperatureAlarms()
public boolean hasSelectableTemperatureResolution()
public double[] getTemperatureResolutions()
public double getTemperatureAlarmResolution() throws OneWireException
public double getMaxTemperature()
public double getMinTemperature()
public void doTemperatureConvert(byte[] state) throws OneWireIOException, OneWireException
state
- - byte array of device stateOneWireIOException
- OneWireException
- public double getTemperature(byte[] state) throws OneWireIOException
state
- - byte array of device stateOneWireIOException
- In the case of invalid temperature datapublic double getTemperatureAlarm(int alarmType, byte[] state) throws OneWireException
alarmType
- - integer, indicating trip type ALARM_HIGH (1)
or ALARM_LOW (0)state
- - byte array of device statepublic double getTemperatureResolution(byte[] state)
state
- - byte array of device statepublic void setTemperatureAlarm(int alarmType, double alarmValue, byte[] state) throws OneWireException, OneWireIOException
alarmType
- - integer, indicating trip type ALARM_HIGH (1)
or ALARM_LOW (0)alarmValue
- - double, high trip value in degrees Cstate
- - byte array of device statepublic void setTemperatureResolution(double resolution, byte[] state) throws OneWireException, OneWireIOException
resolution
- - double, temperature resolution in degrees Cstate
- - byte array of device state
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |