nRF5 SDK for Mesh v5.0.0
Macros | Functions
Persistence module for the Generic Default Transition Time Server model

related states. More...

Macros

#define GENERIC_DTT_DTT_EID_START   (MESH_APP_MODEL_GENERIC_DTT_ID_START)
 Defines number of state instances required to store current state.
 
#define GENERIC_DTT_DTT_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, GENERIC_DTT_DTT_EID_START)
 Default Transition Time state entry ID.
 

Functions

uint32_t generic_dtt_mc_dtt_state_set (uint8_t index, uint32_t value)
 Set internal Default Transition Time state variable. More...
 
uint32_t generic_dtt_mc_dtt_state_get (uint8_t index, uint32_t *p_value)
 Get internal Default Transition Time state variable. More...
 
uint32_t generic_dtt_mc_open (uint8_t *p_handle)
 Create an instance of the Generic Default Transition Time Server model state and return the corresponding handle. More...
 
void generic_dtt_mc_clear (void)
 Clear all stored data and reset state contexts to default values.
 
void generic_dtt_mc_init (void)
 Initialize the Generic Default Transition Time Server persistent memory.
 

Detailed Description

related states.

This module provides APIs for handling persistence of the Generic Default Transition Time Server model related state.

Function Documentation

◆ generic_dtt_mc_dtt_state_set()

uint32_t generic_dtt_mc_dtt_state_set ( uint8_t  index,
uint32_t  value 
)

Set internal Default Transition Time state variable.

Parameters
[in]indexAn index to identify an instance of a state variable.
[in]valueValue to set.
Return values
NRF_SUCCESSThe value was successfully set.
NRF_ERROR_NOT_FOUNDThe given index is unknown.
NRF_ERROR_INVALID_DATAThe value is invalid.

◆ generic_dtt_mc_dtt_state_get()

uint32_t generic_dtt_mc_dtt_state_get ( uint8_t  index,
uint32_t *  p_value 
)

Get internal Default Transition Time state variable.

Parameters
[in]indexAn index to identify an instance of a state variable.
[out]p_valuePointer to a buffer to copy the value into. Cannot be NULL.
Return values
NRF_SUCCESSThe entry value was successfully copied into p_value.
NRF_ERROR_NULLA parameter is NULL.
NRF_ERROR_NOT_FOUNDThe given index is unknown.
NRF_ERROR_INVALID_STATEThe given index is known, but has no data associated with it.

◆ generic_dtt_mc_open()

uint32_t generic_dtt_mc_open ( uint8_t *  p_handle)

Create an instance of the Generic Default Transition Time Server model state and return the corresponding handle.

Parameters
[out]p_handlePointer to a buffer to copy the handle into to access internal state instance.
Return values
NRF_SUCCESSThe new instance is successfully created.
NRF_ERROR_NULLA parameter is NULL.
NRF_ERROR_RESOURCESNo more instances can be created. In that case, increase value of GENERIC_DTT_SERVER_INSTANCES_MAX.

Documentation feedback | Developer Zone | Subscribe | Updated