ASensorEvent

描述传感器事件的信息,请参阅 SensorEvent 获取更多文档。

摘要

注意:此结构体的更改必须向后兼容,并反映在 sensors_event_t 中

公共属性

@102
联合 ASensorEvent::@101
加速度
附加信息
数据[16]
浮点型
数据[8]
uint64_t
距离
浮点型
动态传感器元数据
标志
uint32_t
陀螺仪
头部跟踪
航向
心率
光线
浮点型
受限轴 IMU
受限轴 IMU 未校准
磁场
元数据
压力
浮点型
相对湿度
浮点型
reserved0
int32_t
请勿使用
reserved1[3]
int32_t
传感器
int32_t
生成此事件的传感器。
计步器
uint64_t
温度
浮点型
时间戳
int64_t
事件发生时的纳秒级时间,其行为与 Java API 中的 SensorEvent::timestamp 完全相同。
类型
int32_t
事件的传感器类型,例如 ASENSOR_TYPE_ACCELEROMETER
u64
联合 ASensorEvent::@101::@105
未校准加速度
未校准陀螺仪
未校准磁场
向量
版本
int32_t

公共属性

@102

声明于 android/sensor.h
union ASensorEvent::@101 ASensorEvent::@102

加速度

声明于 android/sensor.h
ASensorVector ASensorEvent::acceleration

附加信息

声明于 android/sensor.h
AAdditionalInfoEvent ASensorEvent::additional_info

数据

声明于 android/sensor.h
float ASensorEvent::data[16]

数据

声明于 android/sensor.h
uint64_t ASensorEvent::data[8]

距离

声明于 android/sensor.h
float ASensorEvent::distance

动态传感器元数据

声明于 android/sensor.h
ADynamicSensorEvent ASensorEvent::dynamic_sensor_meta

标志

声明于 android/sensor.h
uint32_t ASensorEvent::flags

陀螺仪

声明于 android/sensor.h
ASensorVector ASensorEvent::gyro

头部跟踪

声明于 android/sensor.h
AHeadTrackerEvent ASensorEvent::head_tracker

航向

声明于 android/sensor.h
AHeadingEvent ASensorEvent::heading

心率

声明于 android/sensor.h
AHeartRateEvent ASensorEvent::heart_rate

光线

声明于 android/sensor.h
float ASensorEvent::light

受限轴 IMU

声明于 android/sensor.h
ALimitedAxesImuEvent ASensorEvent::limited_axes_imu

受限轴 IMU 未校准

声明于 android/sensor.h
ALimitedAxesImuUncalibratedEvent ASensorEvent::limited_axes_imu_uncalibrated

磁场

声明于 android/sensor.h
ASensorVector ASensorEvent::magnetic

元数据

声明于 android/sensor.h
AMetaDataEvent ASensorEvent::meta_data

压力

声明于 android/sensor.h
float ASensorEvent::pressure

相对湿度

声明于 android/sensor.h
float ASensorEvent::relative_humidity

reserved0

声明于 android/sensor.h
int32_t ASensorEvent::reserved0

请勿使用

reserved1

声明于 android/sensor.h
int32_t ASensorEvent::reserved1[3]

传感器

声明于 android/sensor.h
int32_t ASensorEvent::sensor

生成此事件的传感器。

计步器

声明于 android/sensor.h
uint64_t ASensorEvent::step_counter

温度

声明于 android/sensor.h
float ASensorEvent::temperature

时间戳

声明于 android/sensor.h
int64_t ASensorEvent::timestamp

事件发生时的纳秒级时间,其行为与 Java API 中的 SensorEvent::timestamp 完全相同。

类型

声明于 android/sensor.h
int32_t ASensorEvent::type

事件的传感器类型,例如 ASENSOR_TYPE_ACCELEROMETER

u64

声明于 android/sensor.h
union ASensorEvent::@101::@105 ASensorEvent::u64

未校准加速度

声明于 android/sensor.h
AUncalibratedEvent ASensorEvent::uncalibrated_acceleration

未校准陀螺仪

声明于 android/sensor.h
AUncalibratedEvent ASensorEvent::uncalibrated_gyro

未校准磁场

声明于 android/sensor.h
AUncalibratedEvent ASensorEvent::uncalibrated_magnetic

向量

声明于 android/sensor.h
ASensorVector ASensorEvent::vector

版本

声明于 android/sensor.h
int32_t ASensorEvent::version