sensor.h File Reference

sensor.h File Reference
#include <sys/types.h>
#include <android/looper.h>

Data Structures

struct  ASensorVector
 
struct  AMetaDataEvent
 
struct  AUncalibratedEvent
 
struct  AHeartRateEvent
 
struct  ASensorEvent
 

Macros

#define ASENSOR_STANDARD_GRAVITY   (9.80665f)
 
#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX   (60.0f)
 
#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN   (30.0f)
 

Typedefs

typedef struct ASensorVector ASensorVector
 
typedef struct AMetaDataEvent AMetaDataEvent
 
typedef struct AUncalibratedEvent AUncalibratedEvent
 
typedef struct AHeartRateEvent AHeartRateEvent
 
typedef struct ASensorEvent ASensorEvent
 
typedef struct ASensorManager ASensorManager
 
typedef struct ASensorEventQueue ASensorEventQueue
 
typedef struct ASensor ASensor
 
typedef ASensor const * ASensorRef
 
typedef ASensorRef const * ASensorList
 

Enumerations

enum  {
  ASENSOR_TYPE_ACCELEROMETER = 1, ASENSOR_TYPE_MAGNETIC_FIELD = 2, ASENSOR_TYPE_GYROSCOPE = 4, ASENSOR_TYPE_LIGHT = 5,
  ASENSOR_TYPE_PROXIMITY = 8
}
 
enum  {
  ASENSOR_STATUS_NO_CONTACT = -1, ASENSOR_STATUS_UNRELIABLE = 0, ASENSOR_STATUS_ACCURACY_LOW = 1, ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
  ASENSOR_STATUS_ACCURACY_HIGH = 3
}
 
enum  { AREPORTING_MODE_CONTINUOUS = 0, AREPORTING_MODE_ON_CHANGE = 1, AREPORTING_MODE_ONE_SHOT = 2, AREPORTING_MODE_SPECIAL_TRIGGER = 3 }
 

Functions

ASensorManagerASensorManager_getInstance ()
 
int ASensorManager_getSensorList (ASensorManager *manager, ASensorList *list)
 
ASensor const * ASensorManager_getDefaultSensor (ASensorManager *manager, int type)
 
ASensor const * ASensorManager_getDefaultSensorEx (ASensorManager *manager, int type, bool wakeUp)
 
ASensorEventQueueASensorManager_createEventQueue (ASensorManager *manager, ALooper *looper, int ident, ALooper_callbackFunc callback, void *data)
 
int ASensorManager_destroyEventQueue (ASensorManager *manager, ASensorEventQueue *queue)
 
int ASensorEventQueue_enableSensor (ASensorEventQueue *queue, ASensor const *sensor)
 
int ASensorEventQueue_disableSensor (ASensorEventQueue *queue, ASensor const *sensor)
 
int ASensorEventQueue_setEventRate (ASensorEventQueue *queue, ASensor const *sensor, int32_t usec)
 
int ASensorEventQueue_hasEvents (ASensorEventQueue *queue)
 
ssize_t ASensorEventQueue_getEvents (ASensorEventQueue *queue, ASensorEvent *events, size_t count)
 
const char * ASensor_getName (ASensor const *sensor)
 
const char * ASensor_getVendor (ASensor const *sensor)
 
int ASensor_getType (ASensor const *sensor)
 
float ASensor_getResolution (ASensor const *sensor)
 
int ASensor_getMinDelay (ASensor const *sensor)
 
int ASensor_getFifoMaxEventCount (ASensor const *sensor)
 
int ASensor_getFifoReservedEventCount (ASensor const *sensor)
 
const char * ASensor_getStringType (ASensor const *sensor)
 
int ASensor_getReportingMode (ASensor const *sensor)
 
bool ASensor_isWakeUpSensor (ASensor const *sensor)