sensor_get_supported_interim_data()

Retrieve an enumerated list of interim data available on the device

Synopsis:

#include <sensor/sensor_interim_data.h>
sensor_error_t sensor_get_supported_interim_data(uint32_t num_asked,
                                                 uint32_t *num_supported,
                                                 sensor_interim_data_info_t *data_info)

Arguments:

num_asked
The maximum number of interim data to return in the array.
num_supported
On success, this is set to the number of supported interim data that are present.
data_info
A pointer to the first element in a sensor_interim_data_info_t array. The array is updated with the information on the interim data that are present.

Library:

libsensor

Description:

An array of information on each supported interim data is returned on success in data_info.

Ensure that the data_info argument points to an array which has at least num_asked elements allocated. To determine an appropriate size for this array, you can invoke this function in presizing mode by setting the num_asked argument to 0 or the data_info argument to NULL. When the function is invoked in this presizing mode, the maximum array size required is returned in the num_supported argument. You can then allocate an array of the appropriate size and invoke the function again with the num_asked argument set to the value returned previously in the num_supported argument.

Returns:

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