开源鸿蒙 sensor_type.h
sensor_type.h
概述
所属模块:
汇总
类
| 类 | 描述 | | ——– | ——– | | SensorInformation | 定义传感器基本信息。 更多… | | SensorEvents | 上报传感器数据结构。 更多… |
宏定义
| 宏定义 | 描述 | | ——– | ——– | | SENSOR_NAME_MAX_LEN 32 | Sensor名称的最大长度 | | SENSOR_VERSION_MAX_LEN 16 | Sensor版本号的最大长度 |
类型定义
| 类型定义 | 描述 | | ——– | ——– | | (RecordDataCallback) (const struct SensorEvents *) | 传感器上报数据回调函数的定义,传感器服务用户在订阅传感器时, 需要注册上报数据回调函数,传感器使能后,传感器服务用户可以接受到传感器数据,详见SensorInterface。 更多… |
枚举
| 枚举 | 描述 | | ——– | ——– | | SensorStatus { SENSOR_SUCCESS = 0, SENSOR_FAILURE = -1, SENSOR_NOT_SUPPORT = -2, SENSOR_INVALID_PARAM = -3, SENSOR_INVALID_SERVICE = -4, SENSOR_NULL_PTR = -5 } | 定义传感器模块返回值类型。 更多… | | SensorTypeTag { SENSOR_TYPE_NONE = 0, SENSOR_TYPE_ACCELEROMETER = 1, SENSOR_TYPE_GYROSCOPE = 2, SENSOR_TYPE_PHOTOPLETHYSMOGRAPH = 3, SENSOR_TYPE_ELECTROCARDIOGRAPH = 4, SENSOR_TYPE_AMBIENT_LIGHT = 5, SENSOR_TYPE_MAGNETIC_FIELD = 6, SENSOR_TYPE_CAPACITIVE = 7, SENSOR_TYPE_BAROMETER = 8, SENSOR_TYPE_TEMPERATURE = 9, SENSOR_TYPE_HALL = 10, SENSOR_TYPE_GESTURE = 11, SENSOR_TYPE_PROXIMITY = 12, SENSOR_TYPE_HUMIDITY = 13, SENSOR_TYPE_MEDICAL_BEGIN = 128, SENSOR_TYPE_MEDICAL_END = 160, SENSOR_TYPE_PHYSICAL_MAX = 255, SENSOR_TYPE_ORIENTATION = 256, SENSOR_TYPE_GRAVITY = 257, SENSOR_TYPE_LINEAR_ACCELERATION = 258, SENSOR_TYPE_ROTATION_VECTOR = 259, SENSOR_TYPE_AMBIENT_TEMPERATURE = 260, SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = 261, SENSOR_TYPE_GAME_ROTATION_VECTOR = 262, SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = 263, SENSOR_TYPE_SIGNIFICANT_MOTION = 264, SENSOR_TYPE_PEDOMETER_DETECTION = 265, SENSOR_TYPE_PEDOMETER = 266, SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = 277, SENSOR_TYPE_HEART_RATE = 278, SENSOR_TYPE_DEVICE_ORIENTATION = 279, SENSOR_TYPE_WEAR_DETECTION = 280, SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 281, SENSOR_TYPE_MAX } | 定义传感器类型标识。 更多… | | SensorAccuracyType { SENSOR_NO_ACCURACY = 0, SENSOR_LOW_ACCURACY = 1, SENSOR_MEDIUM_ACCURACY = 2, SENSOR_HIGH_ACCURACY = 3, SENSOR_MAX_ACCURACY } | 传感器的精度类型。 更多… | | SensorRangeType { SENSOR_RANGE_LEVEL1 = 0, SENSOR_RANGE_LEVEL2 = 1, SENSOR_RANGE_LEVEL3 = 2, SENSOR_RANGE_LEVEL_MAX } | 传感器的量程级别。 更多… | | SensorModeType { SENSOR_MODE_DEFAULT = 0, SENSOR_MODE_REALTIME = 1, SENSOR_MODE_ON_CHANGE = 2, SENSOR_MODE_ONE_SHOT = 3, SENSOR_MODE_FIFO_MODE = 4, SENSOR_MODE_MAX } | 传感器的工作模式。 更多… | | SensorGroupType { TRADITIONAL_SENSOR_TYPE = 0, MEDICAL_SENSOR_TYPE = 1, SENSOR_GROUP_TYPE_MAX } | 枚举传感器的硬件服务组。 更多… |
详细描述
定义传感器模块所使用的传感器类型,传感器信息,传感器数据结构等数据类型。
Since:
2.2
Version:
1.0
你可能感兴趣的文章
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦