blob: 7897a8399100c42a99bb1fe2d1be4d5f1f5a2747 [file] [log] [blame]
Brian Duddiecd3a43f2016-12-07 16:53:11 -08001component_class: HAL_HIDL
2component_type_version: 1.0
3component_name: "IContexthubCallback"
4
5package: "android.hardware.contexthub"
6
7import: "android.hardware.contexthub@1.0::types"
Keun Soo Yim09717dd2017-02-02 22:34:22 -08008import: "android.hidl.base@1.0::types"
Brian Duddiecd3a43f2016-12-07 16:53:11 -08009
10interface: {
Keun Soo Yim09717dd2017-02-02 22:34:22 -080011 attribute: {
12 name: "::android::hardware::contexthub::V1_0::Result"
13 type: TYPE_ENUM
14 enum_value: {
15 scalar_type: "uint32_t"
16
17 enumerator: "OK"
18 scalar_value: {
19 uint32_t: 0
20 }
21 enumerator: "UNKNOWN_FAILURE"
22 scalar_value: {
23 uint32_t: 1
24 }
25 enumerator: "BAD_PARAMS"
26 scalar_value: {
27 uint32_t: 2
28 }
29 enumerator: "NOT_INIT"
30 scalar_value: {
31 uint32_t: 3
32 }
33 enumerator: "TRANSACTION_FAILED"
34 scalar_value: {
35 uint32_t: 4
36 }
37 enumerator: "TRANSACTION_PENDING"
38 scalar_value: {
39 uint32_t: 5
40 }
41 }
42 }
43
44 attribute: {
45 name: "::android::hardware::contexthub::V1_0::NanoAppFlags"
46 type: TYPE_ENUM
47 enum_value: {
48 scalar_type: "uint32_t"
49
50 enumerator: "SIGNED"
51 scalar_value: {
52 uint32_t: 1
53 }
54 enumerator: "ENCRYPTED"
55 scalar_value: {
56 uint32_t: 2
57 }
58 }
59 }
60
61 attribute: {
62 name: "::android::hardware::contexthub::V1_0::NanoAppBinary"
63 type: TYPE_STRUCT
64 struct_value: {
65 name: "appId"
66 type: TYPE_SCALAR
67 scalar_type: "uint64_t"
68 }
69 struct_value: {
70 name: "appVersion"
71 type: TYPE_SCALAR
72 scalar_type: "uint32_t"
73 }
74 struct_value: {
75 name: "flags"
76 type: TYPE_MASK
77 scalar_type: "uint32_t"
78 predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
79 }
80 struct_value: {
81 name: "targetChreApiMajorVersion"
82 type: TYPE_SCALAR
83 scalar_type: "uint8_t"
84 }
85 struct_value: {
86 name: "targetChreApiMinorVersion"
87 type: TYPE_SCALAR
88 scalar_type: "uint8_t"
89 }
90 struct_value: {
91 name: "customBinary"
92 type: TYPE_VECTOR
93 vector_value: {
94 type: TYPE_SCALAR
95 scalar_type: "uint8_t"
96 }
97 }
98 }
99
100 attribute: {
101 name: "::android::hardware::contexthub::V1_0::SensorType"
102 type: TYPE_ENUM
103 enum_value: {
104 scalar_type: "uint32_t"
105
106 enumerator: "RESERVED"
107 scalar_value: {
108 uint32_t: 0
109 }
110 enumerator: "ACCELEROMETER"
111 scalar_value: {
112 uint32_t: 1
113 }
114 enumerator: "GYROSCOPE"
115 scalar_value: {
116 uint32_t: 2
117 }
118 enumerator: "MAGNETOMETER"
119 scalar_value: {
120 uint32_t: 3
121 }
122 enumerator: "BAROMETER"
123 scalar_value: {
124 uint32_t: 4
125 }
126 enumerator: "PROXIMITY_SENSOR"
127 scalar_value: {
128 uint32_t: 5
129 }
130 enumerator: "AMBIENT_LIGHT_SENSOR"
131 scalar_value: {
132 uint32_t: 6
133 }
134 enumerator: "STATIONARY_DETECT"
135 scalar_value: {
136 uint32_t: 7
137 }
138 enumerator: "INSTANT_MOTION_DETECT"
139 scalar_value: {
140 uint32_t: 8
141 }
142 enumerator: "GPS"
143 scalar_value: {
144 uint32_t: 256
145 }
146 enumerator: "WIFI"
147 scalar_value: {
148 uint32_t: 512
149 }
150 enumerator: "AUDIO"
151 scalar_value: {
152 uint32_t: 768
153 }
154 enumerator: "CAMERA"
155 scalar_value: {
156 uint32_t: 1024
157 }
158 enumerator: "BLE"
159 scalar_value: {
160 uint32_t: 1280
161 }
162 enumerator: "WWAN"
163 scalar_value: {
164 uint32_t: 1536
165 }
166 enumerator: "PRIVATE_SENSOR_BASE"
167 scalar_value: {
168 uint32_t: 65536
169 }
170 }
171 }
172
173 attribute: {
174 name: "::android::hardware::contexthub::V1_0::PhysicalSensor"
175 type: TYPE_STRUCT
176 struct_value: {
177 name: "sensorType"
178 type: TYPE_ENUM
179 predefined_type: "::android::hardware::contexthub::V1_0::SensorType"
180 }
181 struct_value: {
182 name: "type"
183 type: TYPE_STRING
184 }
185 struct_value: {
186 name: "name"
187 type: TYPE_STRING
188 }
189 struct_value: {
190 name: "vendor"
191 type: TYPE_STRING
192 }
193 struct_value: {
194 name: "version"
195 type: TYPE_SCALAR
196 scalar_type: "uint32_t"
197 }
198 struct_value: {
199 name: "fifoReservedCount"
200 type: TYPE_SCALAR
201 scalar_type: "uint32_t"
202 }
203 struct_value: {
204 name: "fifoMaxCount"
205 type: TYPE_SCALAR
206 scalar_type: "uint32_t"
207 }
208 struct_value: {
209 name: "minDelayMs"
210 type: TYPE_SCALAR
211 scalar_type: "uint64_t"
212 }
213 struct_value: {
214 name: "maxDelayMs"
215 type: TYPE_SCALAR
216 scalar_type: "uint64_t"
217 }
218 struct_value: {
219 name: "peakPowerMw"
220 type: TYPE_SCALAR
221 scalar_type: "float_t"
222 }
223 }
224
225 attribute: {
226 name: "::android::hardware::contexthub::V1_0::ContextHub"
227 type: TYPE_STRUCT
228 struct_value: {
229 name: "name"
230 type: TYPE_STRING
231 }
232 struct_value: {
233 name: "vendor"
234 type: TYPE_STRING
235 }
236 struct_value: {
237 name: "toolchain"
238 type: TYPE_STRING
239 }
240 struct_value: {
241 name: "platformVersion"
242 type: TYPE_SCALAR
243 scalar_type: "uint32_t"
244 }
245 struct_value: {
246 name: "toolchainVersion"
247 type: TYPE_SCALAR
248 scalar_type: "uint32_t"
249 }
250 struct_value: {
251 name: "hubId"
252 type: TYPE_SCALAR
253 scalar_type: "uint32_t"
254 }
255 struct_value: {
256 name: "peakMips"
257 type: TYPE_SCALAR
258 scalar_type: "float_t"
259 }
260 struct_value: {
261 name: "stoppedPowerDrawMw"
262 type: TYPE_SCALAR
263 scalar_type: "float_t"
264 }
265 struct_value: {
266 name: "sleepPowerDrawMw"
267 type: TYPE_SCALAR
268 scalar_type: "float_t"
269 }
270 struct_value: {
271 name: "peakPowerDrawMw"
272 type: TYPE_SCALAR
273 scalar_type: "float_t"
274 }
275 struct_value: {
276 name: "connectedSensors"
277 type: TYPE_VECTOR
278 vector_value: {
279 type: TYPE_STRUCT
280 predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor"
281 }
282 }
283 struct_value: {
284 name: "maxSupportedMsgLen"
285 type: TYPE_SCALAR
286 scalar_type: "uint32_t"
287 }
288 struct_value: {
289 name: "chrePlatformId"
290 type: TYPE_SCALAR
291 scalar_type: "uint64_t"
292 }
293 struct_value: {
294 name: "chreApiMajorVersion"
295 type: TYPE_SCALAR
296 scalar_type: "uint8_t"
297 }
298 struct_value: {
299 name: "chreApiMinorVersion"
300 type: TYPE_SCALAR
301 scalar_type: "uint8_t"
302 }
303 struct_value: {
304 name: "chrePatchVersion"
305 type: TYPE_SCALAR
306 scalar_type: "uint16_t"
307 }
308 }
309
310 attribute: {
311 name: "::android::hardware::contexthub::V1_0::HostEndPoint"
312 type: TYPE_ENUM
313 enum_value: {
314 scalar_type: "uint16_t"
315
316 enumerator: "BROADCAST"
317 scalar_value: {
318 uint16_t: 65535
319 }
320 enumerator: "UNSPECIFIED"
321 scalar_value: {
322 uint16_t: 65534
323 }
324 }
325 }
326
327 attribute: {
328 name: "::android::hardware::contexthub::V1_0::ContextHubMsg"
329 type: TYPE_STRUCT
330 struct_value: {
331 name: "appName"
332 type: TYPE_SCALAR
333 scalar_type: "uint64_t"
334 }
335 struct_value: {
336 name: "hostEndPoint"
337 type: TYPE_SCALAR
338 scalar_type: "uint16_t"
339 }
340 struct_value: {
341 name: "msgType"
342 type: TYPE_SCALAR
343 scalar_type: "uint32_t"
344 }
345 struct_value: {
346 name: "msg"
347 type: TYPE_VECTOR
348 vector_value: {
349 type: TYPE_SCALAR
350 scalar_type: "uint8_t"
351 }
352 }
353 }
354
355 attribute: {
356 name: "::android::hardware::contexthub::V1_0::HubMemoryType"
357 type: TYPE_ENUM
358 enum_value: {
359 scalar_type: "uint32_t"
360
361 enumerator: "MAIN"
362 scalar_value: {
363 uint32_t: 0
364 }
365 enumerator: "SECONDARY"
366 scalar_value: {
367 uint32_t: 1
368 }
369 enumerator: "TCM"
370 scalar_value: {
371 uint32_t: 2
372 }
373 }
374 }
375
376 attribute: {
377 name: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
378 type: TYPE_ENUM
379 enum_value: {
380 scalar_type: "uint32_t"
381
382 enumerator: "READ"
383 scalar_value: {
384 uint32_t: 1
385 }
386 enumerator: "WRITE"
387 scalar_value: {
388 uint32_t: 2
389 }
390 enumerator: "EXEC"
391 scalar_value: {
392 uint32_t: 4
393 }
394 }
395 }
396
397 attribute: {
398 name: "::android::hardware::contexthub::V1_0::MemRange"
399 type: TYPE_STRUCT
400 struct_value: {
401 name: "totalBytes"
402 type: TYPE_SCALAR
403 scalar_type: "uint32_t"
404 }
405 struct_value: {
406 name: "freeBytes"
407 type: TYPE_SCALAR
408 scalar_type: "uint32_t"
409 }
410 struct_value: {
411 name: "type"
412 type: TYPE_ENUM
413 predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType"
414 }
415 struct_value: {
416 name: "flags"
417 type: TYPE_MASK
418 scalar_type: "uint32_t"
419 predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
420 }
421 }
422
423 attribute: {
424 name: "::android::hardware::contexthub::V1_0::AsyncEventType"
425 type: TYPE_ENUM
426 enum_value: {
427 scalar_type: "uint32_t"
428
429 enumerator: "RESTARTED"
430 scalar_value: {
431 uint32_t: 1
432 }
433 }
434 }
435
436 attribute: {
437 name: "::android::hardware::contexthub::V1_0::TransactionResult"
438 type: TYPE_ENUM
439 enum_value: {
440 scalar_type: "int32_t"
441
442 enumerator: "SUCCESS"
443 scalar_value: {
444 int32_t: 0
445 }
446 enumerator: "FAILURE"
447 scalar_value: {
448 int32_t: 1
449 }
450 }
451 }
452
453 attribute: {
454 name: "::android::hardware::contexthub::V1_0::HubAppInfo"
455 type: TYPE_STRUCT
456 struct_value: {
457 name: "appId"
458 type: TYPE_SCALAR
459 scalar_type: "uint64_t"
460 }
461 struct_value: {
462 name: "version"
463 type: TYPE_SCALAR
464 scalar_type: "uint32_t"
465 }
466 struct_value: {
467 name: "memUsage"
468 type: TYPE_VECTOR
469 vector_value: {
470 type: TYPE_STRUCT
471 predefined_type: "::android::hardware::contexthub::V1_0::MemRange"
472 }
473 }
474 struct_value: {
475 name: "enabled"
476 type: TYPE_SCALAR
477 scalar_type: "bool_t"
478 }
479 }
480
481 attribute: {
482 name: "::android::hidl::base::V1_0::DebugInfo"
483 type: TYPE_STRUCT
484 struct_value: {
485 name: "pid"
486 type: TYPE_SCALAR
487 scalar_type: "int32_t"
488 }
489 struct_value: {
490 name: "ptr"
491 type: TYPE_SCALAR
492 scalar_type: "uint64_t"
493 }
494 }
495
Brian Duddiecd3a43f2016-12-07 16:53:11 -0800496 api: {
497 name: "handleClientMsg"
498 arg: {
499 type: TYPE_STRUCT
500 predefined_type: "::android::hardware::contexthub::V1_0::ContextHubMsg"
501 }
502 }
503
504 api: {
505 name: "handleTxnResult"
506 arg: {
507 type: TYPE_SCALAR
508 scalar_type: "uint32_t"
509 }
510 arg: {
511 type: TYPE_ENUM
512 predefined_type: "::android::hardware::contexthub::V1_0::TransactionResult"
513 }
514 }
515
516 api: {
517 name: "handleHubEvent"
518 arg: {
519 type: TYPE_ENUM
520 predefined_type: "::android::hardware::contexthub::V1_0::AsyncEventType"
521 }
522 }
523
524 api: {
525 name: "handleAppAbort"
526 arg: {
527 type: TYPE_SCALAR
528 scalar_type: "uint64_t"
529 }
530 arg: {
531 type: TYPE_SCALAR
532 scalar_type: "uint32_t"
533 }
534 }
535
536 api: {
537 name: "handleAppsInfo"
538 arg: {
539 type: TYPE_VECTOR
540 vector_value: {
541 type: TYPE_STRUCT
542 predefined_type: "::android::hardware::contexthub::V1_0::HubAppInfo"
543 }
544 }
545 }
546
547}