public class Barometer2438 extends SensorTask
The barometer posts the following data:
DataEvent.DATA_SOURCE_PRESSURE
DataEvent.DATA_SOURCE_TEMPERATURE
Refer to this internal default resource file for property keys and default values used to configure this task.
Modifier and Type | Class and Description |
---|---|
private class |
Barometer2438.ReadTask
Samples the DS2438 on the configured schedule.
|
Modifier and Type | Field and Description |
---|---|
private com.dalsemi.onewire.container.OneWireContainer26 |
container
DS2438 Humidity/Temperature/Clock/A-D sensor.
|
private static byte[] |
FAMILY
DS2438 Humidity/Temperature/Clock/A-D sensor family code.
|
private double[] |
pCoeffs
Barometer calibration coefficients.
|
private double[] |
tCoeffs
Barometer calibration coefficients.
|
adapter, address, cancel, CFG_DEVICE_ADDRESS_KEY, CFG_DEVICE_CHANNEL_KEY, CFG_DEVICE_OFFSET_KEY, CFG_DEVICE_SCALE_KEY, CFG_SAMPLING_INTERVAL_KEY, config, dataExchange, LOGGER, name, ONE_WIRE_TIMEOUT, population, SENSOR_TIMEOUT
Constructor and Description |
---|
Barometer2438(java.lang.String name,
com.dalsemi.onewire.adapter.DSPortAdapter adapter,
java.util.Properties config,
IDataExchange dataExchange,
IServiceControl serviceControl)
Creates a new instance of a DS2438-based barometer.
|
beginExclusive, curveFit, doADConvertEFT, doADConvertEFT, doTemperatureConvertEFT, endExclusive, findContainerEFT, findContainerEFT, findContainerEFT, getADVoltageEFT, getADVoltageEFT, getTemperatureEFT, readBytesEFT, readCounterEFT, readDeviceEFT, readFileEFT, setMaxTemperatureResolutionEFT, stdDev, toHexString, toString, writeByteEFT, writeDeviceEFT
private static final byte[] FAMILY
private com.dalsemi.onewire.container.OneWireContainer26 container
private double[] pCoeffs
private double[] tCoeffs
public Barometer2438(java.lang.String name, com.dalsemi.onewire.adapter.DSPortAdapter adapter, java.util.Properties config, IDataExchange dataExchange, IServiceControl serviceControl)
name
- of this sensor task.adapter
- 1-Wire adapter.config
- configuration properties.dataExchange
- to notify with new data.serviceControl
- to schedule the task.