Data Structures | |
struct | light_ctl_client_callbacks_t |
Client callback structure. More... | |
struct | light_ctl_client_settings_t |
User provided settings and callbacks for the model instance. More... | |
union | light_ctl_client_msg_data_t |
Union for holding current message packet. More... | |
struct | light_ctl_client_t |
Macros | |
#define | LIGHT_CTL_CLIENT_MODEL_ID 0x1305 |
Client model ID. | |
Typedefs | |
typedef void(* | light_ctl_lightness_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_status_params_t *p_in) |
Callback type for Light CTL Lightness state related transactions. More... | |
typedef void(* | light_ctl_temperature_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_temperature_status_params_t *p_in) |
Callback type for Light CTL Temperature state related transactions. More... | |
typedef void(* | light_ctl_temperature_range_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_temperature_range_status_params_t *p_in) |
Callback type for Light CTL Temperature Range state related transactions. More... | |
typedef void(* | light_ctl_default_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_default_status_params_t *p_in) |
Callback type for Light CTL Default state related transactions. More... | |
Functions | |
uint32_t | light_ctl_client_init (light_ctl_client_t *p_client, uint8_t element_index) |
Initializes Light CTL client. More... | |
uint32_t | light_ctl_client_set (light_ctl_client_t *p_client, const light_ctl_set_params_t *p_params, const model_transition_t *p_transition) |
Sends a Set message to the server. More... | |
uint32_t | light_ctl_client_set_unack (light_ctl_client_t *p_client, const light_ctl_set_params_t *p_params, const model_transition_t *p_transition, uint8_t repeats) |
Sends a Set Unacknowledged message to the server. More... | |
uint32_t | light_ctl_client_temperature_set (light_ctl_client_t *p_client, const light_ctl_temperature_set_params_t *p_params, const model_transition_t *p_transition) |
Sends a Temperature Set message to the server. More... | |
uint32_t | light_ctl_client_temperature_set_unack (light_ctl_client_t *p_client, const light_ctl_temperature_set_params_t *p_params, const model_transition_t *p_transition, uint8_t repeats) |
Sends a Temperature Set Unacknowledged message to the server. More... | |
uint32_t | light_ctl_client_temperature_range_set (light_ctl_client_t *p_client, const light_ctl_temperature_range_set_params_t *p_params) |
Sends a Temperature Range Set message to the server. More... | |
uint32_t | light_ctl_client_temperature_range_set_unack (light_ctl_client_t *p_client, const light_ctl_temperature_range_set_params_t *p_params, uint8_t repeats) |
Sends a Temperature Range Set Unacknowledged message to the server. More... | |
uint32_t | light_ctl_client_default_set (light_ctl_client_t *p_client, const light_ctl_default_set_params_t *p_params) |
Sends a Default Set message to the server. More... | |
uint32_t | light_ctl_client_default_set_unack (light_ctl_client_t *p_client, const light_ctl_default_set_params_t *p_params, uint8_t repeats) |
Sends a Default Set Unacknowledged message to the server. More... | |
uint32_t | light_ctl_client_get (light_ctl_client_t *p_client) |
Sends a Get message to the server. More... | |
uint32_t | light_ctl_client_temperature_get (light_ctl_client_t *p_client) |
Sends a Temperature Get message to the server. More... | |
uint32_t | light_ctl_client_temperature_range_get (light_ctl_client_t *p_client) |
Sends a Temperature Range Get message to the server. More... | |
uint32_t | light_ctl_client_default_get (light_ctl_client_t *p_client) |
Sends a Default Get message to the server. More... | |
typedef void(* light_ctl_lightness_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_status_params_t *p_in) |
Callback type for Light CTL Lightness state related transactions.
[in] | p_self | Pointer to the model structure |
[in] | p_meta | Access metadata for the received message |
[in] | p_in | Pointer to the input event parameters for the user application |
Definition at line 67 of file light_ctl_client.h.
typedef void(* light_ctl_temperature_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_temperature_status_params_t *p_in) |
Callback type for Light CTL Temperature state related transactions.
[in] | p_self | Pointer to the model structure |
[in] | p_meta | Access metadata for the received message |
[in] | p_in | Pointer to the input event parameters for the user application |
Definition at line 78 of file light_ctl_client.h.
typedef void(* light_ctl_temperature_range_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_temperature_range_status_params_t *p_in) |
Callback type for Light CTL Temperature Range state related transactions.
[in] | p_self | Pointer to the model structure |
[in] | p_meta | Access metadata for the received message |
[in] | p_in | Pointer to the input event parameters for the user application |
Definition at line 89 of file light_ctl_client.h.
typedef void(* light_ctl_default_state_status_cb_t) (const light_ctl_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_ctl_default_status_params_t *p_in) |
Callback type for Light CTL Default state related transactions.
[in] | p_self | Pointer to the model structure |
[in] | p_meta | Access metadata for the received message |
[in] | p_in | Pointer to the input event parameters for the user application |
Definition at line 100 of file light_ctl_client.h.
uint32_t light_ctl_client_init | ( | light_ctl_client_t * | p_client, |
uint8_t | element_index | ||
) |
Initializes Light CTL client.
[in] | p_client | Client model context pointer. |
[in] | element_index | Element index to add the model |
NRF_SUCCESS | The model is initialized successfully. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | ACCESS_MODEL_COUNT number of models already allocated or no more subscription lists available in memory pool (see ACCESS_SUBSCRIPTION_LIST_COUNT). |
NRF_ERROR_FORBIDDEN | Multiple model instances per element are not allowed or changes to device composition are not allowed. Adding a new model after device is provisioned is not allowed. |
NRF_ERROR_NOT_FOUND | Invalid access element index. |
uint32_t light_ctl_client_set | ( | light_ctl_client_t * | p_client, |
const light_ctl_set_params_t * | p_params, | ||
const model_transition_t * | p_transition | ||
) |
Sends a Set message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | p_transition | Optional transition parameters |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_set_unack | ( | light_ctl_client_t * | p_client, |
const light_ctl_set_params_t * | p_params, | ||
const model_transition_t * | p_transition, | ||
uint8_t | repeats | ||
) |
Sends a Set Unacknowledged message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | p_transition | Optional transition parameters |
[in] | repeats | Number of repetitions to use while sending unacknowledged message. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
NRF_ERROR_INVALID_STATE | There's already a segmented packet that is being to sent to this destination. Wait for the transmission to finish before sending new segmented packets. |
uint32_t light_ctl_client_temperature_set | ( | light_ctl_client_t * | p_client, |
const light_ctl_temperature_set_params_t * | p_params, | ||
const model_transition_t * | p_transition | ||
) |
Sends a Temperature Set message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | p_transition | Optional transition parameters |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_temperature_set_unack | ( | light_ctl_client_t * | p_client, |
const light_ctl_temperature_set_params_t * | p_params, | ||
const model_transition_t * | p_transition, | ||
uint8_t | repeats | ||
) |
Sends a Temperature Set Unacknowledged message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | p_transition | Optional transition parameters |
[in] | repeats | Number of repetitions to use while sending unacknowledged message. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
NRF_ERROR_INVALID_STATE | There's already a segmented packet that is being to sent to this destination. Wait for the transmission to finish before sending new segmented packets. |
uint32_t light_ctl_client_temperature_range_set | ( | light_ctl_client_t * | p_client, |
const light_ctl_temperature_range_set_params_t * | p_params | ||
) |
Sends a Temperature Range Set message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_temperature_range_set_unack | ( | light_ctl_client_t * | p_client, |
const light_ctl_temperature_range_set_params_t * | p_params, | ||
uint8_t | repeats | ||
) |
Sends a Temperature Range Set Unacknowledged message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | repeats | Number of repetitions to use while sending unacknowledged message. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
NRF_ERROR_INVALID_STATE | There's already a segmented packet that is being to sent to this destination. Wait for the transmission to finish before sending new segmented packets. |
uint32_t light_ctl_client_default_set | ( | light_ctl_client_t * | p_client, |
const light_ctl_default_set_params_t * | p_params | ||
) |
Sends a Default Set message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_default_set_unack | ( | light_ctl_client_t * | p_client, |
const light_ctl_default_set_params_t * | p_params, | ||
uint8_t | repeats | ||
) |
Sends a Default Set Unacknowledged message to the server.
[in] | p_client | Client model context pointer. |
[in] | p_params | Message parameters. |
[in] | repeats | Number of repetitions to use while sending unacknowledged message. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
NRF_ERROR_INVALID_STATE | There's already a segmented packet that is being to sent to this destination. Wait for the transmission to finish before sending new segmented packets. |
uint32_t light_ctl_client_get | ( | light_ctl_client_t * | p_client | ) |
Sends a Get message to the server.
[in] | p_client | Client model context pointer. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_temperature_get | ( | light_ctl_client_t * | p_client | ) |
Sends a Temperature Get message to the server.
[in] | p_client | Client model context pointer. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_temperature_range_get | ( | light_ctl_client_t * | p_client | ) |
Sends a Temperature Range Get message to the server.
[in] | p_client | Client model context pointer. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
uint32_t light_ctl_client_default_get | ( | light_ctl_client_t * | p_client | ) |
Sends a Default Get message to the server.
[in] | p_client | Client model context pointer. |
NRF_SUCCESS | The message is handed over to the mesh stack for transmission. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_BUSY | The model is busy publishing another message. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect transition parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |