|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MeasurementRangeControl
A MeasurementRangeControl
object is an example of
a general control used to set the measurement range of
the sensor.
A controllable sensor that can offer the possibility to
set a measurement range may provide a MeasurementRangeControl
via its getControl()
and getControls()
methods. If the measurement range control is provided, it MUST
inherit this interface. For this control to be implementable,
at least one channel of the sensor must have multiple measurement ranges.
The execute()
method is used to set the default measurement
range for each channel at once.
Method Summary | |
---|---|
MeasurementRange |
getMeasurementRange(ChannelInfo channelInfo)
Returns the current measurement range of the given channel. |
void |
setMeasurementRange(ChannelInfo channelInfo,
MeasurementRange measurementRange)
Sets the measurement range of the channel. |
Methods inherited from interface javax.microedition.sensor.control.Control |
---|
execute, getName |
Method Detail |
---|
MeasurementRange getMeasurementRange(ChannelInfo channelInfo)
Returns the current measurement range of the given channel. The
measurement range MUST be one of the measurement ranges of the
channel returned by the method ChannelInfo.getMeasurementRanges()
.
channelInfo
- the channel whose measurement range is queried
java.lang.IllegalArgumentException
- if the data type of the channel is
TYPE_OBJECT
java.lang.NullPointerException
- if the given channel is
null
void setMeasurementRange(ChannelInfo channelInfo, MeasurementRange measurementRange)
Sets the measurement range of the channel.
channelInfo
- the channel whose measurement range is to be set.measurementRange
- the measurement range to be set.
java.lang.IllegalArgumentException
- if the given range is none of the
ranges returned by the method
ChannelInfo.getMeasurementRanges()
, or if the data type of the
channel is TYPE_OBJECT
.
java.lang.IllegalStateException
- if the measurement range cannot
be set
java.lang.NullPointerException
- if the given channel or measurement range is null
|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |