proximity.h File Reference
`#include <ubuntu/visibility.h>`
`#include <stdint.h>`
Include dependency graph for proximity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Typedefs

typedef UbuntuApplicationSensorsProximityDistance | UASProximityDistance
typedef void | UASProximityEvent
| Opaque type describing an accelerometer reading. More...

## Enumerations

enum | UbuntuApplicationSensorsProximityDistance { U_PROXIMITY_NEAR = 1, U_PROXIMITY_FAR = 2 }
| Useful constants when inspecting readings from the proximity sensor. More...

## Functions

UBUNTU_DLL_PUBLIC uint64_t | uas_proximity_event_get_timestamp (UASProximityEvent *event)
| Query the timestamp of the sensor reading. More...
UBUNTU_DLL_PUBLIC UASProximityDistance | uas_proximity_event_get_distance (UASProximityEvent *event)
| Query the discrete distance as reported by the proximity sensor. More...

## Typedef Documentation

typedef UbuntuApplicationSensorsProximityDistance UASProximityDistance

Definition at line 39 of file proximity.h.

typedef void UASProximityEvent

Opaque type describing an accelerometer reading.

Definition at line 45 of file proximity.h.

## Enumeration Type Documentation

enum UbuntuApplicationSensorsProximityDistance

Useful constants when inspecting readings from the proximity sensor.

Enumerator
U_PROXIMITY_NEAR | The reading indicates that something is near the sensor/device.
U_PROXIMITY_FAR | The reading indicates that something is far away from the sensor/device.

Definition at line 34 of file proximity.h.

## Function Documentation

UBUNTU_DLL_PUBLIC UASProximityDistance uas_proximity_event_get_distance | ( | UASProximityEvent * | event | ) |

Query the discrete distance as reported by the proximity sensor.

Returns
  The discrete distance as reported by the proximity sensor.

Parameters

  [in] | event | The reading to be queried.

UBUNTU_DLL_PUBLIC uint64_t uas_proximity_event_get_timestamp | ( | UASProximityEvent * | event | ) |

Query the timestamp of the sensor reading.

Returns
  The timestamp of the sensor reading in [µs], timebase: monotonic clock.

Parameters

  [in] | event | The reading to be queried.