public class Barometer extends SensorData
Refer to
this internal default resource file
for property keys and default values used to configure this data processor.
To receive data, the variable sensor-name must map to the name of
a sensor task running on Service
.
Modifier and Type | Field and Description |
---|---|
private double |
scale
Multiplier to convert between units.
|
static java.lang.String |
SCALE_INCH_HG
Multiplier for pressure in inches of mercury.
|
static java.lang.String |
SCALE_MILLIBAR
Multiplier for pressure in bar.
|
CFG_AVERAGING_INTERVAL_KEY, CFG_OFFSET_KEY, CFG_SCALE_KEY, constant, dataReceived, dataTime, index, maximumValue, minimumValue, name, reset, resetTime, sensorName, values
Constructor and Description |
---|
Barometer(java.lang.String name,
java.lang.String sensorName,
java.util.Properties config)
Creates a new instance of Barometer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
processValue(double value)
Calls the base class multiplying the value by the scaling constant.
|
averageValue, currentValue, dataAvailable, dataAvailable, getConstant, getName, getResetTime, getSensorName, isReset, maximumValue, minimumValue, peakValue, putData, reset, sigmaValue
public static final java.lang.String SCALE_MILLIBAR
public static final java.lang.String SCALE_INCH_HG
private double scale
public Barometer(java.lang.String name, java.lang.String sensorName, java.util.Properties config)
name
- of this data processor.sensorName
- of the sensor associated with this data.config
- properties for configuring this data.protected void processValue(double value)
processValue
in class SensorData
value
- new value from sensor.