Definitions in sensor_api.h

Updated: May 06, 2022

Preprocessor macro definitions for the sensor_api.h header file in the libsensor library

Definitions:

#include <sensor/sensor_api.h>
#define SENSOR_HANDLE_INVALID (NULL)

A safe-initialization value for a sensor_handle_t.

Use this value to check that initialization correctly occurred and that a call to sensor_open() was successful. You should also assign this value to a sensor handle variable after you close the handle.

#define SENSOR_MAX_FORMAT_INFO_SIZE (256)

The maximum size of the format-specific information, in bytes.

#define SENSOR_DATA_EXTENDED_SIZE (60)

The maximum size of the user-extended extension for user data, in bytes.

#define SENSOR_MAX_FILENAME_LEN (256)

The maximum length of the filenames used for recording.

#define SENSOR_MAX_ROLL_SUFFIX_LEN (64)

The maximum length of the suffix to add to roll filenames.

#define SENSOR_EVENTKEY_INVALID (-1)

A safe-initialization value for a sensor_eventkey_t.

Use this value to check that initialization correctly occurred.

#define SENSOR_NAME_LEN 64

The maximum string length for the name associated with a given sensor unit.

Library:

libsensor