Lines Matching refs:Event

27 using aidl::android::hardware::sensors::Event;
86 void convertToSensorEvent(const Event& src, sensors_event_t* dst) { in convertToSensorEvent()
97 dst->meta_data.what = (int32_t)src.payload.get<Event::EventPayload::meta>().what; in convertToSensorEvent()
110 dst->acceleration.x = src.payload.get<Event::EventPayload::vec3>().x; in convertToSensorEvent()
111 dst->acceleration.y = src.payload.get<Event::EventPayload::vec3>().y; in convertToSensorEvent()
112 dst->acceleration.z = src.payload.get<Event::EventPayload::vec3>().z; in convertToSensorEvent()
113 dst->acceleration.status = (int32_t)src.payload.get<Event::EventPayload::vec3>().status; in convertToSensorEvent()
118 dst->data[0] = src.payload.get<Event::EventPayload::vec4>().x; in convertToSensorEvent()
119 dst->data[1] = src.payload.get<Event::EventPayload::vec4>().y; in convertToSensorEvent()
120 dst->data[2] = src.payload.get<Event::EventPayload::vec4>().z; in convertToSensorEvent()
121 dst->data[3] = src.payload.get<Event::EventPayload::vec4>().w; in convertToSensorEvent()
127 dst->data[0] = src.payload.get<Event::EventPayload::data>().values[0]; in convertToSensorEvent()
128 dst->data[1] = src.payload.get<Event::EventPayload::data>().values[1]; in convertToSensorEvent()
129 dst->data[2] = src.payload.get<Event::EventPayload::data>().values[2]; in convertToSensorEvent()
130 dst->data[3] = src.payload.get<Event::EventPayload::data>().values[3]; in convertToSensorEvent()
131 dst->data[4] = src.payload.get<Event::EventPayload::data>().values[4]; in convertToSensorEvent()
138 dst->uncalibrated_gyro.x_uncalib = src.payload.get<Event::EventPayload::uncal>().x; in convertToSensorEvent()
139 dst->uncalibrated_gyro.y_uncalib = src.payload.get<Event::EventPayload::uncal>().y; in convertToSensorEvent()
140 dst->uncalibrated_gyro.z_uncalib = src.payload.get<Event::EventPayload::uncal>().z; in convertToSensorEvent()
141 dst->uncalibrated_gyro.x_bias = src.payload.get<Event::EventPayload::uncal>().xBias; in convertToSensorEvent()
142 dst->uncalibrated_gyro.y_bias = src.payload.get<Event::EventPayload::uncal>().yBias; in convertToSensorEvent()
143 dst->uncalibrated_gyro.z_bias = src.payload.get<Event::EventPayload::uncal>().zBias; in convertToSensorEvent()
165 dst->data[0] = src.payload.get<Event::EventPayload::scalar>(); in convertToSensorEvent()
170 dst->u64.step_counter = src.payload.get<Event::EventPayload::stepCount>(); in convertToSensorEvent()
175 dst->heart_rate.bpm = src.payload.get<Event::EventPayload::heartRate>().bpm; in convertToSensorEvent()
177 (int8_t)src.payload.get<Event::EventPayload::heartRate>().status; in convertToSensorEvent()
183 dst->data[i] = src.payload.get<Event::EventPayload::pose6DOF>().values[i]; in convertToSensorEvent()
190 src.payload.get<Event::EventPayload::dynamic>().connected; in convertToSensorEvent()
192 src.payload.get<Event::EventPayload::dynamic>().sensorHandle; in convertToSensorEvent()
196 src.payload.get<Event::EventPayload::dynamic>().uuid.values.data(), 16); in convertToSensorEvent()
202 const AdditionalInfo& srcInfo = src.payload.get<Event::EventPayload::additional>(); in convertToSensorEvent()
234 const auto& ht = src.payload.get<Event::EventPayload::headTracker>(); in convertToSensorEvent()
247 dst->limited_axes_imu.x = src.payload.get<Event::EventPayload::limitedAxesImu>().x; in convertToSensorEvent()
248 dst->limited_axes_imu.y = src.payload.get<Event::EventPayload::limitedAxesImu>().y; in convertToSensorEvent()
249 dst->limited_axes_imu.z = src.payload.get<Event::EventPayload::limitedAxesImu>().z; in convertToSensorEvent()
251 src.payload.get<Event::EventPayload::limitedAxesImu>().xSupported; in convertToSensorEvent()
253 src.payload.get<Event::EventPayload::limitedAxesImu>().ySupported; in convertToSensorEvent()
255 src.payload.get<Event::EventPayload::limitedAxesImu>().zSupported; in convertToSensorEvent()
261 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().x; in convertToSensorEvent()
263 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().y; in convertToSensorEvent()
265 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().z; in convertToSensorEvent()
267 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().xBias; in convertToSensorEvent()
269 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().yBias; in convertToSensorEvent()
271 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().zBias; in convertToSensorEvent()
273 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().xSupported; in convertToSensorEvent()
275 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().ySupported; in convertToSensorEvent()
277 src.payload.get<Event::EventPayload::limitedAxesImuUncal>().zSupported; in convertToSensorEvent()
281 dst->heading.heading = src.payload.get<Event::EventPayload::heading>().heading; in convertToSensorEvent()
282 dst->heading.accuracy = src.payload.get<Event::EventPayload::heading>().accuracy; in convertToSensorEvent()
288 memcpy(dst->data, src.payload.get<Event::EventPayload::data>().values.data(), in convertToSensorEvent()
295 void convertFromSensorEvent(const sensors_event_t& src, Event* dst) { in convertFromSensorEvent()
304 Event::EventPayload::MetaData meta; in convertFromSensorEvent()
305 meta.what = (Event::EventPayload::MetaData::MetaDataEventType)src.meta_data.what; in convertFromSensorEvent()
310 dst->payload.set<Event::EventPayload::Tag::meta>(meta); in convertFromSensorEvent()
320 Event::EventPayload::Vec3 vec3; in convertFromSensorEvent()
325 dst->payload.set<Event::EventPayload::Tag::vec3>(vec3); in convertFromSensorEvent()
330 Event::EventPayload::Vec4 vec4; in convertFromSensorEvent()
335 dst->payload.set<Event::EventPayload::Tag::vec4>(vec4); in convertFromSensorEvent()
341 Event::EventPayload::Data data; in convertFromSensorEvent()
343 dst->payload.set<Event::EventPayload::Tag::data>(data); in convertFromSensorEvent()
350 Event::EventPayload::Uncal uncal; in convertFromSensorEvent()
357 dst->payload.set<Event::EventPayload::Tag::uncal>(uncal); in convertFromSensorEvent()
379 dst->payload.set<Event::EventPayload::Tag::scalar>((float)src.data[0]); in convertFromSensorEvent()
384 dst->payload.set<Event::EventPayload::Tag::stepCount>(src.u64.step_counter); in convertFromSensorEvent()
389 Event::EventPayload::HeartRate heartRate; in convertFromSensorEvent()
392 dst->payload.set<Event::EventPayload::Tag::heartRate>(heartRate); in convertFromSensorEvent()
397 Event::EventPayload::Pose6Dof pose6DOF; in convertFromSensorEvent()
401 dst->payload.set<Event::EventPayload::Tag::pose6DOF>(pose6DOF); in convertFromSensorEvent()
411 dst->payload.set<Event::EventPayload::Tag::dynamic>(dynamic); in convertFromSensorEvent()
426 dst->payload.set<Event::EventPayload::Tag::additional>(info); in convertFromSensorEvent()
431 Event::EventPayload::HeadTracker headTracker; in convertFromSensorEvent()
440 dst->payload.set<Event::EventPayload::Tag::headTracker>(headTracker); in convertFromSensorEvent()
446 Event::EventPayload::LimitedAxesImu limitedAxesImu; in convertFromSensorEvent()
453 dst->payload.set<Event::EventPayload::Tag::limitedAxesImu>(limitedAxesImu); in convertFromSensorEvent()
459 Event::EventPayload::LimitedAxesImuUncal limitedAxesImuUncal; in convertFromSensorEvent()
469 dst->payload.set<Event::EventPayload::Tag::limitedAxesImuUncal>(limitedAxesImuUncal); in convertFromSensorEvent()
474 Event::EventPayload::Heading heading; in convertFromSensorEvent()
477 dst->payload.set<Event::EventPayload::heading>(heading); in convertFromSensorEvent()
484 Event::EventPayload::Data data; in convertFromSensorEvent()
486 dst->payload.set<Event::EventPayload::Tag::data>(data); in convertFromSensorEvent()
492 void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { in convertFromASensorEvent()