121 const char* setting_name,
129 const char* setting_name,
138 const char* setting_name,
145 const char* setting_name,
#define CONFIG_GOLIOTH_MAX_NUM_SETTINGS
void * golioth_client_t
Opaque handle to the Golioth client.
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.
golioth_settings_status_t(* golioth_string_setting_cb)(const char *new_value, size_t new_value_len, void *arg)
golioth_settings_status_t(* golioth_float_setting_cb)(float new_value, void *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.
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_settings_value_type_t
Different types of setting values.
golioth_settings_status_t
Enumeration of Settings status codes.
golioth_settings_status_t(* golioth_int_setting_cb)(int32_t new_value, void *arg)
golioth_settings_status_t(* golioth_bool_setting_cb)(bool new_value, void *arg)
golioth_status_t golioth_settings_register_int(golioth_client_t client, const char *setting_name, golioth_int_setting_cb callback, void *callback_arg)
@ GOLIOTH_SETTINGS_VALUE_TYPE_STRING
@ GOLIOTH_SETTINGS_VALUE_TYPE_UNKNOWN
@ GOLIOTH_SETTINGS_VALUE_TYPE_INT
@ GOLIOTH_SETTINGS_VALUE_TYPE_BOOL
@ GOLIOTH_SETTINGS_VALUE_TYPE_FLOAT
@ GOLIOTH_SETTINGS_GENERAL_ERROR
Other general error (e.g. I/O error)
@ GOLIOTH_SETTINGS_VALUE_OUTSIDE_RANGE
The setting value is outside of allowed range.
@ GOLIOTH_SETTINGS_VALUE_STRING_TOO_LONG
The setting value string is too long, exceeds max length.
@ GOLIOTH_SETTINGS_KEY_NOT_VALID
The setting key is too long, ill-formatted.
@ GOLIOTH_SETTINGS_KEY_NOT_RECOGNIZED
The setting key is not recognized, this setting is unknown.
@ GOLIOTH_SETTINGS_SUCCESS
Setting applied successfully to the device, stored in NVS.
@ GOLIOTH_SETTINGS_VALUE_FORMAT_NOT_VALID
The setting value is improperly formatted.
Private struct for storing a single setting.
golioth_settings_value_type_t type
golioth_int_setting_cb int_cb
golioth_string_setting_cb string_cb
golioth_bool_setting_cb bool_cb
golioth_float_setting_cb float_cb