Updated: October 28, 2024 |
Content of a data buffer
#include <sensor/sensor_api.h>
typedef struct sensor_buffer_t { sensor_format_t format; uint64_t size; uint8_t* data; uint64_t metadata_size; void* metadata; int64_t timestamp; sensor_format_info_t info; } sensor_buffer_t;
It is used to distinguish between members of the sensor_format_info_t union.
This member doesn't describe the size of the data pointed to by data. The size is described in the info member.
The timestamp is referenced to the clock specified in the sensor configuration file (which defaults to system monotonic clock, CLOCK_MONOTONIC) and is in microseconds.
Its actual content depends on the value of format.