Ubuntu Platform API  3.0.0
A library helping with tight integration into the Ubuntu platform
magnetic.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Canonical, Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 3, as published by
6  * the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10  * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * 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 
17 #ifndef UBUNTU_APPLICATION_SENSORS_MAGNETIC_EVENT_H_
18 #define UBUNTU_APPLICATION_SENSORS_MAGNETIC_EVENT_H_
19 
20 #include <ubuntu/visibility.h>
21 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32  typedef void UASMagneticEvent;
33 
40  UBUNTU_DLL_PUBLIC uint64_t
42  UASMagneticEvent* event);
43 
52  UASMagneticEvent* event,
53  float* value);
54 
63  UASMagneticEvent* event,
64  float* value);
65 
74  UASMagneticEvent* event,
75  float* value);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif // UBUNTU_APPLICATION_SENSORS_MAGNETIC_EVENT_H_
UBUNTU_DLL_PUBLIC uint64_t uas_magnetic_event_get_timestamp(UASMagneticEvent *event)
Query the timestamp of the sensor reading.
void UASMagneticEvent
Opaque type describing a magnetic field reading.
Definition: magnetic.h:32
UBUNTU_DLL_PUBLIC UStatus uas_magnetic_event_get_magnetic_field_y(UASMagneticEvent *event, float *value)
Query the intensity of the magnetic field in the x-axis.
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
UBUNTU_DLL_PUBLIC UStatus uas_magnetic_event_get_magnetic_field_x(UASMagneticEvent *event, float *value)
Query the intensity of the magnetic field in the x-axis.
UBUNTU_DLL_PUBLIC UStatus uas_magnetic_event_get_magnetic_field_z(UASMagneticEvent *event, float *value)
Query the intensity of the magnetic field in the x-axis.
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26