|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMeasurementRange
Used to get/set the measurement range of a sensor. Similar to the IMeasurementRangeControl() in JSR 256. The min, max, resolution and accuracy of the sensor varies according to the measurement range in use.
| Method Summary | |
|---|---|
void |
addIMeasurementRangeListener(IMeasurementRangeListener who)
Add an IMeasurementRangeListener to be called back when the range is changed. |
double |
getAccuracy(int index)
Returns the Nth accuracy of the specified measurement range. |
int |
getCurrentRange()
Returns the index of the current measurement range of the given sensor. |
IMeasurementRangeListener[] |
getIMeasurementRangeListeners()
Return all of the IMeasurementRangeListener callbacks. |
double |
getMaxValue(int index)
Returns the Nth max value of the specified measurement range. |
double |
getMinValue(int index)
Returns the Nth min value of the specified measurement range. |
int |
getNumberRanges()
Returns the number of possible measurement ranges for this given sensor. |
double |
getResolution(int index)
Returns the Nth resolution of the specified measurement range. |
void |
removeIMeasurementRangeListener(IMeasurementRangeListener who)
Remove an IMeasurementRangeListener from the list of callbacks. |
void |
setCurrentRange(int range)
Sets the measurement range of the sensor. |
| Methods inherited from interface com.sun.spot.resources.transducers.IMeasurementInfo |
|---|
getAccuracy, getMaxValue, getMinValue, getResolution |
| Method Detail |
|---|
int getNumberRanges()
int getCurrentRange()
void setCurrentRange(int range)
range - the index of the measurement range to be set.
IllegalArgumentException - - if the given range is not
a valid range for the sensor.double getMinValue(int index)
index -
IllegalArgumentException - - if index >= size or index < 0double getMaxValue(int index)
index -
IllegalArgumentException - - if index >= size or index < 0double getResolution(int index)
index -
IllegalArgumentException - - if index >= size or index < 0double getAccuracy(int index)
index -
IllegalArgumentException - - if index >= size or index < 0void addIMeasurementRangeListener(IMeasurementRangeListener who)
who - the IMeasurementRangeListener to addvoid removeIMeasurementRangeListener(IMeasurementRangeListener who)
who - the IMeasurementRangeListener to removeIMeasurementRangeListener[] getIMeasurementRangeListeners()
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||