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#

sl_status_t
sl_btmesh_scene_client_init(uint16_t elem_index)
sl_status_t
sl_btmesh_scene_client_get(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_scene_client_get_register(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
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)
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)
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)

Function Documentation#

sl_btmesh_scene_client_init#

sl_status_t sl_btmesh_scene_client_init (uint16_t elem_index)
Parameters
[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.


Definition at line 14536 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 14553 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 14572 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 14604 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 14633 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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)
Parameters
[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


Definition at line 14659 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x004f0028

Definition at line 14445 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x014f0028

Definition at line 14446 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x024f0028

Definition at line 14447 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x034f0028

Definition at line 14448 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x044f0028

Definition at line 14449 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x054f0028

Definition at line 14450 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x004f0028

Definition at line 14451 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x014f0028

Definition at line 14452 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x024f0028

Definition at line 14453 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x034f0028

Definition at line 14454 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x044f0028

Definition at line 14455 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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_id
Value:
0x054f0028

Definition at line 14456 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h