Bluetooth Mesh Light Control Client Model#
Bluetooth Mesh Light Control Client Model.
Bluetooth Mesh LC Client model API provides functionality to send and receive messages to/from the LC Server and LC Setup Server models.
Throughout the API, the client model that's 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_lc_client_mode_status
sl_btmesh_evt_lc_client_om_status
sl_btmesh_evt_lc_client_light_onoff_status
sl_btmesh_evt_lc_client_property_status
Functions#
Macros#
Function Documentation#
sl_btmesh_lc_client_init#
sl_status_t sl_btmesh_lc_client_init (uint16_t elem_index)
[in] | elem_index | Index of the client element. |
Initialize the LC Client model. LC 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.
13600
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_get_mode#
sl_status_t sl_btmesh_lc_client_get_mode (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 the model configuration. |
[in] | elem_index | Index of the client element. |
[in] | appkey_index | Appkey used by server_address. |
Get the mode status.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13617
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_set_mode#
sl_status_t sl_btmesh_lc_client_set_mode (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
[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] | appkey_index | The application key index to use. |
[in] | flags | Bit 1 (0x02) defines whether a response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED. |
[in] | mode | Mode value to set |
Set mode
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13641
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_get_om#
sl_status_t sl_btmesh_lc_client_get_om (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 the model configuration. |
[in] | elem_index | Index of the client element. |
[in] | appkey_index | Appkey used by server_address. |
Get the OM status.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13662
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_set_om#
sl_status_t sl_btmesh_lc_client_set_om (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
[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] | 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. |
[in] | mode | Mode value to set |
Set occupancy mode.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13686
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_get_light_onoff#
sl_status_t sl_btmesh_lc_client_get_light_onoff (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 the model configuration. |
[in] | elem_index | Index of the client element. |
[in] | appkey_index | Appkey used by server_address. |
Get the Light OnOff status.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13707
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_set_light_onoff#
sl_status_t sl_btmesh_lc_client_set_light_onoff (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t target_state, uint8_t tid, uint32_t transition_time_ms, uint16_t message_delay_ms)
[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] | 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. |
[in] | target_state | The target value of the Light LC Light OnOff state |
[in] | tid | Transaction identifier |
[in] | transition_time_ms | Transition time in milliseconds. Value of 0xFFFFFFFF will cause this parameter as well as the "delay" parameter to be omitted. |
[in] | message_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. |
Set the Light OnOff.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13739
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_get_property#
sl_status_t sl_btmesh_lc_client_get_property (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint16_t property_id)
[in] | server_address | Device to be queried. The address 0x0000 can be used to publish the message according to the model configuration. |
[in] | elem_index | Index of the client element. |
[in] | appkey_index | Appkey used by server_address. |
[in] | property_id | The property ID to query. |
Get the Property status.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13764
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_lc_client_set_property#
sl_status_t sl_btmesh_lc_client_set_property (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, size_t params_len, const uint8_t * params)
[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] | 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. |
[in] | property_id | Property ID for the LC Server. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
[in] | params_len | Length of data in |
[in] | params | Byte array containing serialized fields of LC Property, excluding the property ID |
Set a particular property.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
13793
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h