This module provides APIs for handling persistence of the Light CTL Setup Server model related states.
More...
|
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.
|
|
This module provides APIs for handling persistence of the Light CTL Setup Server model related states.
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ 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] | 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. |
◆ light_ctl_mc_temperature32_range_state_set()
Set internal Range state variable.
- Parameters
-
[in] | index | An index to identify an instance of a state variable. |
[in] | p_value | Pointer to a buffer of the value to be 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. |
◆ light_ctl_mc_temperature32_range_state_get()
Get internal Range Status 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. |
◆ 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_handle | Pointer to a buffer to copy the handle of the 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 LIGHT_CTL_SETUP_SERVER_INSTANCES_MAX. |