Lines Matching refs:src

27 void convertFromSensor(const sensor_t &src, SensorInfo *dst) {  in convertFromSensor()  argument
28 dst->name = src.name; in convertFromSensor()
29 dst->vendor = src.vendor; in convertFromSensor()
30 dst->version = src.version; in convertFromSensor()
31 dst->sensorHandle = src.handle; in convertFromSensor()
32 dst->type = (SensorType)src.type; in convertFromSensor()
33 dst->maxRange = src.maxRange; in convertFromSensor()
34 dst->resolution = src.resolution; in convertFromSensor()
35 dst->power = src.power; in convertFromSensor()
36 dst->minDelay = src.minDelay; in convertFromSensor()
37 dst->fifoReservedEventCount = src.fifoReservedEventCount; in convertFromSensor()
38 dst->fifoMaxEventCount = src.fifoMaxEventCount; in convertFromSensor()
39 dst->typeAsString = src.stringType; in convertFromSensor()
40 dst->requiredPermission = src.requiredPermission; in convertFromSensor()
41 dst->maxDelay = src.maxDelay; in convertFromSensor()
42 dst->flags = src.flags; in convertFromSensor()
46 const ::android::hardware::sensors::V1_0::SensorInfo &src, in convertToSensor()
48 dst->name = strdup(src.name.c_str()); in convertToSensor()
49 dst->vendor = strdup(src.vendor.c_str()); in convertToSensor()
50 dst->version = src.version; in convertToSensor()
51 dst->handle = src.sensorHandle; in convertToSensor()
52 dst->type = (int)src.type; in convertToSensor()
53 dst->maxRange = src.maxRange; in convertToSensor()
54 dst->resolution = src.resolution; in convertToSensor()
55 dst->power = src.power; in convertToSensor()
56 dst->minDelay = src.minDelay; in convertToSensor()
57 dst->fifoReservedEventCount = src.fifoReservedEventCount; in convertToSensor()
58 dst->fifoMaxEventCount = src.fifoMaxEventCount; in convertToSensor()
59 dst->stringType = strdup(src.typeAsString.c_str()); in convertToSensor()
60 dst->requiredPermission = strdup(src.requiredPermission.c_str()); in convertToSensor()
61 dst->maxDelay = src.maxDelay; in convertToSensor()
62 dst->flags = src.flags; in convertToSensor()
66 void convertFromSensorEvent(const sensors_event_t &src, Event *dst) { in convertFromSensorEvent() argument
71 .timestamp = src.timestamp, in convertFromSensorEvent()
72 .sensorHandle = src.sensor, in convertFromSensorEvent()
73 .sensorType = (SensorType)src.type, in convertFromSensorEvent()
78 dst->u.meta.what = (MetaDataEventType)src.meta_data.what; in convertFromSensorEvent()
82 dst->sensorHandle = src.meta_data.sensor; in convertFromSensorEvent()
92 dst->u.vec3.x = src.acceleration.x; in convertFromSensorEvent()
93 dst->u.vec3.y = src.acceleration.y; in convertFromSensorEvent()
94 dst->u.vec3.z = src.acceleration.z; in convertFromSensorEvent()
95 dst->u.vec3.status = (SensorStatus)src.acceleration.status; in convertFromSensorEvent()
100 dst->u.vec4.x = src.data[0]; in convertFromSensorEvent()
101 dst->u.vec4.y = src.data[1]; in convertFromSensorEvent()
102 dst->u.vec4.z = src.data[2]; in convertFromSensorEvent()
103 dst->u.vec4.w = src.data[3]; in convertFromSensorEvent()
109 dst->u.data[0] = src.data[0]; in convertFromSensorEvent()
110 dst->u.data[1] = src.data[1]; in convertFromSensorEvent()
111 dst->u.data[2] = src.data[2]; in convertFromSensorEvent()
112 dst->u.data[3] = src.data[3]; in convertFromSensorEvent()
113 dst->u.data[4] = src.data[4]; in convertFromSensorEvent()
120 dst->u.uncal.x = src.uncalibrated_gyro.x_uncalib; in convertFromSensorEvent()
121 dst->u.uncal.y = src.uncalibrated_gyro.y_uncalib; in convertFromSensorEvent()
122 dst->u.uncal.z = src.uncalibrated_gyro.z_uncalib; in convertFromSensorEvent()
123 dst->u.uncal.x_bias = src.uncalibrated_gyro.x_bias; in convertFromSensorEvent()
124 dst->u.uncal.y_bias = src.uncalibrated_gyro.y_bias; in convertFromSensorEvent()
125 dst->u.uncal.z_bias = src.uncalibrated_gyro.z_bias; in convertFromSensorEvent()
147 dst->u.scalar = src.data[0]; in convertFromSensorEvent()
152 dst->u.stepCount = src.u64.step_counter; in convertFromSensorEvent()
157 dst->u.heartRate.bpm = src.heart_rate.bpm; in convertFromSensorEvent()
158 dst->u.heartRate.status = (SensorStatus)src.heart_rate.status; in convertFromSensorEvent()
164 dst->u.pose6DOF[i] = src.data[i]; in convertFromSensorEvent()
170 dst->u.dynamic.connected = src.dynamic_sensor_meta.connected; in convertFromSensorEvent()
171 dst->u.dynamic.sensorHandle = src.dynamic_sensor_meta.handle; in convertFromSensorEvent()
173 memcpy(dst->u.dynamic.uuid.data(), src.dynamic_sensor_meta.uuid, 16); in convertFromSensorEvent()
181 const additional_info_event_t& srcInfo = src.additional_info; in convertFromSensorEvent()
193 memcpy(dst->u.data.data(), src.data, 16 * sizeof(float)); in convertFromSensorEvent()
199 void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { in convertFromASensorEvent() argument
201 android::hardware::sensors::implementation::common::convertASensorEvent(src), dst); in convertFromASensorEvent()
204 void convertToSensorEvent(const Event &src, sensors_event_t *dst) { in convertToSensorEvent() argument
206 .sensor = src.sensorHandle, in convertToSensorEvent()
207 .type = (int32_t)src.sensorType, in convertToSensorEvent()
209 .timestamp = src.timestamp}; in convertToSensorEvent()
211 switch (src.sensorType) { in convertToSensorEvent()
215 dst->meta_data.what = (int32_t)src.u.meta.what; in convertToSensorEvent()
216 dst->meta_data.sensor = src.sensorHandle; in convertToSensorEvent()
228 dst->acceleration.x = src.u.vec3.x; in convertToSensorEvent()
229 dst->acceleration.y = src.u.vec3.y; in convertToSensorEvent()
230 dst->acceleration.z = src.u.vec3.z; in convertToSensorEvent()
231 dst->acceleration.status = (int8_t)src.u.vec3.status; in convertToSensorEvent()
236 dst->data[0] = src.u.vec4.x; in convertToSensorEvent()
237 dst->data[1] = src.u.vec4.y; in convertToSensorEvent()
238 dst->data[2] = src.u.vec4.z; in convertToSensorEvent()
239 dst->data[3] = src.u.vec4.w; in convertToSensorEvent()
245 dst->data[0] = src.u.data[0]; in convertToSensorEvent()
246 dst->data[1] = src.u.data[1]; in convertToSensorEvent()
247 dst->data[2] = src.u.data[2]; in convertToSensorEvent()
248 dst->data[3] = src.u.data[3]; in convertToSensorEvent()
249 dst->data[4] = src.u.data[4]; in convertToSensorEvent()
257 dst->uncalibrated_gyro.x_uncalib = src.u.uncal.x; in convertToSensorEvent()
258 dst->uncalibrated_gyro.y_uncalib = src.u.uncal.y; in convertToSensorEvent()
259 dst->uncalibrated_gyro.z_uncalib = src.u.uncal.z; in convertToSensorEvent()
260 dst->uncalibrated_gyro.x_bias = src.u.uncal.x_bias; in convertToSensorEvent()
261 dst->uncalibrated_gyro.y_bias = src.u.uncal.y_bias; in convertToSensorEvent()
262 dst->uncalibrated_gyro.z_bias = src.u.uncal.z_bias; in convertToSensorEvent()
284 dst->data[0] = src.u.scalar; in convertToSensorEvent()
289 dst->u64.step_counter = src.u.stepCount; in convertToSensorEvent()
294 dst->heart_rate.bpm = src.u.heartRate.bpm; in convertToSensorEvent()
295 dst->heart_rate.status = (int8_t)src.u.heartRate.status; in convertToSensorEvent()
301 dst->data[i] = src.u.pose6DOF[i]; in convertToSensorEvent()
307 dst->dynamic_sensor_meta.connected = src.u.dynamic.connected; in convertToSensorEvent()
308 dst->dynamic_sensor_meta.handle = src.u.dynamic.sensorHandle; in convertToSensorEvent()
312 src.u.dynamic.uuid.data(), in convertToSensorEvent()
320 src.u.additional; in convertToSensorEvent()
336 memcpy(dst->data, src.u.data.data(), 16 * sizeof(float)); in convertToSensorEvent()