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] index An index to identify an instance of a state variable. [in] value Value to set.
- Return values
-
NRF_SUCCESS The value was successfully set. NRF_ERROR_NOT_FOUND The given index is unknown. NRF_ERROR_INVALID_DATA The 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] index An index to identify an instance of a state variable. [out] p_value Pointer to a buffer to copy the value into. Cannot be NULL.
- Return values
-
NRF_SUCCESS The entry value was successfully copied into p_value.NRF_ERROR_NULL A parameter is NULL. NRF_ERROR_NOT_FOUND The given index is unknown. NRF_ERROR_INVALID_STATE The 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_handle Pointer to a buffer to copy the handle into to access internal state instance.
- Return values
-
NRF_SUCCESS The new instance is successfully created. NRF_ERROR_NULL A parameter is NULL. NRF_ERROR_RESOURCES No more instances can be created. In that case, increase value of GENERIC_DTT_SERVER_INSTANCES_MAX.