sensor_interim_data_publish()

Publish a filled buffer of interim data

Synopsis:

#include <sensor/sensor_interim_data.h>
sensor_error_t sensor_interim_data_publish(sensor_handle_t handle,
                                           bool update_header,
                                           sensor_buffer_t *buffer)

Arguments:

handle
The handle that's returned from calling sensor_interim_data_open().
update_header
Set to true to indicate that some of the fields in the sensor_buffer_t structure have been updated and need to be published in addition to the buffer payload. Note that the timestamp is always updated.
buffer
Details of the buffer to publish.

Library:

libsensor

Description:

After you allocate a buffer with a call to sensor_interim_data_alloc() and fill the buffer with the appropriate data, use this function to publish the interim data and make the data available to subscribers of the Sensor Framework.

Returns:

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