Common interface for operating on all mesh states. More...
Modules | |
Mesh config entry | |
API for managing mesh configuration entries. | |
Mesh config listener interface | |
Change-listener interface for mesh config. | |
Enumerations | |
enum | mesh_config_load_failure_t { MESH_CONFIG_LOAD_FAILURE_INVALID_LENGTH, MESH_CONFIG_LOAD_FAILURE_INVALID_DATA, MESH_CONFIG_LOAD_FAILURE_INVALID_ID } |
Functions | |
void | mesh_config_init (void) |
Initialize the configuration module. | |
void | mesh_config_load (void) |
Load all configuration data from persistent storage. More... | |
void | mesh_config_clear (void) |
Clear all configuration data. More... | |
void | mesh_config_power_down (void) |
Store all power-down state. More... | |
bool | mesh_config_is_busy (void) |
Check whether the configuration is waiting for an operation to finish. More... | |
uint32_t | mesh_config_power_down_time_get (void) |
Calculate the longest time required to store all power down state. More... | |
Common interface for operating on all mesh states.
For more information about mesh config, see the Mesh configuration library document.
Definition at line 53 of file mesh_config.h.
void mesh_config_load | ( | void | ) |
Load all configuration data from persistent storage.
If any of the loaded entries have issues, the mesh event handler will be called with a NRF_MESH_EVT_CONFIG_LOAD_FAILURE
event. Loading will continue even if there's a load-failure, but the failing entry will be ignored. This should never happen unless the compile-time configuration is changed.
void mesh_config_clear | ( | void | ) |
Clear all configuration data.
void mesh_config_power_down | ( | void | ) |
Store all power-down state.
bool mesh_config_is_busy | ( | void | ) |
Check whether the configuration is waiting for an operation to finish.
uint32_t mesh_config_power_down_time_get | ( | void | ) |
Calculate the longest time required to store all power down state.
To ensure that all power-down state can be safely stored in persisent storage before running out of power, the user must call mesh_config_power_down some time before power loss. This function can be used to gather requirements for a brown-out detection module that can notify the application of an impending power loss.
The return value of this function will always be the same for a given configuration, as it always assumes a worst case scenario. It is strongly recommended to rerun this function for every recompilation, to ensure that there's always enough time left.