nRF5 SDK for Mesh v3.2.0  08c60f6
Access layer configuration

Modules

 Model configuration
 Configuration of model parameters.
 
 Element configuration
 Configuration of element parameters.
 

Functions

bool access_flash_config_load (void)
 Recover access layer configuration from flash. More...
 
void access_flash_config_store (void)
 Store the current state of access layer - information related to element and model configuration - in non volatile memory. 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...
 
const void * access_flash_area_get (void)
 Gets a pointer to the flash area used by access. 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_flash_config_load()

bool access_flash_config_load ( void  )

Recover access layer configuration from flash.

Warning
All models have to be added before this function is called. Calling this function will prevent any further changes to composition of the device (Freezing of model configurations and device composition data.)
Returns
True If a valid state was successfully restored from flash, or if this function is called for the first time when no configuration exist in the flash.

◆ access_flash_config_store()

void access_flash_config_store ( void  )

Store the current state of access layer - information related to element and model configuration - in non volatile memory.

Warning
Calls to this API will not result in any storage of information if the access configuration is not yet frozen. See access_flash_config_load() API.

◆ 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.

◆ access_flash_area_get()

const void* access_flash_area_get ( void  )

Gets a pointer to the flash area used by access.

Returns
A pointer to access flash area.