|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITransducer
Provide basic metadata for a sensor or actuator.
Most metadata associated with a transducer should just be put into tags so that it can be searched for when doing a resource lookup. For example: name, vendor, model, version, location, latitude, longitude.
Some other metadata is defined by the API for the specific transducer. For example: units, scale, data type, etc.
Some other metadata depends on the implementing class so needs to be available
via the get methods defined for ITransducer:
description, measurement ranges, and maximum sampling rate.
plus other implemented interfaces like IMeasurementInfo:
minimum value, maximum value, resolution and accuracy,
or IMeasurementRange:
number available ranges, current range, set range, min/max for range
| Method Summary | |
|---|---|
SensorEvent |
createSensorEvent()
Create a SensorEvent of the appropriate type for this sensor. |
String |
getDescription()
This method returns a readable description of the sensor. |
double |
getMaxSamplingRate()
Return the maximum sampling rate per second for this sensor. |
void |
saveEventState(SensorEvent evt)
Save the current sensor state in the specified event. |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Method Detail |
|---|
String getDescription()
double getMaxSamplingRate()
SensorEvent createSensorEvent()
void saveEventState(SensorEvent evt)
evt - the event to store the sensor state in
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||