Ubuntu Platform API  2.1.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
accelerometer.h File Reference
#include <ubuntu/visibility.h>
#include <stdint.h>
+ Include dependency graph for accelerometer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void UASAccelerometerEvent
 Opaque type describing an accelerometer reading. More...
 

Functions

UBUNTU_DLL_PUBLIC uint64_t uas_accelerometer_event_get_timestamp (UASAccelerometerEvent *event)
 Query the timestamp of the sensor reading. More...
 
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_x (UASAccelerometerEvent *event, float *value)
 Query the acceleration in x-axis direction. More...
 
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_y (UASAccelerometerEvent *event, float *value)
 Query the acceleration in y-axis direction. More...
 
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_z (UASAccelerometerEvent *event, float *value)
 Query the acceleration in z-axis direction. More...
 

Typedef Documentation

typedef void UASAccelerometerEvent

Opaque type describing an accelerometer reading.

Definition at line 34 of file accelerometer.h.

Function Documentation

UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_x ( UASAccelerometerEvent event,
float *  value 
)

Query the acceleration in x-axis direction.

Returns
The acceleration in x-axis direction.
Parameters
[in]eventThe reading to be queried.
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_y ( UASAccelerometerEvent event,
float *  value 
)

Query the acceleration in y-axis direction.

Returns
The acceleration in y-axis direction.
Parameters
[in]eventThe reading to be queried.
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_z ( UASAccelerometerEvent event,
float *  value 
)

Query the acceleration in z-axis direction.

Returns
The acceleration in z-axis direction.
Parameters
[in]eventThe reading to be queried.
UBUNTU_DLL_PUBLIC uint64_t uas_accelerometer_event_get_timestamp ( UASAccelerometerEvent event)

Query the timestamp of the sensor reading.

Returns
The timestamp of the sensor reading in [µs], timebase: monotonic clock.
Parameters
[in]eventThe reading to be queried.