sensor_get_supported_interim_data()

Updated: April 19, 2023

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 instances to return in the array.
num_supported
A pointer to memory for storing the number of supported interim data instances that are present.
data_info
A pointer to the first element in a sensor_interim_data_info_t array. The array is updated with information on the interim data instances that are present.

Library:

libsensor

Description:

On success, this function writes an array of information on each supported interim data instance into data_info.

The data_info argument must point to an array which has at least num_asked elements allocated. To find the required size for this array, you can invoke this function with num_asked set to zero or data_info set to NULL. The required array size is then written into the memory pointed to by num_supported. You can then allocate an array of this size and invoke this function again with num_asked set to the value previously written into num_supported and data_info pointing to the allocated array.

Returns:

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