![]() |
nRF Connect SDK API 3.4.99
|
| int dult_bt_adv_data_fill | ( | const struct dult_user * | user, |
| struct bt_data * | bt_adv_data, | ||
| uint8_t * | buf, | ||
| size_t | buf_size, | ||
| const struct dult_bt_adv_data * | adv_data ) |
#include <include/dult/bt.h>
Encode the DULT location-enabled Bluetooth advertising payload.
This function can only be called if the DULT user was previously registered with the dult_user_register API.
Serializes the DULT data (UUID, network ID, near-owner byte, and optional proprietary data from adv_data) into buf and populates bt_adv_data to reference it. The caller must ensure that buf remains valid for as long as bt_adv_data is in use.
| [in] | user | Pointer to the DULT user structure. |
| [out] | bt_adv_data | Pointer to the Bluetooth advertising data structure to populate. |
| [out] | buf | Backing buffer for the serialized payload. It must be large enough to hold the fixed DULT header followed by adv_data->proprietary.len bytes; otherwise the function returns -EINVAL. |
| [in] | buf_size | Size of buf in bytes. |
| [in] | adv_data | Advertising data to encode. |