Tizen Native API
|
Functions | |
int | sensor_get_name (sensor_h sensor, char **name) |
Gets the name of the sensor. | |
int | sensor_get_vendor (sensor_h sensor, char **vendor) |
Gets the vendor of the sensor. | |
int | sensor_get_type (sensor_h sensor, sensor_type_e *type) |
Gets the type of the sensor. | |
int | sensor_get_min_range (sensor_h sensor, float *min_range) |
Gets the minimum range of the sensor. | |
int | sensor_get_max_range (sensor_h sensor, float *max_range) |
Gets the maximum range of the sensor. | |
int | sensor_get_resolution (sensor_h sensor, float *resolution) |
Gets the resolution of the sensor. | |
int | sensor_get_min_interval (sensor_h sensor, int *min_interval) |
Gets the minimun interval of the sensor. | |
int | sensor_get_fifo_count (sensor_h sensor, int *fifo_count) |
Gets the fifo count of the sensor. | |
int | sensor_get_max_batch_count (sensor_h sensor, int *max_batch_count) |
Gets the maximum batch count of the sensor. |
The Hardware Information API provides information about hardware.
#include <sensor.h>
This API provides functions for hardware features, such as name, vendor and other information
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a devrice supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
int sensor_get_fifo_count | ( | sensor_h | sensor, |
int * | fifo_count | ||
) |
Gets the fifo count of the sensor.
[in] | sensor | The sensor handle |
[out] | fifo_count | The fifo count |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_max_batch_count | ( | sensor_h | sensor, |
int * | max_batch_count | ||
) |
Gets the maximum batch count of the sensor.
[in] | sensor | The sensor handle |
[out] | max_batch_count | The maximum batch count |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_max_range | ( | sensor_h | sensor, |
float * | max_range | ||
) |
Gets the maximum range of the sensor.
[in] | sensor | The sensor handle |
[out] | max_range | The maximum range |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_min_interval | ( | sensor_h | sensor, |
int * | min_interval | ||
) |
Gets the minimun interval of the sensor.
[in] | sensor | The sensor handle |
[out] | min_interval | The minimum interval (in milliseconds) |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_min_range | ( | sensor_h | sensor, |
float * | min_range | ||
) |
Gets the minimum range of the sensor.
[in] | sensor | The sensor handle |
[out] | min_range | The minimum range |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_name | ( | sensor_h | sensor, |
char ** | name | ||
) |
Gets the name of the sensor.
[in] | sensor | The sensor handle |
[out] | name | The name of the sensor |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_resolution | ( | sensor_h | sensor, |
float * | resolution | ||
) |
Gets the resolution of the sensor.
[in] | sensor | The sensor handle |
[out] | resolution | The resolution |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_type | ( | sensor_h | sensor, |
sensor_type_e * | type | ||
) |
Gets the type of the sensor.
[in] | sensor | The sensor handle |
[out] | type | The type of the sensor |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |
int sensor_get_vendor | ( | sensor_h | sensor, |
char ** | vendor | ||
) |
Gets the vendor of the sensor.
[in] | sensor | The sensor handle |
[out] | vendor | The vendor of the sensor |
SENSOR_ERROR_NONE | Successful |
SENSOR_ERROR_INVALID_PARAMETER | Invalid parameter |
SENSOR_ERROR_NOT_SUPPORTED | The sensor type is not supported in the current device |
SENSOR_ERROR_IO_ERROR | I/O error |
SENSOR_ERROR_OPERATION_FAILED | Operation failed |