Golioth Firmware SDK
|
#include "golioth_status.h"
#include "golioth_client.h"
#include "golioth_config.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | golioth_setting_t |
Private struct for storing a single setting. More... | |
struct | golioth_settings_t |
Typedefs | |
typedef golioth_settings_status_t(* | golioth_int_setting_cb) (int32_t new_value, void *arg) |
typedef golioth_settings_status_t(* | golioth_bool_setting_cb) (bool new_value, void *arg) |
typedef golioth_settings_status_t(* | golioth_float_setting_cb) (float new_value, void *arg) |
typedef golioth_settings_status_t(* | golioth_string_setting_cb) (const char *new_value, size_t new_value_len, void *arg) |
Enumerations | |
enum | golioth_settings_status_t { GOLIOTH_SETTINGS_SUCCESS = 0 , GOLIOTH_SETTINGS_KEY_NOT_RECOGNIZED = 1 , GOLIOTH_SETTINGS_KEY_NOT_VALID = 2 , GOLIOTH_SETTINGS_VALUE_FORMAT_NOT_VALID = 3 , GOLIOTH_SETTINGS_VALUE_OUTSIDE_RANGE = 4 , GOLIOTH_SETTINGS_VALUE_STRING_TOO_LONG = 5 , GOLIOTH_SETTINGS_GENERAL_ERROR = 6 } |
Enumeration of Settings status codes. More... | |
enum | golioth_settings_value_type_t { GOLIOTH_SETTINGS_VALUE_TYPE_UNKNOWN , GOLIOTH_SETTINGS_VALUE_TYPE_INT , GOLIOTH_SETTINGS_VALUE_TYPE_BOOL , GOLIOTH_SETTINGS_VALUE_TYPE_FLOAT , GOLIOTH_SETTINGS_VALUE_TYPE_STRING } |
Different types of setting values. More... | |
Functions | |
golioth_status_t | golioth_settings_register_int (golioth_client_t client, const char *setting_name, golioth_int_setting_cb callback, void *callback_arg) |
golioth_status_t | golioth_settings_register_int_with_range (golioth_client_t client, const char *setting_name, int32_t min_val, int32_t max_val, golioth_int_setting_cb callback, void *callback_arg) |
golioth_status_t | golioth_settings_register_bool (golioth_client_t client, const char *setting_name, golioth_bool_setting_cb callback, void *callback_arg) |
Same as golioth_settings_register_int, but for type bool. More... | |
golioth_status_t | golioth_settings_register_float (golioth_client_t client, const char *setting_name, golioth_float_setting_cb callback, void *callback_arg) |
Same as golioth_settings_register_int, but for type float. More... | |