Runtime configuration of the access layer, controlled by the Configuration Server model. More...
Modules | |
| Model configuration | |
| Configuration of model parameters. | |
| Element configuration | |
| Configuration of element parameters. | |
Functions | |
| uint32_t | access_load_config_apply (void) |
| Applies data loaded from the mesh configuration system on the access layer structures. More... | |
| uint32_t | access_default_ttl_set (uint8_t ttl) |
| Sets the default TTL for the node. More... | |
| uint8_t | access_default_ttl_get (void) |
| Gets the default TTL for the node. More... | |
| uint32_t | access_handle_get (uint16_t element_index, access_model_id_t model_id, access_model_handle_t *p_handle) |
| Gets the access handle for the given model instance based on element index and model ID. More... | |
Detailed Description
Runtime configuration of the access layer, controlled by the Configuration Server model.
- Warning
- This API is intended to be used by the Configuration Server model to configure a node and is considered internal.
Function Documentation
◆ access_load_config_apply()
| uint32_t access_load_config_apply | ( | void | ) |
Applies data loaded from the mesh configuration system on the access layer structures.
- Note
- Actual metadata is restored automatically if it was not found or if read out data is not equal configuration parameters.
- The function also stores data which was provided within application-specific model initialization stage mesh_stack_models_init_cb_t
- See also
- mesh_stack_init_params_t
- Return values
-
NRF_ERROR_NOT_FOUND Access layer metadata was not found. NRF_ERROR_INVALID_DATA Data stored in the persistent memory was corrupted. NRF_SUCCESS Data was restored and applied successfully.
◆ access_default_ttl_set()
| uint32_t access_default_ttl_set | ( | uint8_t | ttl | ) |
Sets the default TTL for the node.
- Parameters
-
ttl The new value to use as the default TTL for message being sent from this node.
- Return values
-
NRF_SUCCESS Successfully set default TTL. NRF_ERROR_INVALID_PARAM Invalid default TTL.
◆ access_default_ttl_get()
| uint8_t access_default_ttl_get | ( | void | ) |
Gets the default TTL for the node.
- Returns
- Returns the default TTL value used to send messages from this node.
◆ access_handle_get()
| uint32_t access_handle_get | ( | uint16_t | element_index, |
| access_model_id_t | model_id, | ||
| access_model_handle_t * | p_handle | ||
| ) |
Gets the access handle for the given model instance based on element index and model ID.
- Parameters
-
[in] element_index Index of the element to search. [in] model_id Model ID. [out] p_handle Pointer to write the corresponding handle.
- Return values
-
NRF_SUCCESS Successfully got the model ID. NRF_ERROR_NULL NULL pointer given to function. NRF_ERROR_NOT_FOUND Invalid element index. NRF_ERROR_NOT_FOUND Couldn't find a model handle for the given ID.