Bluetooth Mesh Sensor Client Model#
Bluetooth Mesh Sensor Client Model.
This class provides the commands and messages to interface with the Sensor Client model.
Modules#
sl_btmesh_evt_sensor_client_descriptor_status
sl_btmesh_evt_sensor_client_cadence_status
sl_btmesh_evt_sensor_client_settings_status
sl_btmesh_evt_sensor_client_setting_status
sl_btmesh_evt_sensor_client_status
sl_btmesh_evt_sensor_client_column_status
sl_btmesh_evt_sensor_client_series_status
sl_btmesh_evt_sensor_client_publish
Functions#
Macros#
Function Documentation#
sl_btmesh_sensor_client_init#
sl_status_t sl_btmesh_sensor_client_init ()
Initialize the Sensor Client model. Sensor Client does not have any internal configuration, it only activates the model in the Bluetooth mesh stack.
Returns
SL_STATUS_OK if successful. Error code otherwise.
12671
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_deinit#
sl_status_t sl_btmesh_sensor_client_deinit ()
Deinitialize the Sensor Client model. There are no sensor-specific configurations to reset. Normally, models are initialized at boot and never deinitialized.
Returns
SL_STATUS_OK if successful. Error code otherwise.
12683
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_descriptor#
sl_status_t sl_btmesh_sensor_client_get_descriptor (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id)
[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. |
[in] | flags | No flags defined currently |
[in] | property_id | ProperyID for the sensor (optional). Range: 0x0001 - 0xffff for a specific device property ID or 0x0000 to get all (the value 0x0000 is prohibited as a real ID). |
Get the Sensor Descriptor state of one specific sensor or all sensors within a model. Results in a Sensor Descriptor Status event
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12705
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get#
sl_status_t sl_btmesh_sensor_client_get (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id)
[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. |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, or 0x0000 when not used to get values for all sensors present in the element. |
Send a Sensor Get message to fetch the Sensor Data state of one specific sensor given by its Property ID, results in a Sensor Status event. The Property ID 0x0000 can be used to fetch all sensor values present at a server element.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12733
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_column#
sl_status_t sl_btmesh_sensor_client_get_column (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, size_t column_id_len, const uint8_t * column_id)
[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. |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
[in] | column_id_len | Length of data in |
[in] | column_id | Raw value identifying a column |
Get a Sensor Series Column state, results in a Sensor Column Status event.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12759
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_series#
sl_status_t sl_btmesh_sensor_client_get_series (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, size_t column_ids_len, const uint8_t * column_ids)
[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. |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
[in] | column_ids_len | Length of data in |
[in] | column_ids | Raw values identifying starting and ending columns |
Get a Sensor Series Column state, which results in a Sensor Series Status event.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12788
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_cadence#
sl_status_t sl_btmesh_sensor_client_get_cadence (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id)
[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 |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
Send a Sensor Get Cadence message to get the Sensor Cadence state, which results in a Sensor Cadence Status message.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12815
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_set_cadence#
sl_status_t sl_btmesh_sensor_client_set_cadence (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 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 CADENCE message will be sent, zero will send SET CADENCE UNACKNOWLEDGED |
[in] | property_id | Property ID for the sensor. 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 Sensor Cadence state, excluding the property ID
|
Send a Sensor Cadence Set message, either acknowledged or unacknowledged, depending on the message flags. Acknowledged message results in a Cadence Status reply message and event. The server must publish its new state in any case.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12857
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_settings#
sl_status_t sl_btmesh_sensor_client_get_settings (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id)
[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 |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
Send a Sensor Settings Get message to fetch the Sensor Property IDs present for the given sensor, which results in a Sensor Settings Status event.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12884
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_get_setting#
sl_status_t sl_btmesh_sensor_client_get_setting (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, uint16_t setting_id)
[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. |
[in] | flags | No flags defined currently |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
[in] | setting_id | Sensor Setting Property ID field identifying the device property of a setting. Range: 0x0001 - 0xffff, 0x0000 is prohibited. |
Send a Sensor Get Setting message to get the value of a specific setting for the given sensor, which results in a Sensor Setting Status event.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12911
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_sensor_client_set_setting#
sl_status_t sl_btmesh_sensor_client_set_setting (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, uint16_t setting_id, size_t raw_value_len, const uint8_t * raw_value)
[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 |
[in] | flags | Bit 1 (0x02) defines whether response is required. If set to 1, SET SETTING message is sent, zero will use SET SETTING UNACKNOWLEDGED. |
[in] | property_id | Property ID for the sensor. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited. |
[in] | setting_id | Sensor Setting Property ID field identifying the device property of a setting. Range: 0x0001 - 0xffff, 0x0000 is prohibited. |
[in] | raw_value_len | Length of data in |
[in] | raw_value | Sensor Setting raw value. Size and representation depends on the type defined by the Sensor Setting Property ID. |
Send Sensor Setting Set message to update the value of a specific setting for the given sensor, either acknowledged or unacknowledged depending on the message flags. Only acknowledged requests will have a direct Sensor Setting Status reply. The server must publish its new state in any case.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
12946
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_sensor_client_init_id#
#define sl_btmesh_cmd_sensor_client_init_idValue:
0x00490028
12319
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_deinit_id#
#define sl_btmesh_cmd_sensor_client_deinit_idValue:
0x01490028
12320
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_descriptor_id#
#define sl_btmesh_cmd_sensor_client_get_descriptor_idValue:
0x02490028
12321
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_id#
#define sl_btmesh_cmd_sensor_client_get_idValue:
0x03490028
12322
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_column_id#
#define sl_btmesh_cmd_sensor_client_get_column_idValue:
0x04490028
12323
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_series_id#
#define sl_btmesh_cmd_sensor_client_get_series_idValue:
0x05490028
12324
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_cadence_id#
#define sl_btmesh_cmd_sensor_client_get_cadence_idValue:
0x06490028
12325
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_set_cadence_id#
#define sl_btmesh_cmd_sensor_client_set_cadence_idValue:
0x07490028
12326
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_settings_id#
#define sl_btmesh_cmd_sensor_client_get_settings_idValue:
0x08490028
12327
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_get_setting_id#
#define sl_btmesh_cmd_sensor_client_get_setting_idValue:
0x09490028
12328
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_sensor_client_set_setting_id#
#define sl_btmesh_cmd_sensor_client_set_setting_idValue:
0x0a490028
12329
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_init_id#
#define sl_btmesh_rsp_sensor_client_init_idValue:
0x00490028
12330
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_deinit_id#
#define sl_btmesh_rsp_sensor_client_deinit_idValue:
0x01490028
12331
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_descriptor_id#
#define sl_btmesh_rsp_sensor_client_get_descriptor_idValue:
0x02490028
12332
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_id#
#define sl_btmesh_rsp_sensor_client_get_idValue:
0x03490028
12333
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_column_id#
#define sl_btmesh_rsp_sensor_client_get_column_idValue:
0x04490028
12334
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_series_id#
#define sl_btmesh_rsp_sensor_client_get_series_idValue:
0x05490028
12335
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_cadence_id#
#define sl_btmesh_rsp_sensor_client_get_cadence_idValue:
0x06490028
12336
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_set_cadence_id#
#define sl_btmesh_rsp_sensor_client_set_cadence_idValue:
0x07490028
12337
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_settings_id#
#define sl_btmesh_rsp_sensor_client_get_settings_idValue:
0x08490028
12338
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_get_setting_id#
#define sl_btmesh_rsp_sensor_client_get_setting_idValue:
0x09490028
12339
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_sensor_client_set_setting_id#
#define sl_btmesh_rsp_sensor_client_set_setting_idValue:
0x0a490028
12340
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h