1page.title=Sensor 2page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css"> 3@jd:body 4<!-- Generated by Doxygen 1.8.6 --> 5</div><!-- top --> 6<div class="header"> 7 <div class="summary"> 8<a href="#files">Files</a> | 9<a href="#nested-classes">Data Structures</a> | 10<a href="#define-members">Macros</a> | 11<a href="#typedef-members">Typedefs</a> | 12<a href="#enum-members">Enumerations</a> | 13<a href="#func-members">Functions</a> </div> 14 <div class="headertitle"> 15<div class="title">Sensor</div> </div> 16</div><!--header--> 17<div class="contents"> 18<table class="memberdecls"> 19<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a> 20Files</h2></td></tr> 21<tr class="memitem:sensor_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="sensor_8h.html">sensor.h</a></td></tr> 22<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 23</table><table class="memberdecls"> 24<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> 25Data Structures</h2></td></tr> 26<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a></td></tr> 27<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 28<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a></td></tr> 29<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 30<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a></td></tr> 31<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 32<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a></td></tr> 33<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 34<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a></td></tr> 35<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 36</table><table class="memberdecls"> 37<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> 38Macros</h2></td></tr> 39<tr class="memitem:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">ASENSOR_STANDARD_GRAVITY</a>   (9.80665f)</td></tr> 40<tr class="separator:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memSeparator" colspan="2"> </td></tr> 41<tr class="memitem:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">ASENSOR_MAGNETIC_FIELD_EARTH_MAX</a>   (60.0f)</td></tr> 42<tr class="separator:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memSeparator" colspan="2"> </td></tr> 43<tr class="memitem:ga4423a712e27b6d5a57d138796892886d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">ASENSOR_MAGNETIC_FIELD_EARTH_MIN</a>   (30.0f)</td></tr> 44<tr class="separator:ga4423a712e27b6d5a57d138796892886d"><td class="memSeparator" colspan="2"> </td></tr> 45</table><table class="memberdecls"> 46<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> 47Typedefs</h2></td></tr> 48<tr class="memitem:ga207e807f9e18271f6a763e57232b409f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">ASensorVector</a></td></tr> 49<tr class="separator:ga207e807f9e18271f6a763e57232b409f"><td class="memSeparator" colspan="2"> </td></tr> 50<tr class="memitem:ga0378daec23b2d8a70438ef7c3912475f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">AMetaDataEvent</a></td></tr> 51<tr class="separator:ga0378daec23b2d8a70438ef7c3912475f"><td class="memSeparator" colspan="2"> </td></tr> 52<tr class="memitem:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">AUncalibratedEvent</a></td></tr> 53<tr class="separator:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memSeparator" colspan="2"> </td></tr> 54<tr class="memitem:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">AHeartRateEvent</a></td></tr> 55<tr class="separator:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memSeparator" colspan="2"> </td></tr> 56<tr class="memitem:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">ASensorEvent</a></td></tr> 57<tr class="separator:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memSeparator" colspan="2"> </td></tr> 58<tr class="memitem:gaef620baab9b276ab8f914ae77babc349"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a></td></tr> 59<tr class="separator:gaef620baab9b276ab8f914ae77babc349"><td class="memSeparator" colspan="2"> </td></tr> 60<tr class="memitem:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a></td></tr> 61<tr class="separator:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memSeparator" colspan="2"> </td></tr> 62<tr class="memitem:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a></td></tr> 63<tr class="separator:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memSeparator" colspan="2"> </td></tr> 64<tr class="memitem:gafec8dd682458c750a5f0f913a0f162ce"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a></td></tr> 65<tr class="separator:gafec8dd682458c750a5f0f913a0f162ce"><td class="memSeparator" colspan="2"> </td></tr> 66<tr class="memitem:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> const * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a></td></tr> 67<tr class="separator:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memSeparator" colspan="2"> </td></tr> 68</table><table class="memberdecls"> 69<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> 70Enumerations</h2></td></tr> 71<tr class="memitem:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/> 72  <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">ASENSOR_TYPE_ACCELEROMETER</a> = 1, 73<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">ASENSOR_TYPE_MAGNETIC_FIELD</a> = 2, 74<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">ASENSOR_TYPE_GYROSCOPE</a> = 4, 75<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">ASENSOR_TYPE_LIGHT</a> = 5, 76<br/> 77  <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">ASENSOR_TYPE_PROXIMITY</a> = 8 78<br/> 79 }</td></tr> 80<tr class="separator:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memSeparator" colspan="2"> </td></tr> 81<tr class="memitem:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/> 82  <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d">ASENSOR_STATUS_NO_CONTACT</a> = -1, 83<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e">ASENSOR_STATUS_UNRELIABLE</a> = 0, 84<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0">ASENSOR_STATUS_ACCURACY_LOW</a> = 1, 85<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d">ASENSOR_STATUS_ACCURACY_MEDIUM</a> = 2, 86<br/> 87  <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13">ASENSOR_STATUS_ACCURACY_HIGH</a> = 3 88<br/> 89 }</td></tr> 90<tr class="separator:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memSeparator" colspan="2"> </td></tr> 91<tr class="memitem:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c">AREPORTING_MODE_CONTINUOUS</a> = 0, 92<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5">AREPORTING_MODE_ON_CHANGE</a> = 1, 93<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb">AREPORTING_MODE_ONE_SHOT</a> = 2, 94<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7">AREPORTING_MODE_SPECIAL_TRIGGER</a> = 3 95 }</td></tr> 96<tr class="separator:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memSeparator" colspan="2"> </td></tr> 97</table><table class="memberdecls"> 98<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> 99Functions</h2></td></tr> 100<tr class="memitem:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">ASensorManager_getInstance</a> ()</td></tr> 101<tr class="separator:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memSeparator" colspan="2"> </td></tr> 102<tr class="memitem:ga645be938627498ab2b60d94c562204bd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> *list)</td></tr> 103<tr class="separator:ga645be938627498ab2b60d94c562204bd"><td class="memSeparator" colspan="2"> </td></tr> 104<tr class="memitem:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type)</td></tr> 105<tr class="separator:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memSeparator" colspan="2"> </td></tr> 106<tr class="memitem:ga4313457c0e82f4afa77ef13860629633"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type, bool wakeUp)</td></tr> 107<tr class="separator:ga4313457c0e82f4afa77ef13860629633"><td class="memSeparator" colspan="2"> </td></tr> 108<tr class="memitem:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int ident, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr> 109<tr class="separator:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memSeparator" colspan="2"> </td></tr> 110<tr class="memitem:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">ASensorManager_destroyEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr> 111<tr class="separator:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memSeparator" colspan="2"> </td></tr> 112<tr class="memitem:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">ASensorEventQueue_enableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 113<tr class="separator:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memSeparator" colspan="2"> </td></tr> 114<tr class="memitem:ga03852b813887ec236a34c4aef0df4b68"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">ASensorEventQueue_disableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 115<tr class="separator:ga03852b813887ec236a34c4aef0df4b68"><td class="memSeparator" colspan="2"> </td></tr> 116<tr class="memitem:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">ASensorEventQueue_setEventRate</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor, int32_t usec)</td></tr> 117<tr class="separator:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memSeparator" colspan="2"> </td></tr> 118<tr class="memitem:ga79c9d6264fe81d4e30800f826db72913"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">ASensorEventQueue_hasEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr> 119<tr class="separator:ga79c9d6264fe81d4e30800f826db72913"><td class="memSeparator" colspan="2"> </td></tr> 120<tr class="memitem:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">ASensorEventQueue_getEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> *events, size_t count)</td></tr> 121<tr class="separator:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memSeparator" colspan="2"> </td></tr> 122<tr class="memitem:ga52f4b22990c70df0784b9ccf23314fae"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">ASensor_getName</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 123<tr class="separator:ga52f4b22990c70df0784b9ccf23314fae"><td class="memSeparator" colspan="2"> </td></tr> 124<tr class="memitem:gafaf467fc71f7adba537a90f166e3320d"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">ASensor_getVendor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 125<tr class="separator:gafaf467fc71f7adba537a90f166e3320d"><td class="memSeparator" colspan="2"> </td></tr> 126<tr class="memitem:ga93962747ab3c7d2b609f97af26fc0230"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">ASensor_getType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 127<tr class="separator:ga93962747ab3c7d2b609f97af26fc0230"><td class="memSeparator" colspan="2"> </td></tr> 128<tr class="memitem:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">ASensor_getResolution</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 129<tr class="separator:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memSeparator" colspan="2"> </td></tr> 130<tr class="memitem:gacb6e021757c07344b58742611eaf68e7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 131<tr class="separator:gacb6e021757c07344b58742611eaf68e7"><td class="memSeparator" colspan="2"> </td></tr> 132<tr class="memitem:gae9969580eda319926a677a6937c7afb1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">ASensor_getFifoMaxEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 133<tr class="separator:gae9969580eda319926a677a6937c7afb1"><td class="memSeparator" colspan="2"> </td></tr> 134<tr class="memitem:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">ASensor_getFifoReservedEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 135<tr class="separator:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memSeparator" colspan="2"> </td></tr> 136<tr class="memitem:gabee3eb65390fc75a639c59d653af3591"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">ASensor_getStringType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 137<tr class="separator:gabee3eb65390fc75a639c59d653af3591"><td class="memSeparator" colspan="2"> </td></tr> 138<tr class="memitem:ga99e56b84cf421788c27998da8eab7e39"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">ASensor_getReportingMode</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 139<tr class="separator:ga99e56b84cf421788c27998da8eab7e39"><td class="memSeparator" colspan="2"> </td></tr> 140<tr class="memitem:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">ASensor_isWakeUpSensor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr> 141<tr class="separator:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memSeparator" colspan="2"> </td></tr> 142</table> 143<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 144<h2 class="groupheader">Macro Definition Documentation</h2> 145<a class="anchor" id="gaf8b57b13c6432bc6136aac0ad3813d63"></a> 146<div class="memitem"> 147<div class="memproto"> 148 <table class="memname"> 149 <tr> 150 <td class="memname">#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX   (60.0f)</td> 151 </tr> 152 </table> 153</div><div class="memdoc"> 154<p>Maximum magnetic field on Earth's surface in uT </p> 155 156</div> 157</div> 158<a class="anchor" id="ga4423a712e27b6d5a57d138796892886d"></a> 159<div class="memitem"> 160<div class="memproto"> 161 <table class="memname"> 162 <tr> 163 <td class="memname">#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN   (30.0f)</td> 164 </tr> 165 </table> 166</div><div class="memdoc"> 167<p>Minimum magnetic field on Earth's surface in uT </p> 168 169</div> 170</div> 171<a class="anchor" id="ga5129cb9e4091fc3474e246d5f950e52b"></a> 172<div class="memitem"> 173<div class="memproto"> 174 <table class="memname"> 175 <tr> 176 <td class="memname">#define ASENSOR_STANDARD_GRAVITY   (9.80665f)</td> 177 </tr> 178 </table> 179</div><div class="memdoc"> 180<p>Earth's gravity in m/s^2 </p> 181 182</div> 183</div> 184<h2 class="groupheader">Typedef Documentation</h2> 185<a class="anchor" id="gae85b6eac76abe74e6e53d78bb3a4858c"></a> 186<div class="memitem"> 187<div class="memproto"> 188 <table class="memname"> 189 <tr> 190 <td class="memname">typedef struct <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a> <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a></td> 191 </tr> 192 </table> 193</div><div class="memdoc"> 194 195</div> 196</div> 197<a class="anchor" id="ga0378daec23b2d8a70438ef7c3912475f"></a> 198<div class="memitem"> 199<div class="memproto"> 200 <table class="memname"> 201 <tr> 202 <td class="memname">typedef struct <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a> <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a></td> 203 </tr> 204 </table> 205</div><div class="memdoc"> 206 207</div> 208</div> 209<a class="anchor" id="ga93b28b7ce5e9b6d2ebc5b574cd5f4710"></a> 210<div class="memitem"> 211<div class="memproto"> 212 <table class="memname"> 213 <tr> 214 <td class="memname">typedef struct <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a></td> 215 </tr> 216 </table> 217</div><div class="memdoc"> 218<p><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> is an opaque type that provides information about an hardware sensors.</p> 219<p>A <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> pointer can be obtained using <a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor()</a>, <a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx()</a> or from a <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a>.</p> 220<p>This file provides a set of functions to access properties of a <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>:</p> 221<ul> 222<li><a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">ASensor_getName()</a></li> 223<li><a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">ASensor_getVendor()</a></li> 224<li><a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">ASensor_getType()</a></li> 225<li><a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">ASensor_getResolution()</a></li> 226<li><a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay()</a></li> 227<li><a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">ASensor_getFifoMaxEventCount()</a></li> 228<li><a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">ASensor_getFifoReservedEventCount()</a></li> 229<li><a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">ASensor_getStringType()</a></li> 230<li><a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">ASensor_getReportingMode()</a></li> 231<li><a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">ASensor_isWakeUpSensor()</a> </li> 232</ul> 233 234</div> 235</div> 236<a class="anchor" id="ga6bb167c45f0ef0a94d8f178d227e781f"></a> 237<div class="memitem"> 238<div class="memproto"> 239 <table class="memname"> 240 <tr> 241 <td class="memname">typedef struct <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a></td> 242 </tr> 243 </table> 244</div><div class="memdoc"> 245 246</div> 247</div> 248<a class="anchor" id="gaa9448106d6d463f4cc5dded7c914e7ae"></a> 249<div class="memitem"> 250<div class="memproto"> 251 <table class="memname"> 252 <tr> 253 <td class="memname">typedef struct <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a></td> 254 </tr> 255 </table> 256</div><div class="memdoc"> 257<p><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> is an opaque type that provides access to <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> from hardware sensors.</p> 258<p>A new <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> can be obtained using <a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue()</a>.</p> 259<p>This file provides a set of functions to enable and disable sensors, check and get events, and set event rates on a <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>.</p> 260<ul> 261<li><a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">ASensorEventQueue_enableSensor()</a></li> 262<li><a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">ASensorEventQueue_disableSensor()</a></li> 263<li><a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">ASensorEventQueue_hasEvents()</a></li> 264<li><a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">ASensorEventQueue_getEvents()</a></li> 265<li><a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">ASensorEventQueue_setEventRate()</a> </li> 266</ul> 267 268</div> 269</div> 270<a class="anchor" id="ga26ff51817e8b320a631b3bf4ed378d58"></a> 271<div class="memitem"> 272<div class="memproto"> 273 <table class="memname"> 274 <tr> 275 <td class="memname">typedef <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> const* <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a></td> 276 </tr> 277 </table> 278</div><div class="memdoc"> 279<p><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> is an array of reference to <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>.</p> 280<p>A <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> can be initialized using <a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList()</a>. </p> 281 282</div> 283</div> 284<a class="anchor" id="gaef620baab9b276ab8f914ae77babc349"></a> 285<div class="memitem"> 286<div class="memproto"> 287 <table class="memname"> 288 <tr> 289 <td class="memname">typedef struct <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a></td> 290 </tr> 291 </table> 292</div><div class="memdoc"> 293<p><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> is an opaque type to manage sensors and events queues.</p> 294<p><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> is a singleton that can be obtained using <a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">ASensorManager_getInstance()</a>.</p> 295<p>This file provides a set of functions that uses <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> to access and list hardware sensors, and create and destroy event queues:</p> 296<ul> 297<li><a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList()</a></li> 298<li><a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor()</a></li> 299<li><a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx()</a></li> 300<li><a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue()</a></li> 301<li><a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">ASensorManager_destroyEventQueue()</a> </li> 302</ul> 303 304</div> 305</div> 306<a class="anchor" id="gafec8dd682458c750a5f0f913a0f162ce"></a> 307<div class="memitem"> 308<div class="memproto"> 309 <table class="memname"> 310 <tr> 311 <td class="memname">typedef <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a></td> 312 </tr> 313 </table> 314</div><div class="memdoc"> 315<p><a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> is a type for constant pointers to <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>.</p> 316<p>This is used to define entry in <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> arrays. </p> 317 318</div> 319</div> 320<a class="anchor" id="ga207e807f9e18271f6a763e57232b409f"></a> 321<div class="memitem"> 322<div class="memproto"> 323 <table class="memname"> 324 <tr> 325 <td class="memname">typedef struct <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a> <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a></td> 326 </tr> 327 </table> 328</div><div class="memdoc"> 329<p>A sensor event. </p> 330 331</div> 332</div> 333<a class="anchor" id="ga24acc545b908dd24cadc44c5e0760b3b"></a> 334<div class="memitem"> 335<div class="memproto"> 336 <table class="memname"> 337 <tr> 338 <td class="memname">typedef struct <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a> <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a></td> 339 </tr> 340 </table> 341</div><div class="memdoc"> 342 343</div> 344</div> 345<h2 class="groupheader">Enumeration Type Documentation</h2> 346<a class="anchor" id="ga7ff5f2dff38e7639981794c43dc9167b"></a> 347<div class="memitem"> 348<div class="memproto"> 349 <table class="memname"> 350 <tr> 351 <td class="memname">anonymous enum</td> 352 </tr> 353 </table> 354</div><div class="memdoc"> 355<p>Structures and functions to receive and process sensor events in native code. Sensor types. (keep in sync with hardware/sensor.h) </p> 356<table class="fieldtable"> 357<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df"></a>ASENSOR_TYPE_ACCELEROMETER</em> </td><td class="fielddoc"> 358<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">ASENSOR_TYPE_ACCELEROMETER</a> reporting-mode: continuous</p> 359<p>All values are in SI units (m/s^2) and measure the acceleration of the device minus the force of gravity. </p> 360</td></tr> 361<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8"></a>ASENSOR_TYPE_MAGNETIC_FIELD</em> </td><td class="fielddoc"> 362<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">ASENSOR_TYPE_MAGNETIC_FIELD</a> reporting-mode: continuous</p> 363<p>All values are in micro-Tesla (uT) and measure the geomagnetic field in the X, Y and Z axis. </p> 364</td></tr> 365<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68"></a>ASENSOR_TYPE_GYROSCOPE</em> </td><td class="fielddoc"> 366<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">ASENSOR_TYPE_GYROSCOPE</a> reporting-mode: continuous</p> 367<p>All values are in radians/second and measure the rate of rotation around the X, Y and Z axis. </p> 368</td></tr> 369<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174"></a>ASENSOR_TYPE_LIGHT</em> </td><td class="fielddoc"> 370<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">ASENSOR_TYPE_LIGHT</a> reporting-mode: on-change</p> 371<p>The light sensor value is returned in SI lux units. </p> 372</td></tr> 373<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932"></a>ASENSOR_TYPE_PROXIMITY</em> </td><td class="fielddoc"> 374<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">ASENSOR_TYPE_PROXIMITY</a> reporting-mode: on-change</p> 375<p>The proximity sensor which turns the screen off and back on during calls is the wake-up proximity sensor. Implement wake-up proximity sensor before implementing a non wake-up proximity sensor. For the wake-up proximity sensor set the flag SENSOR_FLAG_WAKE_UP. The value corresponds to the distance to the nearest object in centimeters. </p> 376</td></tr> 377</table> 378 379</div> 380</div> 381<a class="anchor" id="gaabfcbcb5ac86a1edac4035264bc7d2b8"></a> 382<div class="memitem"> 383<div class="memproto"> 384 <table class="memname"> 385 <tr> 386 <td class="memname">anonymous enum</td> 387 </tr> 388 </table> 389</div><div class="memdoc"> 390<p>Sensor accuracy measure. </p> 391<table class="fieldtable"> 392<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d"></a>ASENSOR_STATUS_NO_CONTACT</em> </td><td class="fielddoc"> 393<p>no contact </p> 394</td></tr> 395<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e"></a>ASENSOR_STATUS_UNRELIABLE</em> </td><td class="fielddoc"> 396<p>unreliable </p> 397</td></tr> 398<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0"></a>ASENSOR_STATUS_ACCURACY_LOW</em> </td><td class="fielddoc"> 399<p>low accuracy </p> 400</td></tr> 401<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d"></a>ASENSOR_STATUS_ACCURACY_MEDIUM</em> </td><td class="fielddoc"> 402<p>medium accuracy </p> 403</td></tr> 404<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13"></a>ASENSOR_STATUS_ACCURACY_HIGH</em> </td><td class="fielddoc"> 405<p>high accuracy </p> 406</td></tr> 407</table> 408 409</div> 410</div> 411<a class="anchor" id="ga5d76b81b0ad4c19007a781d4edb8181f"></a> 412<div class="memitem"> 413<div class="memproto"> 414 <table class="memname"> 415 <tr> 416 <td class="memname">anonymous enum</td> 417 </tr> 418 </table> 419</div><div class="memdoc"> 420<p>Sensor Reporting Modes. </p> 421<table class="fieldtable"> 422<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c"></a>AREPORTING_MODE_CONTINUOUS</em> </td><td class="fielddoc"> 423<p>continuous reporting </p> 424</td></tr> 425<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5"></a>AREPORTING_MODE_ON_CHANGE</em> </td><td class="fielddoc"> 426<p>reporting on change </p> 427</td></tr> 428<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb"></a>AREPORTING_MODE_ONE_SHOT</em> </td><td class="fielddoc"> 429<p>on shot reporting </p> 430</td></tr> 431<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7"></a>AREPORTING_MODE_SPECIAL_TRIGGER</em> </td><td class="fielddoc"> 432<p>special trigger reporting </p> 433</td></tr> 434</table> 435 436</div> 437</div> 438<h2 class="groupheader">Function Documentation</h2> 439<a class="anchor" id="gae9969580eda319926a677a6937c7afb1"></a> 440<div class="memitem"> 441<div class="memproto"> 442 <table class="memname"> 443 <tr> 444 <td class="memname">int ASensor_getFifoMaxEventCount </td> 445 <td>(</td> 446 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 447 <td class="paramname"><em>sensor</em></td><td>)</td> 448 <td></td> 449 </tr> 450 </table> 451</div><div class="memdoc"> 452<p>Returns the maximum size of batches for this sensor. Batches will often be smaller, as the hardware fifo might be used for other sensors. </p> 453 454</div> 455</div> 456<a class="anchor" id="gaec7084c6a9d4d85f87c95a70511c5f53"></a> 457<div class="memitem"> 458<div class="memproto"> 459 <table class="memname"> 460 <tr> 461 <td class="memname">int ASensor_getFifoReservedEventCount </td> 462 <td>(</td> 463 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 464 <td class="paramname"><em>sensor</em></td><td>)</td> 465 <td></td> 466 </tr> 467 </table> 468</div><div class="memdoc"> 469<p>Returns the hardware batch fifo size reserved to this sensor. </p> 470 471</div> 472</div> 473<a class="anchor" id="gacb6e021757c07344b58742611eaf68e7"></a> 474<div class="memitem"> 475<div class="memproto"> 476 <table class="memname"> 477 <tr> 478 <td class="memname">int ASensor_getMinDelay </td> 479 <td>(</td> 480 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 481 <td class="paramname"><em>sensor</em></td><td>)</td> 482 <td></td> 483 </tr> 484 </table> 485</div><div class="memdoc"> 486<p>Returns the minimum delay allowed between events in microseconds. A value of zero means that this sensor doesn't report events at a constant rate, but rather only when a new data is available. </p> 487 488</div> 489</div> 490<a class="anchor" id="ga52f4b22990c70df0784b9ccf23314fae"></a> 491<div class="memitem"> 492<div class="memproto"> 493 <table class="memname"> 494 <tr> 495 <td class="memname">const char* ASensor_getName </td> 496 <td>(</td> 497 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 498 <td class="paramname"><em>sensor</em></td><td>)</td> 499 <td></td> 500 </tr> 501 </table> 502</div><div class="memdoc"> 503<p>Returns this sensor's name (non localized) </p> 504 505</div> 506</div> 507<a class="anchor" id="ga99e56b84cf421788c27998da8eab7e39"></a> 508<div class="memitem"> 509<div class="memproto"> 510 <table class="memname"> 511 <tr> 512 <td class="memname">int ASensor_getReportingMode </td> 513 <td>(</td> 514 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 515 <td class="paramname"><em>sensor</em></td><td>)</td> 516 <td></td> 517 </tr> 518 </table> 519</div><div class="memdoc"> 520<p>Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants. </p> 521 522</div> 523</div> 524<a class="anchor" id="ga3da2930dd866cf1f76da6bc39e578a46"></a> 525<div class="memitem"> 526<div class="memproto"> 527 <table class="memname"> 528 <tr> 529 <td class="memname">float ASensor_getResolution </td> 530 <td>(</td> 531 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 532 <td class="paramname"><em>sensor</em></td><td>)</td> 533 <td></td> 534 </tr> 535 </table> 536</div><div class="memdoc"> 537<p>Returns this sensors's resolution </p> 538 539</div> 540</div> 541<a class="anchor" id="gabee3eb65390fc75a639c59d653af3591"></a> 542<div class="memitem"> 543<div class="memproto"> 544 <table class="memname"> 545 <tr> 546 <td class="memname">const char* ASensor_getStringType </td> 547 <td>(</td> 548 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 549 <td class="paramname"><em>sensor</em></td><td>)</td> 550 <td></td> 551 </tr> 552 </table> 553</div><div class="memdoc"> 554<p>Returns this sensor's string type. </p> 555 556</div> 557</div> 558<a class="anchor" id="ga93962747ab3c7d2b609f97af26fc0230"></a> 559<div class="memitem"> 560<div class="memproto"> 561 <table class="memname"> 562 <tr> 563 <td class="memname">int ASensor_getType </td> 564 <td>(</td> 565 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 566 <td class="paramname"><em>sensor</em></td><td>)</td> 567 <td></td> 568 </tr> 569 </table> 570</div><div class="memdoc"> 571<p>Return this sensor's type </p> 572 573</div> 574</div> 575<a class="anchor" id="gafaf467fc71f7adba537a90f166e3320d"></a> 576<div class="memitem"> 577<div class="memproto"> 578 <table class="memname"> 579 <tr> 580 <td class="memname">const char* ASensor_getVendor </td> 581 <td>(</td> 582 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 583 <td class="paramname"><em>sensor</em></td><td>)</td> 584 <td></td> 585 </tr> 586 </table> 587</div><div class="memdoc"> 588<p>Returns this sensor's vendor's name (non localized) </p> 589 590</div> 591</div> 592<a class="anchor" id="ga0ff4118e400bedac62be6b79e9e0f924"></a> 593<div class="memitem"> 594<div class="memproto"> 595 <table class="memname"> 596 <tr> 597 <td class="memname">bool ASensor_isWakeUpSensor </td> 598 <td>(</td> 599 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 600 <td class="paramname"><em>sensor</em></td><td>)</td> 601 <td></td> 602 </tr> 603 </table> 604</div><div class="memdoc"> 605<p>Returns true if this is a wake up sensor, false otherwise. </p> 606 607</div> 608</div> 609<a class="anchor" id="ga03852b813887ec236a34c4aef0df4b68"></a> 610<div class="memitem"> 611<div class="memproto"> 612 <table class="memname"> 613 <tr> 614 <td class="memname">int ASensorEventQueue_disableSensor </td> 615 <td>(</td> 616 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 617 <td class="paramname"><em>queue</em>, </td> 618 </tr> 619 <tr> 620 <td class="paramkey"></td> 621 <td></td> 622 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 623 <td class="paramname"><em>sensor</em> </td> 624 </tr> 625 <tr> 626 <td></td> 627 <td>)</td> 628 <td></td><td></td> 629 </tr> 630 </table> 631</div><div class="memdoc"> 632<p>Disable the selected sensor. Returns a negative error code on failure. </p> 633 634</div> 635</div> 636<a class="anchor" id="ga48a8379cf9de9b09a71a00f8a3699499"></a> 637<div class="memitem"> 638<div class="memproto"> 639 <table class="memname"> 640 <tr> 641 <td class="memname">int ASensorEventQueue_enableSensor </td> 642 <td>(</td> 643 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 644 <td class="paramname"><em>queue</em>, </td> 645 </tr> 646 <tr> 647 <td class="paramkey"></td> 648 <td></td> 649 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 650 <td class="paramname"><em>sensor</em> </td> 651 </tr> 652 <tr> 653 <td></td> 654 <td>)</td> 655 <td></td><td></td> 656 </tr> 657 </table> 658</div><div class="memdoc"> 659<p>Enable the selected sensor. Returns a negative error code on failure. </p> 660 661</div> 662</div> 663<a class="anchor" id="gab3d4354fd0d3ceb5fa97c129b024a18a"></a> 664<div class="memitem"> 665<div class="memproto"> 666 <table class="memname"> 667 <tr> 668 <td class="memname">ssize_t ASensorEventQueue_getEvents </td> 669 <td>(</td> 670 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 671 <td class="paramname"><em>queue</em>, </td> 672 </tr> 673 <tr> 674 <td class="paramkey"></td> 675 <td></td> 676 <td class="paramtype"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> * </td> 677 <td class="paramname"><em>events</em>, </td> 678 </tr> 679 <tr> 680 <td class="paramkey"></td> 681 <td></td> 682 <td class="paramtype">size_t </td> 683 <td class="paramname"><em>count</em> </td> 684 </tr> 685 <tr> 686 <td></td> 687 <td>)</td> 688 <td></td><td></td> 689 </tr> 690 </table> 691</div><div class="memdoc"> 692<p>Returns the next available events from the queue. Returns a negative value if no events are available or an error has occurred, otherwise the number of events returned.</p> 693<p>Examples: <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> event; ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);</p> 694<p><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> eventBuffer[8]; ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8); </p> 695 696</div> 697</div> 698<a class="anchor" id="ga79c9d6264fe81d4e30800f826db72913"></a> 699<div class="memitem"> 700<div class="memproto"> 701 <table class="memname"> 702 <tr> 703 <td class="memname">int ASensorEventQueue_hasEvents </td> 704 <td>(</td> 705 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 706 <td class="paramname"><em>queue</em></td><td>)</td> 707 <td></td> 708 </tr> 709 </table> 710</div><div class="memdoc"> 711<p>Returns true if there are one or more events available in the sensor queue. Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error. </p> 712 713</div> 714</div> 715<a class="anchor" id="gaa6e89b6d69dc3e07f2d7e72e81ec7937"></a> 716<div class="memitem"> 717<div class="memproto"> 718 <table class="memname"> 719 <tr> 720 <td class="memname">int ASensorEventQueue_setEventRate </td> 721 <td>(</td> 722 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 723 <td class="paramname"><em>queue</em>, </td> 724 </tr> 725 <tr> 726 <td class="paramkey"></td> 727 <td></td> 728 <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const * </td> 729 <td class="paramname"><em>sensor</em>, </td> 730 </tr> 731 <tr> 732 <td class="paramkey"></td> 733 <td></td> 734 <td class="paramtype">int32_t </td> 735 <td class="paramname"><em>usec</em> </td> 736 </tr> 737 <tr> 738 <td></td> 739 <td>)</td> 740 <td></td><td></td> 741 </tr> 742 </table> 743</div><div class="memdoc"> 744<p>Sets the delivery rate of events in microseconds for the given sensor. Note that this is a hint only, generally event will arrive at a higher rate. It is an error to set a rate inferior to the value returned by <a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay()</a>. Returns a negative error code on failure. </p> 745 746</div> 747</div> 748<a class="anchor" id="gac46f8b28bcc7a846dea9d841cab0a67b"></a> 749<div class="memitem"> 750<div class="memproto"> 751 <table class="memname"> 752 <tr> 753 <td class="memname"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>* ASensorManager_createEventQueue </td> 754 <td>(</td> 755 <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td> 756 <td class="paramname"><em>manager</em>, </td> 757 </tr> 758 <tr> 759 <td class="paramkey"></td> 760 <td></td> 761 <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> * </td> 762 <td class="paramname"><em>looper</em>, </td> 763 </tr> 764 <tr> 765 <td class="paramkey"></td> 766 <td></td> 767 <td class="paramtype">int </td> 768 <td class="paramname"><em>ident</em>, </td> 769 </tr> 770 <tr> 771 <td class="paramkey"></td> 772 <td></td> 773 <td class="paramtype"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> </td> 774 <td class="paramname"><em>callback</em>, </td> 775 </tr> 776 <tr> 777 <td class="paramkey"></td> 778 <td></td> 779 <td class="paramtype">void * </td> 780 <td class="paramname"><em>data</em> </td> 781 </tr> 782 <tr> 783 <td></td> 784 <td>)</td> 785 <td></td><td></td> 786 </tr> 787 </table> 788</div><div class="memdoc"> 789<p>Creates a new sensor event queue and associate it with a looper.</p> 790<p>"ident" is a identifier for the events that will be returned when calling <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>. The identifier must be >= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback. </p> 791 792</div> 793</div> 794<a class="anchor" id="gaf35624037785cdea1e7fe9e0a73fc5e1"></a> 795<div class="memitem"> 796<div class="memproto"> 797 <table class="memname"> 798 <tr> 799 <td class="memname">int ASensorManager_destroyEventQueue </td> 800 <td>(</td> 801 <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td> 802 <td class="paramname"><em>manager</em>, </td> 803 </tr> 804 <tr> 805 <td class="paramkey"></td> 806 <td></td> 807 <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> * </td> 808 <td class="paramname"><em>queue</em> </td> 809 </tr> 810 <tr> 811 <td></td> 812 <td>)</td> 813 <td></td><td></td> 814 </tr> 815 </table> 816</div><div class="memdoc"> 817<p>Destroys the event queue and free all resources associated to it. </p> 818 819</div> 820</div> 821<a class="anchor" id="gaf4880d87e01f5e2d4a9b8403e4047445"></a> 822<div class="memitem"> 823<div class="memproto"> 824 <table class="memname"> 825 <tr> 826 <td class="memname"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* ASensorManager_getDefaultSensor </td> 827 <td>(</td> 828 <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td> 829 <td class="paramname"><em>manager</em>, </td> 830 </tr> 831 <tr> 832 <td class="paramkey"></td> 833 <td></td> 834 <td class="paramtype">int </td> 835 <td class="paramname"><em>type</em> </td> 836 </tr> 837 <tr> 838 <td></td> 839 <td>)</td> 840 <td></td><td></td> 841 </tr> 842 </table> 843</div><div class="memdoc"> 844<p>Returns the default sensor for the given type, or NULL if no sensor of that type exists. </p> 845 846</div> 847</div> 848<a class="anchor" id="ga4313457c0e82f4afa77ef13860629633"></a> 849<div class="memitem"> 850<div class="memproto"> 851 <table class="memname"> 852 <tr> 853 <td class="memname"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* ASensorManager_getDefaultSensorEx </td> 854 <td>(</td> 855 <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td> 856 <td class="paramname"><em>manager</em>, </td> 857 </tr> 858 <tr> 859 <td class="paramkey"></td> 860 <td></td> 861 <td class="paramtype">int </td> 862 <td class="paramname"><em>type</em>, </td> 863 </tr> 864 <tr> 865 <td class="paramkey"></td> 866 <td></td> 867 <td class="paramtype">bool </td> 868 <td class="paramname"><em>wakeUp</em> </td> 869 </tr> 870 <tr> 871 <td></td> 872 <td>)</td> 873 <td></td><td></td> 874 </tr> 875 </table> 876</div><div class="memdoc"> 877<p>Returns the default sensor with the given type and wakeUp properties or NULL if no sensor of this type and wakeUp properties exists. </p> 878 879</div> 880</div> 881<a class="anchor" id="gaa438fdaf34783a89d139f0a56d2692cd"></a> 882<div class="memitem"> 883<div class="memproto"> 884 <table class="memname"> 885 <tr> 886 <td class="memname"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a>* ASensorManager_getInstance </td> 887 <td>(</td> 888 <td class="paramname"></td><td>)</td> 889 <td></td> 890 </tr> 891 </table> 892</div><div class="memdoc"> 893<p>Get a reference to the sensor manager. ASensorManager is a singleton.</p> 894<p>Example: </p> 895<pre class="fragment">ASensorManager* sensorManager = ASensorManager_getInstance();</pre> 896</div> 897</div> 898<a class="anchor" id="ga645be938627498ab2b60d94c562204bd"></a> 899<div class="memitem"> 900<div class="memproto"> 901 <table class="memname"> 902 <tr> 903 <td class="memname">int ASensorManager_getSensorList </td> 904 <td>(</td> 905 <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> * </td> 906 <td class="paramname"><em>manager</em>, </td> 907 </tr> 908 <tr> 909 <td class="paramkey"></td> 910 <td></td> 911 <td class="paramtype"><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> * </td> 912 <td class="paramname"><em>list</em> </td> 913 </tr> 914 <tr> 915 <td></td> 916 <td>)</td> 917 <td></td><td></td> 918 </tr> 919 </table> 920</div><div class="memdoc"> 921<p>Returns the list of available sensors. </p> 922 923</div> 924</div> 925</div><!-- contents --> 926