nRF5 SDK for Mesh v4.1.0
Access layer configuration

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_FOUNDAccess layer metadata was not found.
NRF_ERROR_INVALID_DATAData stored in the persistent memory was corrupted.
NRF_SUCCESSData 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
ttlThe new value to use as the default TTL for message being sent from this node.
Return values
NRF_SUCCESSSuccessfully set default TTL.
NRF_ERROR_INVALID_PARAMInvalid 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_indexIndex of the element to search.
[in]model_idModel ID.
[out]p_handlePointer to write the corresponding handle.
Return values
NRF_SUCCESSSuccessfully got the model ID.
NRF_ERROR_NULLNULL pointer given to function.
NRF_ERROR_NOT_FOUNDInvalid element index.
NRF_ERROR_NOT_FOUNDCouldn't find a model handle for the given ID.