com.sentilla.platform.tmote
Class CpuPowerSensor

java.lang.Object
  extended by com.sentilla.platform.tmote.Action
      extended by 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.


Field Summary
 
Fields inherited from class com.sentilla.platform.tmote.Action
actionAuto, actionId, actionState, isolateOwner
 
Fields inherited from interface com.sentilla.system.Action
DONE, ERROR, IDLE, PENDING
 
Constructor Summary
CpuPowerSensor()
           
 
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.
 
Methods inherited from class com.sentilla.platform.tmote.Action
block, block, cancel, getActionState, initAction, isDone, lookup, submit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sentilla.system.Action
block, block, cancel, getActionState, isDone, submit
 

Constructor Detail

CpuPowerSensor

public CpuPowerSensor()
Method Detail

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.