nRF5 SDK for Mesh v4.1.0
Macros | Functions
Persistence module for the Light CTL Setup Server model related states

This module provides APIs for handling persistence of the Light CTL Setup Server model related states. More...

Macros

#define LIGHT_CTL_TEMPERATURE_EID_START   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (1 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX))
 
#define LIGHT_CTL_TEMPERATURE_EID_END   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (2 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX) - 1)
 
#define LIGHT_CTL_DELTA_UV_EID_START   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (2 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX))
 
#define LIGHT_CTL_DELTA_UV_EID_END   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (3 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX) - 1)
 
#define LIGHT_CTL_TEMPERATURE_DEFAULT_EID_START   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (3 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX))
 
#define LIGHT_CTL_DEFAULT_TEMPERATURE_EID_END   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (4 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX) - 1)
 
#define LIGHT_CTL_DELTA_UV_DEFAULT_EID_START   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (4 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX))
 
#define LIGHT_CTL_DELTA_UV_DEFAULT_EID_END   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (5 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX) - 1)
 
#define LIGHT_CTL_TEMPERATURE_RANGE_EID_START   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (5 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX))
 
#define LIGHT_CTL_TEMPERATURE_RANGE_EID_END   (MESH_APP_MODEL_LIGHT_CTL_SERVER_ID_START + (6 * LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX) - 1)
 
#define LIGHT_CTL_TEMPERATURE_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, LIGHT_CTL_TEMPERATURE_EID_START)
 Light CTL Temperature state entry ID.
 
#define LIGHT_CTL_DELTA_UV_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, LIGHT_CTL_DELTA_UV_EID_START)
 Light CTL Delta UV state entry ID.
 
#define LIGHT_CTL_TEMPERATURE_DEFAULT_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, LIGHT_CTL_TEMPERATURE_DEFAULT_EID_START)
 Light CTL Temperature Default state entry ID.
 
#define LIGHT_CTL_DELTA_UV_DEFAULT_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, LIGHT_CTL_DELTA_UV_DEFAULT_EID_START)
 Light CTL Delta UV Default state entry ID.
 
#define LIGHT_CTL_TEMPERATURE_RANGE_EID   MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, LIGHT_CTL_TEMPERATURE_RANGE_EID_START)
 Light CTL Temperature Range state entry ID.
 

Functions

uint32_t light_ctl_mc_temperature32_state_set (uint8_t index, uint32_t value)
 Set internal Light CTL Temperature32 state variable. More...
 
uint32_t light_ctl_mc_temperature32_state_get (uint8_t index, uint32_t *p_value)
 Get internal Light CTL Temperature32 state variable. More...
 
uint32_t light_ctl_mc_delta_uv_state_set (uint8_t index, int16_t value)
 Set internal Light CTL Delta UV state variable. More...
 
uint32_t light_ctl_mc_delta_uv_state_get (uint8_t index, int16_t *p_value)
 Get internal Light CTL Delta UV state variable. More...
 
uint32_t light_ctl_mc_default_temperature32_state_set (uint8_t index, uint32_t value)
 Set internal Light CTL Temperature32 Default state variable. More...
 
uint32_t light_ctl_mc_default_temperature32_state_get (uint8_t index, uint32_t *p_value)
 Get internal Light CTL Temperature32 Default state variable. More...
 
uint32_t light_ctl_mc_default_delta_uv_state_set (uint8_t index, int16_t value)
 Set internal Light CTL Delta UV Default state variable. More...
 
uint32_t light_ctl_mc_default_delta_uv_state_get (uint8_t index, int16_t *p_value)
 Get internal Light CTL Delta UV Default state variable. More...
 
uint32_t light_ctl_mc_temperature32_range_state_set (uint8_t index, light_ctl_temperature_range_set_params_t *p_value)
 Set internal Range state variable. More...
 
uint32_t light_ctl_mc_temperature32_range_state_get (uint8_t index, light_ctl_temperature_range_set_params_t *p_value)
 Get internal Range Status state variable. More...
 
uint32_t light_ctl_mc_open (uint8_t *p_handle)
 Create an instance of the Light CTL Setup Server model states and return the corresponding handle. More...
 
void light_ctl_mc_clear (void)
 Clear all stored data and reset state contexts to default values.
 
void light_ctl_mc_init (void)
 Initialize the Light CTL Setup Server persistent memory.
 

Detailed Description

This module provides APIs for handling persistence of the Light CTL Setup Server model related states.

Function Documentation

◆ light_ctl_mc_temperature32_state_set()

uint32_t light_ctl_mc_temperature32_state_set ( uint8_t  index,
uint32_t  value 
)

Set internal Light CTL Temperature32 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.

◆ light_ctl_mc_temperature32_state_get()

uint32_t light_ctl_mc_temperature32_state_get ( uint8_t  index,
uint32_t *  p_value 
)

Get internal Light CTL Temperature32 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.

◆ light_ctl_mc_delta_uv_state_set()

uint32_t light_ctl_mc_delta_uv_state_set ( uint8_t  index,
int16_t  value 
)

Set internal Light CTL Delta UV 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.

◆ light_ctl_mc_delta_uv_state_get()

uint32_t light_ctl_mc_delta_uv_state_get ( uint8_t  index,
int16_t *  p_value 
)

Get internal Light CTL Delta UV 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.

◆ light_ctl_mc_default_temperature32_state_set()

uint32_t light_ctl_mc_default_temperature32_state_set ( uint8_t  index,
uint32_t  value 
)

Set internal Light CTL Temperature32 Default 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.

◆ light_ctl_mc_default_temperature32_state_get()

uint32_t light_ctl_mc_default_temperature32_state_get ( uint8_t  index,
uint32_t *  p_value 
)

Get internal Light CTL Temperature32 Default 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.

◆ light_ctl_mc_default_delta_uv_state_set()

uint32_t light_ctl_mc_default_delta_uv_state_set ( uint8_t  index,
int16_t  value 
)

Set internal Light CTL Delta UV Default 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.

◆ light_ctl_mc_default_delta_uv_state_get()

uint32_t light_ctl_mc_default_delta_uv_state_get ( uint8_t  index,
int16_t *  p_value 
)

Get internal Light CTL Delta UV Default 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.

◆ light_ctl_mc_temperature32_range_state_set()

uint32_t light_ctl_mc_temperature32_range_state_set ( uint8_t  index,
light_ctl_temperature_range_set_params_t p_value 
)

Set internal Range state variable.

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

◆ light_ctl_mc_temperature32_range_state_get()

uint32_t light_ctl_mc_temperature32_range_state_get ( uint8_t  index,
light_ctl_temperature_range_set_params_t p_value 
)

Get internal Range Status 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.

◆ light_ctl_mc_open()

uint32_t light_ctl_mc_open ( uint8_t *  p_handle)

Create an instance of the Light CTL Setup Server model states and return the corresponding handle.

Parameters
[out]p_handlePointer to a buffer to copy the handle of the 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 LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX.

Documentation feedback | Developer Zone | Subscribe | Updated