Bluetooth Mesh Scene Client Model#
Bluetooth Mesh Scene Client Model.
Bluetooth Mesh Scene Client model functionality to send and receive messages to/from the Scene Server and Scene Setup Server models.
Throughout the API, the client model that is used is identified by its element address and model ID, while the server model responding to the client model requests is identified by its element address and model ID.
The API has functions for querying server model states and requesting server model state changes.
Modules#
sl_btmesh_evt_scene_client_status
sl_btmesh_evt_scene_client_register_status
Functions#
Macros#
Function Documentation#
sl_btmesh_scene_client_init#
sl_status_t sl_btmesh_scene_client_init (uint16_t elem_index)
[in] | elem_index | Index of the client element. |
Initialize the Scene Client model. The Scene Client does not have any internal configuration. It only activates the model in the mesh stack.
Returns
SL_STATUS_OK if successful. Error code otherwise.
14614
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_scene_client_get#
sl_status_t sl_btmesh_scene_client_get (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
[in] | server_address | Device to be queried. The address 0x0000 can be used to publish the message according to model configuration |
[in] | elem_index | Index of the client element. |
[in] | appkey_index | Appkey used by server_address. |
Scene Get command.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
14631
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_scene_client_get_register#
sl_status_t sl_btmesh_scene_client_get_register (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
[in] | server_address | Destination server model address. The address 0x0000 can be used to publish the message according to model configuration |
[in] | elem_index | Client model element index |
[in] | appkey_index | The application key index to use. |
Scene Register Get command
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
14650
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_scene_client_recall#
sl_status_t sl_btmesh_scene_client_recall (uint16_t server_address, uint16_t elem_index, uint16_t selected_scene, uint16_t appkey_index, uint8_t flags, uint8_t tid, uint32_t transition_time_ms, uint16_t delay_ms)
[in] | server_address | Destination server model address. The address 0x0000 can be used to publish the message according to model configuration |
[in] | elem_index | Index of the client element. |
[in] | selected_scene | Scene of interest |
[in] | appkey_index | Appkey used by server_address. |
[in] | flags | Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent, zero will send SET PROPERTY UNACKNOWLEDGED |
[in] | tid | Transaction ID |
[in] | transition_time_ms | Amount of time (in milliseconds) allotted for the transition to take place. Value of 0xFFFFFFFF will cause this parameter as well as the "delay" parameter to be omitted. The transition will be immediate if both the transition time and the delay are zero. |
[in] | delay_ms | Message execution delay in milliseconds. If the "transition_time" is 0xFFFFFFFF, this parameter is ignored. If both the transition time and the delay are zero, the transition is immediate. Valid range: 0-1275. |
Recall a scene.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
14682
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_scene_client_store#
sl_status_t sl_btmesh_scene_client_store (uint16_t server_address, uint16_t elem_index, uint16_t selected_scene, uint16_t appkey_index, uint8_t flags)
[in] | server_address | Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration. |
[in] | elem_index | Client model element index |
[in] | selected_scene | Scene of interest |
[in] | appkey_index | The application key index to use. |
[in] | flags | Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED. |
Store a scene.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
14711
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_scene_client_delete#
sl_status_t sl_btmesh_scene_client_delete (uint16_t server_address, uint16_t elem_index, uint16_t selected_scene, uint16_t appkey_index, uint8_t flags)
[in] | server_address | Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration. |
[in] | elem_index | Client model element index |
[in] | selected_scene | Scene of interest |
[in] | appkey_index | The application key index to use. |
[in] | flags | Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED. |
Delete a scene.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
14737
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
Macro Definition Documentation#
sl_btmesh_cmd_scene_client_init_id#
#define sl_btmesh_cmd_scene_client_init_idValue:
0x004f0028
14523
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_scene_client_get_id#
#define sl_btmesh_cmd_scene_client_get_idValue:
0x014f0028
14524
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_scene_client_get_register_id#
#define sl_btmesh_cmd_scene_client_get_register_idValue:
0x024f0028
14525
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_scene_client_recall_id#
#define sl_btmesh_cmd_scene_client_recall_idValue:
0x034f0028
14526
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_scene_client_store_id#
#define sl_btmesh_cmd_scene_client_store_idValue:
0x044f0028
14527
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_scene_client_delete_id#
#define sl_btmesh_cmd_scene_client_delete_idValue:
0x054f0028
14528
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_init_id#
#define sl_btmesh_rsp_scene_client_init_idValue:
0x004f0028
14529
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_get_id#
#define sl_btmesh_rsp_scene_client_get_idValue:
0x014f0028
14530
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_get_register_id#
#define sl_btmesh_rsp_scene_client_get_register_idValue:
0x024f0028
14531
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_recall_id#
#define sl_btmesh_rsp_scene_client_recall_idValue:
0x034f0028
14532
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_store_id#
#define sl_btmesh_rsp_scene_client_store_idValue:
0x044f0028
14533
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_scene_client_delete_id#
#define sl_btmesh_rsp_scene_client_delete_idValue:
0x054f0028
14534
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h