sensor_get_status_details()

Updated: April 19, 2023

Retrieve the status details from a status event

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_get_status_details(sensor_handle_t handle,
                                         union sigval value,
                                         sensor_devstatus_t *devstatus,
                                         uint16_t *devstatusextra)

Arguments:

handle
The handle that's returned from calling sensor_open().
value
The sigval extracted from the sigevent that was delivered to your application.
devstatus
A pointer to memory for storing the device status details in a sensor_devstatus_t structure.
devstatusextra
A pointer to memory for storing the extra device status details. The contents of this memory depend on the status. For more information, see the individual status descriptions in sensor_devstatus_t.

Library:

libsensor

Description:

Use this function to parse device status details from the sigval returned by a status event. Status events are enabled using sensor_enable_event().

Returns:

SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.