|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.sensor.MeasurementRange
public class MeasurementRange
This class represents the measurement range of one channel of the sensor.
The channel may have several measurement ranges.
Retrieved data values MUST reside within one of the measurement
ranges of the channel. MeasurementRange
objects can be asked with the query ChannelInfo.getMeasurementRanges()
.
In addition to the smallest and largest value, the
class also contains the resolution.
The range may be switched to another during the measurement. The range and the resolution are related values. The resolution varies according to the measurement range in use.
Range limits and resolution MUST be presented in the same scale and
have the same unit as measured data values.
The MeasurementRange
MUST be immutable.
Constructor Summary | |
---|---|
MeasurementRange(double smallest,
double largest,
double resolution)
Creates the MeasurementRange object, with given limits and resolution |
Method Summary | |
---|---|
double |
getLargestValue()
Returns the largest value of the measurement range. |
double |
getResolution()
Returns the resolution of the range. |
double |
getSmallestValue()
Returns the smallest value of the range. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeasurementRange(double smallest, double largest, double resolution)
Creates the MeasurementRange
object, with given limits and resolution
smallest
- the smallest value of the measurement rangelargest
- the largest value of the measurement rangeresolution
- the resolution of the measurement range
java.lang.IllegalArgumentException
- if smallest > largest, or
resolution < 0Method Detail |
---|
public double getLargestValue()
Returns the largest value of the measurement range. The value is the same as that given as the constructor parameter for the largest value.
public double getResolution()
Returns the resolution of the range. The resolution is the smallest amount of change in the input of a sensor that can be detected as a change in the output. Resolution is a property of the transducer of a sensor but the input and output ranges and word length of the A/D converter usually set the limitations for the resolution of a digital sensor.
public double getSmallestValue()
Returns the smallest value of the range. The value is the same as that given as the constructor parameter for the smallest value.
|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |