Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
settings.h File Reference
#include <sys/types.h>
#include <sys/util.h>
#include <sys/slist.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  settings_handler
 
struct  settings_handler_static
 
struct  settings_store
 
struct  settings_load_arg
 
struct  settings_store_itf
 

Macros

#define SETTINGS_MAX_DIR_DEPTH   8 /* max depth of settings tree */
 
#define SETTINGS_MAX_NAME_LEN   (8 * SETTINGS_MAX_DIR_DEPTH)
 
#define SETTINGS_MAX_VAL_LEN   256
 
#define SETTINGS_NAME_SEPARATOR   '/'
 
#define SETTINGS_NAME_END   '='
 
#define SETTINGS_EXTRA_LEN   ((SETTINGS_MAX_DIR_DEPTH - 1) + 2)
 
#define SETTINGS_STATIC_HANDLER_DEFINE(_hname, _tree, _get, _set, _commit, _export)
 

Typedefs

typedef ssize_t(* settings_read_cb) (void *cb_arg, void *data, size_t len)
 
typedef int(* settings_load_direct_cb) (const char *key, size_t len, settings_read_cb read_cb, void *cb_arg, void *param)
 

Functions

int settings_subsys_init (void)
 
int settings_register (struct settings_handler *cf)
 
int settings_load (void)
 
int settings_load_subtree (const char *subtree)
 
int settings_load_subtree_direct (const char *subtree, settings_load_direct_cb cb, void *param)
 
int settings_save (void)
 
int settings_save_one (const char *name, const void *value, size_t val_len)
 
int settings_delete (const char *name)
 
int settings_commit (void)
 
int settings_commit_subtree (const char *subtree)
 
void settings_src_register (struct settings_store *cs)
 
void settings_dst_register (struct settings_store *cs)
 
struct settings_handler_staticsettings_parse_and_lookup (const char *name, const char **next)
 
int settings_call_set_handler (const char *name, size_t len, settings_read_cb read_cb, void *read_cb_arg, const struct settings_load_arg *load_arg)
 
int settings_name_steq (const char *name, const char *key, const char **next)
 
int settings_name_next (const char *name, const char **next)
 
int settings_runtime_set (const char *name, const void *data, size_t len)
 
int settings_runtime_get (const char *name, void *data, size_t len)
 
int settings_runtime_commit (const char *name)