Contains common defines for model config file (MESH_OPT_MODEL_FILE_ID) used by some of the Mesh models. More...
Macros | |
#define | MESH_APP_MODEL_CONFIG_ID (0x0001) |
Model common record entry ID. | |
#define | MESH_APP_MODEL_LIGHT_LIGHTNESS_ID_START (0x1000) |
Start of Light Lightness Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_LIGHT_LIGHTNESS_ID_END (0x10FF) |
End of Light Lightness Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_LIGHT_LC_SERVER_ID_START (0x1100) |
Start of LC Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_LIGHT_LC_SERVER_ID_END (0x20FF) |
End of Light LC Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START (0x2100) |
Start of Light CTL Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_END (0x22FF) |
End of Light CTL Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_SCENE_SERVER_ID_START (0x2300) |
Start of Scene Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_SCENE_SERVER_ID_END (0x23FF) |
End of Scene Setup Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_ONOFF_ID_START (0x2400) |
Start of Generic OnOff Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_ONOFF_ID_END (0x24FF) |
End of Generic OnOff Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_LEVEL_ID_START (0x2500) |
Start of Generic Level Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_LEVEL_ID_END (0x25FF) |
End of Generic Level Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_DTT_ID_START (0x2600) |
Start of Generic Default Transition Time Server record entry IDs. | |
#define | MESH_APP_MODEL_GENERIC_DTT_ID_END (0x26FF) |
End of Generic Default Transition Time Server record entry IDs. | |
Functions | |
void | model_config_file_init (void) |
Initialize persistent memory of all models used. More... | |
uint32_t | model_config_file_config_apply (void) |
Apply data loaded from the mesh configuration system into persistent memory structures. More... | |
void | model_config_file_clear (void) |
Clears the persistent model states and erases the persistent copy stored in model config file. | |
Contains common defines for model config file (MESH_OPT_MODEL_FILE_ID) used by some of the Mesh models.
Use of this module reserves one flash page for storing model state data. This module is not needed if certain model does not intend to use model config file for its state data storage.
Each new model (other than the ones already present in this SDK) that requires state storage can use this config file to store state data. For this purpose *_mc.c
module have to be developed on the same lines as that of the existing modules available for various models in this SDK.
void model_config_file_init | ( | void | ) |
Initialize persistent memory of all models used.
uint32_t model_config_file_config_apply | ( | void | ) |
Apply data loaded from the mesh configuration system into persistent memory structures.
NRF_SUCCESS | Presistent memory data applied successfully. Default values are stored if no data existed. |
NRF_ERROR_INVALID_DATA | Data stored in the persistent memory was corrupted, old data was cleared and restored with default values. Stack config is cleared. |