sensor_start_recording()

Start the recording of sensor data to a file

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_start_recording(sensor_handle_t handle,
                                      const char *path,
                                      struct timespec *time)

Arguments:

handle
The handle that's returned from calling sensor_open().
path
The path of the file to record to.
time
Set to NULL to start recording immediately or use an absolute time (with CLOCK_MONOTONIC as the reference) at when to start recording.

Library:

libsensor

Returns:

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