The AIROC Mesh Scene Client module provides a way for an application to control Scene Servers in the mesh network.
To include the Mesh Models support for the Scene Client module the application shall contain the WICED_BT_MESH_MODEL_SCENE_CLIENT
TBD
◆ wiced_bt_mesh_scene_client_callback_t
typedef void() wiced_bt_mesh_scene_client_callback_t(uint16_t event, wiced_bt_mesh_event_t *p_event, void *p_data) |
Scene Client callback is called by the Mesh Models library on receiving a message from the peer.
- Parameters
-
event | The event that the application should process (see Scene Events) |
p_event | information about the message received. The same pointer should be used in the reply if required. |
p_data | Pointer to the data structure |
- Returns
- None
◆ wiced_bt_mesh_model_scene_client_init()
Scene Client Module initialization.
- Parameters
-
element_idx | Device element to where model is used |
p_callback | Application or Parent model callback that will be executed on receiving a message |
is_provisioned | If TRUE, the application is being restarted after being provisioned or after a power loss. If FALSE the model cleans up NVRAM on startup. |
- Returns
- None
◆ wiced_bt_mesh_model_scene_client_message_handler()
wiced_bool_t wiced_bt_mesh_model_scene_client_message_handler |
( |
wiced_bt_mesh_event_t * |
p_event, |
|
|
uint8_t * |
p_data, |
|
|
uint16_t |
data_len |
|
) |
| |
Scene client Message Handler.
An application or a parent model can call this models library function to process a message received from the Scene Server device. The function parses the message and if appropriate calls the parent back to perform functionality.
- Parameters
-
p_event | Mesh event with information about received message. |
p_data | Pointer to the data portion of the message |
data_len | Length of the data in the message |
- Returns
- WICED_TRUE if the message is for this company ID/Model/Element Index combination, WICED_FALSE otherwise.
◆ wiced_bt_mesh_model_scene_client_send_request()
Scene Client send request.
Application can call Scene Client send request function to send Scene Store/Recall/Get/Delete client message to the server.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
p_request | pointer to a data structure containing request type and scene number |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
◆ wiced_bt_mesh_model_scene_client_send_recall()
Scene Client Send Recall.
Application can call Scene Client Send Recall function to send Scene Recall client message to the server.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
p_request | pointer to a data structure containing request type and scene number |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.
◆ wiced_bt_mesh_model_scene_client_send_register_get()
Scene Client Send Register Get.
Application can call Scene Client Send Register Get function to send Scene Register Get client message to the server.
- Parameters
-
p_event | Mesh event with the information about the message that has been received in the request, or created by the app for unsolicited message. |
- Returns
- WICED_BT_SUCCESS if message has been queued for transmission.