public final class CategoryEnvironment extends SensorBase
SensorBase and describes environment sensors on hardware devices.
This class describes the sensor types in the environment category, such as the temperature,
humidity, barometric pressure, and magnetic field sensors. It also provides the method for
constructing a CategoryEnvironment instance.
SensorBaseSystemCapability.Sensors#SENSOR| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
SENSOR_TYPE_AMBIENT_TEMPERATURE |
An integer representing the temperature sensor type.
|
static int |
SENSOR_TYPE_BAROMETER |
An integer representing the barometric pressure sensor type.
|
static int |
SENSOR_TYPE_HUMIDITY |
An integer representing the humidity sensor type.
|
static int |
SENSOR_TYPE_MAGNETIC_FIELD |
An integer representing the magnetic field sensor type.
|
static int |
SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED |
An integer representing the uncalibrated magnetic field sensor type.
|
static int |
SENSOR_TYPE_SAR |
An integer representing the SAR sensor type.
|
static String |
STRING_SENSOR_TYPE_AMBIENT_TEMPERATURE |
A string of characters describing the temperature sensor type.
|
static String |
STRING_SENSOR_TYPE_BAROMETER |
A string of characters describing the barometric pressure sensor type.
|
static String |
STRING_SENSOR_TYPE_HUMIDITY |
A string of characters describing the humidity sensor type.
|
static String |
STRING_SENSOR_TYPE_MAGNETIC_FIELD |
A string of characters describing the magnetic field sensor type.
|
static String |
STRING_SENSOR_TYPE_MAGNETIC_UNCALIBRATED |
A string of characters describing the uncalibrated magnetic field sensor type.
|
static String |
STRING_SENSOR_TYPE_SAR |
A string of characters describing the SAR sensor type.
|
| 构造器 | 说明 |
|---|---|
CategoryEnvironment(int sensorId,
String name,
String vendor,
int version,
float upperRange,
float resolution,
int flags,
int cacheMaxCount,
long minInterval,
long maxInterval) |
A constructor used to create a
CategoryEnvironment instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCacheMaxCount, getFlags, getMaxInterval, getMinInterval, getName, getResolution, getSensorId, getUpperRange, getVendor, getVersionpublic static final int SENSOR_TYPE_AMBIENT_TEMPERATURE
public static final int SENSOR_TYPE_BAROMETER
public static final int SENSOR_TYPE_HUMIDITY
public static final int SENSOR_TYPE_MAGNETIC_FIELD
public static final int SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
public static final int SENSOR_TYPE_SAR
public static final String STRING_SENSOR_TYPE_AMBIENT_TEMPERATURE
public static final String STRING_SENSOR_TYPE_BAROMETER
public static final String STRING_SENSOR_TYPE_HUMIDITY
public static final String STRING_SENSOR_TYPE_MAGNETIC_FIELD
public static final String STRING_SENSOR_TYPE_MAGNETIC_UNCALIBRATED
public CategoryEnvironment(int sensorId,
String name,
String vendor,
int version,
float upperRange,
float resolution,
int flags,
int cacheMaxCount,
long minInterval,
long maxInterval)
CategoryEnvironment instance.sensorId - Indicates the ID of the sensor.name - Indicates the name of the sensor.vendor - Indicates the manufacturer of the sensor.version - Indicates the version of the sensor.upperRange - Indicates the maximum measurement range of the sensor.resolution - Indicates the resolution of the sensor.flags - Indicates the flags of the sensor.cacheMaxCount - Indicates the maximum number of hardware FIFO elements supported by
the sensor.minInterval - Indicates the minimum sampling interval of the sensor, in nanoseconds.maxInterval - Indicates the maximum sampling interval of the sensor, in nanoseconds.