|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Sensor<Q extends Quantity>
Reads a single value from a sensor. Sensor returns a Measureable
instance that contains the measureable quantity read from the sensor.
The action verb for Sensor is read
.
After reading a sensor, be sure to compare its value using
Measureable.doubleValue(unit)
, where unit
defines the resulting unit for the reading (such as SI.Celsius
for a
Temperature reading).
Quantity
,
Measurable
,
SI
,
SensorDriver
Field Summary |
---|
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Method Summary | |
---|---|
Measurable<Q> |
getResult()
Asynchronous interface to get the result of the last sensor read operation. |
Measurable<Q> |
read()
Read a new measurement and return the result. |
Sensor<Q> |
setRead()
Asynchronous interface to set up a read operation on a sensor. |
Methods inherited from interface com.sentilla.system.Action |
---|
block, block, cancel, getActionState, isDone, submit |
Method Detail |
---|
Measurable<Q> read()
After reading a sensor, be sure to read its value using
Measureable.doubleValue(unit)
, where unit
defines the resulting unit for the reading (such as SI.Celsius for a
temperature reading).
Sensor<Q> setRead()
submit()
function to initiating the sensor reading.
Measurable<Q> getResult()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |