Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Config handlers for subtree implement a set of handler functions. More...
#include <settings.h>
Data Fields | |
const char * | name |
Name of subtree. | |
int(* | h_get )(const char *key, char *val, int val_len_max) |
Get values handler of settings items identified by keyword names. | |
int(* | h_set )(const char *key, size_t len, settings_read_cb read_cb, void *cb_arg) |
Set value handler of settings items identified by keyword names. | |
int(* | h_commit )(void) |
This handler gets called after settings has been loaded in full. | |
int(* | h_export )(int(*export_func)(const char *name, const void *val, size_t val_len)) |
This gets called to dump all current settings items. | |
sys_snode_t | node |
Linked list node info for module internal usage. | |
Config handlers for subtree implement a set of handler functions.
These are registered using a call to settings_register.
int(* settings_handler::h_commit) (void) |
This handler gets called after settings has been loaded in full.
User might use it to apply setting to the application.
Return: 0 on success, non-zero on failure.
int(* settings_handler::h_export) (int(*export_func)(const char *name, const void *val, size_t val_len)) |
This gets called to dump all current settings items.
This happens when settings_save tries to save the settings. Parameters:
Return: 0 on success, non-zero on failure.
int(* settings_handler::h_get) (const char *key, char *val, int val_len_max) |
Get values handler of settings items identified by keyword names.
Parameters:
Return: length of data read on success, negative on failure.
int(* settings_handler::h_set) (const char *key, size_t len, settings_read_cb read_cb, void *cb_arg) |
Set value handler of settings items identified by keyword names.
Parameters:
Return: 0 on success, non-zero on failure.
const char* settings_handler::name |
Name of subtree.
sys_snode_t settings_handler::node |
Linked list node info for module internal usage.