sensor_format_data_t

Format for sensor data with payload consisting of format-specific structures

Synopsis:

#include <sensor/sensor_api.h>
typedef struct sensor_format_data_t {
    uint64_t data_size;
    uint32_t num_entries;
    uint32_t entry_size;
    uint32_t flags;
} sensor_format_data_t;

Data:

uint64_t data_size
The size of the data payload (bytes).
uint32_t num_entries
The number of data entries that can be found in the payload.
uint32_t entry_size
The size of each data entry (bytes).

To access the next entry, add this amount to your payload pointer that points to the current data entry.

uint32_t flags
Flags to indicate which fields in the format-specific structure are valid for all data entries.

The meaning of these flags is format-specific. For backwards compatibility, use these flags to confirm the presence of a given field in the structure before accessing it.

Library:

libsensor

Description:

This format is used for sensor data where the payload consists of one or more data entries where each entry is defined by a format-specific structure.