sensor_get_streaming_property()

Retrieve one or more streaming properties of the sensor

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_get_streaming_property(sensor_handle_t handle,
                                             args...)

Arguments:

handle
The handle returned by a call to the sensor_open() function.
args...
A series of comma-delimited property-value pairs where each value must be a pointer to a variable of the expected type.

Library:

libsensor

Description:

For the args argument, you can provide one or more property-value pairs using sensor_streamprop_t values as the name of the property and a pointer to the correct type for the value such as an uint64_t or sensor_coord_system_t value. For more information about the correct types to use, see sensor_streamprop_t.

Note:

There is no type-checking performed by the compiler, therefore, you must ensure that the value you provide for each property matches the expected data type. Data type mismatches can result in undefined behavior and may cause your application to crash.

You can specify multiple property-value pairs by delimiting them with a comma as follows:
sensor_get_streaming_property( sensor_handle,
                               SENSOR_STREAMPROP_FORMAT, &format,
                               SENSOR_STREAMPROP_COORD_SYSTEM, &coordSys );

Returns:

SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason why the call failed. This function returns SENSOR_EOPNOTSUPP if the property is not supported for the specified sensor.