Data Structures | |
| struct | scene_client_callbacks_t |
| struct | scene_client_settings_t |
| User provided settings and callbacks for the model instance. More... | |
| union | scene_client_msg_data_t |
| Union for holding current message packet. More... | |
| struct | scene_client_t |
Macros | |
| #define | SCENE_CLIENT_MODEL_ID 0x1205 |
| Client model ID. | |
Typedefs | |
| typedef void(* | scene_state_status_cb_t) (const scene_client_t *p_self, const access_message_rx_meta_t *p_meta, const scene_status_params_t *p_in) |
| Callback type for scene state related transactions. More... | |
| typedef void(* | scene_register_state_status_cb_t) (const scene_client_t *p_self, const access_message_rx_meta_t *p_meta, const scene_register_status_params_t *p_in) |
| Callback type for register scene state related transactions. More... | |
Functions | |
| uint32_t | scene_client_init (scene_client_t *p_client, uint8_t element_index) |
| Initializes Scene client. More... | |
| uint32_t | scene_client_store (scene_client_t *p_client, const scene_store_params_t *p_params) |
| Sends a Store message to the server. More... | |
| uint32_t | scene_client_store_unack (scene_client_t *p_client, const scene_store_params_t *p_params, uint8_t repeats) |
| Sends a Store Unacknowledged message to the server. More... | |
| uint32_t | scene_client_delete (scene_client_t *p_client, const scene_delete_params_t *p_params) |
| Sends a Delete message to the server. More... | |
| uint32_t | scene_client_delete_unack (scene_client_t *p_client, const scene_delete_params_t *p_params, uint8_t repeats) |
| Sends a Delete Unacknowledged message to the server. More... | |
| uint32_t | scene_client_recall (scene_client_t *p_client, const scene_recall_params_t *p_params, const model_transition_t *p_transition) |
| Sends a Recall message to the server. More... | |
| uint32_t | scene_client_recall_unack (scene_client_t *p_client, const scene_recall_params_t *p_params, const model_transition_t *p_transition, uint8_t repeats) |
| Sends a Recall Unacknowledged message to the server. More... | |
| uint32_t | scene_client_get (scene_client_t *p_client) |
| Sends a Get message to the server. More... | |
| uint32_t | scene_client_register_get (scene_client_t *p_client) |
| Sends a Register Get message to the server. More... | |
Detailed Description
Typedef Documentation
◆ scene_state_status_cb_t
| typedef void(* scene_state_status_cb_t) (const scene_client_t *p_self, const access_message_rx_meta_t *p_meta, const scene_status_params_t *p_in) |
Callback type for scene 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 scene_client.h.
◆ scene_register_state_status_cb_t
| typedef void(* scene_register_state_status_cb_t) (const scene_client_t *p_self, const access_message_rx_meta_t *p_meta, const scene_register_status_params_t *p_in) |
Callback type for register scene 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 scene_client.h.
Function Documentation
◆ scene_client_init()
| uint32_t scene_client_init | ( | scene_client_t * | p_client, |
| uint8_t | element_index | ||
| ) |
Initializes Scene 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_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.
◆ scene_client_store()
| uint32_t scene_client_store | ( | scene_client_t * | p_client, |
| const scene_store_params_t * | p_params | ||
| ) |
Sends a Store 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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.
◆ scene_client_store_unack()
| uint32_t scene_client_store_unack | ( | scene_client_t * | p_client, |
| const scene_store_params_t * | p_params, | ||
| uint8_t | repeats | ||
| ) |
Sends a Store Unacknowledged 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] 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 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.
◆ scene_client_delete()
| uint32_t scene_client_delete | ( | scene_client_t * | p_client, |
| const scene_delete_params_t * | p_params | ||
| ) |
Sends a Delete 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 The model not bound to application key or publish address not set. NRF_ERROR_FORBIDDEN Failed to allocate a sequence number from network.
◆ scene_client_delete_unack()
| uint32_t scene_client_delete_unack | ( | scene_client_t * | p_client, |
| const scene_delete_params_t * | p_params, | ||
| uint8_t | repeats | ||
| ) |
Sends a Delete Unacknowledged 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] 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 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.
◆ scene_client_recall()
| uint32_t scene_client_recall | ( | scene_client_t * | p_client, |
| const scene_recall_params_t * | p_params, | ||
| const model_transition_t * | p_transition | ||
| ) |
Sends a Recall 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.
◆ scene_client_recall_unack()
| uint32_t scene_client_recall_unack | ( | scene_client_t * | p_client, |
| const scene_recall_params_t * | p_params, | ||
| const model_transition_t * | p_transition, | ||
| uint8_t | repeats | ||
| ) |
Sends a Recall Unacknowledged 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 [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.
◆ scene_client_get()
| uint32_t scene_client_get | ( | scene_client_t * | p_client | ) |
Sends a Get message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- 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.
◆ scene_client_register_get()
| uint32_t scene_client_register_get | ( | scene_client_t * | p_client | ) |
Sends a Register Get message to the server.
- Note
- Expected response: Status, if the message is sent as acknowledged message.
- 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.