Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
settings_store_itf Struct Reference

#include <settings.h>

Data Fields

int(* csi_load )(struct settings_store *cs, const struct settings_load_arg *arg)
 
int(* csi_save_start )(struct settings_store *cs)
 
int(* csi_save )(struct settings_store *cs, const char *name, const char *value, size_t val_len)
 
int(* csi_save_end )(struct settings_store *cs)
 

Detailed Description

Backend handler functions. Sources are registered using a call to settings_src_register. Destinations are registered using a call to settings_dst_register.

Field Documentation

◆ csi_load

int(* settings_store_itf::csi_load) (struct settings_store *cs, const struct settings_load_arg *arg)

Loads values from storage limited to subtree defined by subtree.

Parameters:

  • cs - Corresponding backend handler node,
  • arg - Structure that holds additional data for data loading.
Note
Backend is expected not to provide duplicates of the entities. It means that if the backend does not contain any functionality to really delete old keys, it has to filter out old entities and call load callback only on the final entity.

◆ csi_save

int(* settings_store_itf::csi_save) (struct settings_store *cs, const char *name, const char *value, size_t val_len)

Save a single key-value pair to storage.

Parameters:

  • cs - Corresponding backend handler node
  • name - Key in string format
  • value - Binary value
  • val_len - Length of value in bytes.

◆ csi_save_end

int(* settings_store_itf::csi_save_end) (struct settings_store *cs)

Handler called after an export operation.

Parameters:

  • cs - Corresponding backend handler node

◆ csi_save_start

int(* settings_store_itf::csi_save_start) (struct settings_store *cs)

Handler called before an export operation.

Parameters:

  • cs - Corresponding backend handler node

The documentation for this struct was generated from the following file: