com.sentilla.platform.tmote
Class CpuPowerSensor
java.lang.Object
com.sentilla.platform.tmote.Action
com.sentilla.platform.tmote.CpuPowerSensor
- All Implemented Interfaces:
- Action, Sensor<javax.measure.quantity.Energy>
public class CpuPowerSensor
- extends Action
- implements Sensor<javax.measure.quantity.Energy>
Provides a Sensor implementation for reading the power consumed by the CPU
on tmote.
Method Summary |
javax.measure.Measurable<javax.measure.quantity.Energy> |
getResult()
Asynchronous interface to get the result of the last sensor read operation. |
javax.measure.Measurable<javax.measure.quantity.Energy> |
read()
Reads the Energy used by the CPU between last reset and now. |
Sensor<javax.measure.quantity.Energy> |
setRead()
Asynchronous interface to set up a read operation on a sensor. |
CpuPowerSensor
public CpuPowerSensor()
read
public javax.measure.Measurable<javax.measure.quantity.Energy> read()
- Reads the Energy used by the CPU between last reset and now.
- Specified by:
read
in interface Sensor<javax.measure.quantity.Energy>
- Returns:
- Sensor measurement of type Q.
setRead
public Sensor<javax.measure.quantity.Energy> setRead()
- Description copied from interface:
Sensor
- Asynchronous interface to set up a read operation on a sensor.
Use the
submit()
function to initiating the sensor reading.
- Specified by:
setRead
in interface Sensor<javax.measure.quantity.Energy>
- Returns:
- The instance of Sensor that is set to read its sensor
getResult
public javax.measure.Measurable<javax.measure.quantity.Energy> getResult()
- Description copied from interface:
Sensor
- Asynchronous interface to get the result of the last sensor read operation.
- Specified by:
getResult
in interface Sensor<javax.measure.quantity.Energy>
- Returns:
- Sensor measurement of type Q.
Copyright © 2007 Sentilla Corporation. All Rights Reserved.