Ubuntu Platform API  2.3.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
accelerometer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17  */
18 
19 #ifndef UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_
20 #define UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_
21 
22 #include <ubuntu/visibility.h>
23 
24 #include <stdint.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34  typedef void UASAccelerometerEvent;
35 
42  UBUNTU_DLL_PUBLIC uint64_t
44  UASAccelerometerEvent* event);
45 
54  UASAccelerometerEvent* event,
55  float* value);
56 
65  UASAccelerometerEvent* event,
66  float* value);
67 
76  UASAccelerometerEvent* event,
77  float* value);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* UBUNTU_APPLICATION_SENSORS_ACCELEROMETER_EVENT_H_ */
UBUNTU_DLL_PUBLIC uint64_t uas_accelerometer_event_get_timestamp(UASAccelerometerEvent *event)
Query the timestamp of the sensor reading.
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent *event, float *value)
Query the acceleration in z-axis direction.
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent *event, float *value)
Query the acceleration in y-axis direction.
UBUNTU_DLL_PUBLIC UStatus uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent *event, float *value)
Query the acceleration in x-axis direction.
void UASAccelerometerEvent
Opaque type describing an accelerometer reading.
Definition: accelerometer.h:34
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26