diff options
author | Jeonghoon Park <jh1979.park@samsung.com> | 2018-08-02 13:15:10 +0900 |
---|---|---|
committer | Jeonghoon Park <jh1979.park@samsung.com> | 2018-08-02 13:15:10 +0900 |
commit | 0e2a8b73e6e8f8028dc66892c00fc946d77b4978 (patch) | |
tree | e740730a52bf650dada1ee6d56f1e59659d7354c /inc | |
parent | 29c99b275dfbd2f3fa1205db71b17a93752800c8 (diff) | |
download | st-things-co2-meter-0e2a8b73e6e8f8028dc66892c00fc946d77b4978.tar.gz st-things-co2-meter-0e2a8b73e6e8f8028dc66892c00fc946d77b4978.tar.bz2 st-things-co2-meter-0e2a8b73e6e8f8028dc66892c00fc946d77b4978.zip |
add functions to store boolean type sensor data
Diffstat (limited to 'inc')
-rw-r--r-- | inc/sensor-data.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/sensor-data.h b/inc/sensor-data.h index 758b58d..9d68972 100644 --- a/inc/sensor-data.h +++ b/inc/sensor-data.h @@ -17,10 +17,13 @@ #ifndef __SENSOR_DATA_H__ #define __SENSOR_DATA_H__ +#include <stdbool.h> + typedef enum { SENSOR_DATA_TYPE_NONE = 0, SENSOR_DATA_TYPE_INT, SENSOR_DATA_TYPE_UINT, + SENSOR_DATA_TYPE_BOOL, SENSOR_DATA_TYPE_DOUBLE, SENSOR_DATA_TYPE_STR, } sensor_data_type_e; @@ -32,11 +35,13 @@ void sensor_data_free(sensor_data *data); int sensor_data_set_int(sensor_data *data, int value); int sensor_data_set_uint(sensor_data *data, unsigned int value); +int sensor_data_set_bool(sensor_data *data, bool value); int sensor_data_set_double(sensor_data *data, double value); int sensor_data_set_string(sensor_data *data, const char *value, unsigned int size); int sensor_data_get_int(sensor_data *data, int *value); int sensor_data_get_uint(sensor_data *data, unsigned int *value); +int sensor_data_get_bool(sensor_data *data, bool *value); int sensor_data_get_double(sensor_data *data, double *value); int sensor_data_get_string(sensor_data *data, const char **value); |