Data Structures | |
| struct | light_lc_client_callbacks_t |
| struct | light_lc_client_settings_t |
| User provided settings and callbacks for the model instance. More... | |
| union | light_lc_client_msg_data_t |
| struct | light_lc_client_t |
Macros | |
| #define | LIGHT_LC_CLIENT_MODEL_ID 0x1311 |
| Client model ID. | |
Typedefs | |
| typedef void(* | light_lc_mode_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_mode_status_params_t *p_in) |
| Callback type for mode state related transactions. More... | |
| typedef void(* | light_lc_occupancy_mode_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_occupancy_mode_status_params_t *p_in) |
| Callback type for occupancy mode state related transactions. More... | |
| typedef void(* | light_lc_light_onoff_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_light_onoff_status_params_t *p_in) |
| Callback type for light onoff state related transactions. More... | |
| typedef void(* | light_lc_property_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_property_status_params_t *p_in) |
| Callback type for property state related transactions. More... | |
Functions | |
| uint32_t | light_lc_client_init (light_lc_client_t *p_client, uint8_t element_index) |
| Initializes Light LC client. More... | |
| uint32_t | light_lc_client_mode_set (light_lc_client_t *p_client, const light_lc_mode_set_params_t *p_params) |
| Sends a Mode Set message to the server. More... | |
| uint32_t | light_lc_client_mode_set_unack (light_lc_client_t *p_client, const light_lc_mode_set_params_t *p_params, uint8_t repeats) |
| Sends a Mode Set Unacknowledged message to the server. More... | |
| uint32_t | light_lc_client_occupancy_mode_set (light_lc_client_t *p_client, const light_lc_occupancy_mode_set_params_t *p_params) |
| Sends a Occupancy Mode Set message to the server. More... | |
| uint32_t | light_lc_client_occupancy_mode_set_unack (light_lc_client_t *p_client, const light_lc_occupancy_mode_set_params_t *p_params, uint8_t repeats) |
| Sends a Occupancy Mode Set Unacknowledged message to the server. More... | |
| uint32_t | light_lc_client_light_onoff_set (light_lc_client_t *p_client, const light_lc_light_onoff_set_params_t *p_params, const model_transition_t *p_transition) |
| Sends a Light OnOff Set message to the server. More... | |
| uint32_t | light_lc_client_light_onoff_set_unack (light_lc_client_t *p_client, const light_lc_light_onoff_set_params_t *p_params, const model_transition_t *p_transition, uint8_t repeats) |
| Sends a Light OnOff Set Unacknowledged message to the server. More... | |
| uint32_t | light_lc_client_property_set (light_lc_client_t *p_client, const light_lc_property_set_params_t *p_params) |
| Sends a Property Set message to the server. More... | |
| uint32_t | light_lc_client_property_set_unack (light_lc_client_t *p_client, const light_lc_property_set_params_t *p_params, uint8_t repeats) |
| Sends a Property Set Unacknowledged message to the server. More... | |
| uint32_t | light_lc_client_mode_get (light_lc_client_t *p_client) |
| Sends a Mode Get message to the server. More... | |
| uint32_t | light_lc_client_occupancy_mode_get (light_lc_client_t *p_client) |
| Sends a Occupancy Mode Get message to the server. More... | |
| uint32_t | light_lc_client_light_onoff_get (light_lc_client_t *p_client) |
| Sends a Light OnOff Get message to the server. More... | |
| uint32_t | light_lc_client_property_get (light_lc_client_t *p_client, const light_lc_property_get_params_t *p_params) |
| Sends a Property Get message to the server. More... | |
Detailed Description
Typedef Documentation
◆ light_lc_mode_state_status_cb_t
| typedef void(* light_lc_mode_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_mode_status_params_t *p_in) |
Callback type for mode state related transactions.
- Parameters
-
[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_lc_client.h.
◆ light_lc_occupancy_mode_state_status_cb_t
| typedef void(* light_lc_occupancy_mode_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_occupancy_mode_status_params_t *p_in) |
Callback type for occupancy mode state related transactions.
- Parameters
-
[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_lc_client.h.
◆ light_lc_light_onoff_state_status_cb_t
| typedef void(* light_lc_light_onoff_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_light_onoff_status_params_t *p_in) |
Callback type for light onoff state related transactions.
- Parameters
-
[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_lc_client.h.
◆ light_lc_property_state_status_cb_t
| typedef void(* light_lc_property_state_status_cb_t) (const light_lc_client_t *p_self, const access_message_rx_meta_t *p_meta, const light_lc_property_status_params_t *p_in) |
Callback type for property state related transactions.
- Parameters
-
[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_lc_client.h.
Function Documentation
◆ light_lc_client_init()
| uint32_t light_lc_client_init | ( | light_lc_client_t * | p_client, |
| uint8_t | element_index | ||
| ) |
Initializes Light LC client.
- Note
- This function should only be called once.
- The client handles the model allocation and adding.
- Parameters
-
[in] p_client Client model context pointer. [in] element_index Element index to add the model
- Return values
-
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.
◆ light_lc_client_mode_set()
| uint32_t light_lc_client_mode_set | ( | light_lc_client_t * | p_client, |
| const light_lc_mode_set_params_t * | p_params | ||
| ) |
Sends a Mode Set message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters.
- Return values
-
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.
◆ light_lc_client_mode_set_unack()
| uint32_t light_lc_client_mode_set_unack | ( | light_lc_client_t * | p_client, |
| const light_lc_mode_set_params_t * | p_params, | ||
| uint8_t | repeats | ||
| ) |
Sends a Mode Set Unacknowledged message to the server.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters. [in] repeats Number of repetitions to use while sending unacknowledged message.
- Return values
-
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.
◆ light_lc_client_occupancy_mode_set()
| uint32_t light_lc_client_occupancy_mode_set | ( | light_lc_client_t * | p_client, |
| const light_lc_occupancy_mode_set_params_t * | p_params | ||
| ) |
Sends a Occupancy Mode Set message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters.
- Return values
-
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.
◆ light_lc_client_occupancy_mode_set_unack()
| uint32_t light_lc_client_occupancy_mode_set_unack | ( | light_lc_client_t * | p_client, |
| const light_lc_occupancy_mode_set_params_t * | p_params, | ||
| uint8_t | repeats | ||
| ) |
Sends a Occupancy Mode Set Unacknowledged message to the server.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters. [in] repeats Number of repetitions to use while sending unacknowledged message.
- Return values
-
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.
◆ light_lc_client_light_onoff_set()
| uint32_t light_lc_client_light_onoff_set | ( | light_lc_client_t * | p_client, |
| const light_lc_light_onoff_set_params_t * | p_params, | ||
| const model_transition_t * | p_transition | ||
| ) |
Sends a Light OnOff Set message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters. [in] p_transition Optional transition parameters
- Return values
-
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.
◆ light_lc_client_light_onoff_set_unack()
| uint32_t light_lc_client_light_onoff_set_unack | ( | light_lc_client_t * | p_client, |
| const light_lc_light_onoff_set_params_t * | p_params, | ||
| const model_transition_t * | p_transition, | ||
| uint8_t | repeats | ||
| ) |
Sends a Light OnOff Set Unacknowledged message to the server.
- Parameters
-
[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.
- Return values
-
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.
◆ light_lc_client_property_set()
| uint32_t light_lc_client_property_set | ( | light_lc_client_t * | p_client, |
| const light_lc_property_set_params_t * | p_params | ||
| ) |
Sends a Property Set message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters.
- Return values
-
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. NRF_ERROR_INVALID_LENGTH Failed to create packet.
◆ light_lc_client_property_set_unack()
| uint32_t light_lc_client_property_set_unack | ( | light_lc_client_t * | p_client, |
| const light_lc_property_set_params_t * | p_params, | ||
| uint8_t | repeats | ||
| ) |
Sends a Property Set Unacknowledged message to the server.
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters. [in] repeats Number of repetitions to use while sending unacknowledged message.
- Return values
-
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. NRF_ERROR_INVALID_LENGTH Failed to create packet.
◆ light_lc_client_mode_get()
| uint32_t light_lc_client_mode_get | ( | light_lc_client_t * | p_client | ) |
Sends a Mode Get message to the server.
- Note
- Expected response: Status
- Parameters
-
[in] p_client Client model context pointer.
- Return values
-
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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.
◆ light_lc_client_occupancy_mode_get()
| uint32_t light_lc_client_occupancy_mode_get | ( | light_lc_client_t * | p_client | ) |
Sends a Occupancy Mode Get message to the server.
- Note
- Expected response: Status
- Parameters
-
[in] p_client Client model context pointer.
- Return values
-
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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.
◆ light_lc_client_light_onoff_get()
| uint32_t light_lc_client_light_onoff_get | ( | light_lc_client_t * | p_client | ) |
Sends a Light OnOff Get message to the server.
- Note
- Expected response: Status
- Parameters
-
[in] p_client Client model context pointer.
- Return values
-
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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.
◆ light_lc_client_property_get()
| uint32_t light_lc_client_property_get | ( | light_lc_client_t * | p_client, |
| const light_lc_property_get_params_t * | p_params | ||
| ) |
Sends a Property Get message to the server.
- Note
- Expected response: Status
- Parameters
-
[in] p_client Client model context pointer. [in] p_params Message parameters.
- Return values
-
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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.