sensor_info()

Retrieve information for a sensor.

Synopsis:

#include <bps/sensor.h>
 
BPS_API int sensor_info(sensor_type_t type,
                        sensor_info_t **info)

Since:

BlackBerry 10.0.0

Arguments:

type

The type of sensor to get information for (for example, SENSOR_TYPE_ACCELEROMETER, SENSOR_TYPE_MAGNETOMETER, and so on).

info

The sensor_info_t structure to populate with the sensor information.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The sensor_info() function allocates sensor information data. It is the caller's responsibility to call sensor_info_destroy() once they are finished with the sensor information structure that is allocated by this function.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus