Ubuntu Platform API  3.0.0
A library helping with tight integration into the Ubuntu platform
magnetic.h File Reference
#include <ubuntu/visibility.h>
#include <stdint.h>
+ Include dependency graph for magnetic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void UASMagneticEvent
 Opaque type describing a magnetic field reading. More...
 

Functions

UBUNTU_DLL_PUBLIC uint64_t uas_magnetic_event_get_timestamp (UASMagneticEvent *event)
 Query the timestamp of the sensor reading. More...
 
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. More...
 
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. More...
 
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. More...
 

Typedef Documentation

typedef void UASMagneticEvent

Opaque type describing a magnetic field reading.

Definition at line 32 of file magnetic.h.

Function Documentation

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.

Returns
The intensity of the magnetic field in the x-axis in micro-Tesla (uT)
Parameters
[in]eventThe reading to be queried.
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.

Returns
The intensity of the magnetic field in the x-axis in micro-Tesla (uT)
Parameters
[in]eventThe reading to be queried.
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.

Returns
The intensity of the magnetic field in the x-axis in micro-Tesla (uT)
Parameters
[in]eventThe reading to be queried.
UBUNTU_DLL_PUBLIC uint64_t uas_magnetic_event_get_timestamp ( UASMagneticEvent 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.