Updated: October 28, 2024 |
Retrieve one or more streaming properties of the sensor
#include <sensor/sensor_api.h>
#define sensor_get_streaming_property(handle, args...)
This function retrieves one or more streaming properties of the given sensor. For the args argument, you can provide one or more property-value pairs using a sensor_streamprop_t value as the name of the property and a pointer to the correct type for the value, such as a uint64_t or sensor_coord_system_t value.
The compiler performs no type-checking. Therefore, the value you provide for each property must match the expected data type. Mismatches can cause undefined behavior and application crashes.
sensor_get_streaming_property( sensor_handle, SENSOR_STREAMPROP_FORMAT, &format, SENSOR_STREAMPROP_COORD_SYSTEM, &coordSys );
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.