Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Public Broadcast Profile (PBP) More...
Macros | |
#define | BT_PBP_MIN_PBA_SIZE (BT_UUID_SIZE_16 + 1 + 1) |
Enumerations | |
enum | bt_pbp_announcement_feature { BT_PBP_ANNOUNCEMENT_FEATURE_ENCRYPTION = BIT(0) , BT_PBP_ANNOUNCEMENT_FEATURE_STANDARD_QUALITY = BIT(1) , BT_PBP_ANNOUNCEMENT_FEATURE_HIGH_QUALITY = BIT(2) } |
Public Broadcast Announcement features. More... | |
Functions | |
int | bt_pbp_get_announcement (const uint8_t meta[], size_t meta_len, enum bt_pbp_announcement_feature features, struct net_buf_simple *pba_data_buf) |
Creates a Public Broadcast Announcement based on the information received in the features parameter. | |
int | bt_pbp_parse_announcement (struct bt_data *data, enum bt_pbp_announcement_feature *features, uint8_t **meta) |
Parses the received advertising data corresponding to a Public Broadcast Announcement. | |
Public Broadcast Profile (PBP)
#define BT_PBP_MIN_PBA_SIZE (BT_UUID_SIZE_16 + 1 + 1) |
#include <zephyr/bluetooth/audio/pbp.h>
#include <zephyr/bluetooth/audio/pbp.h>
Public Broadcast Announcement features.
int bt_pbp_get_announcement | ( | const uint8_t | meta[], |
size_t | meta_len, | ||
enum bt_pbp_announcement_feature | features, | ||
struct net_buf_simple * | pba_data_buf | ||
) |
#include <zephyr/bluetooth/audio/pbp.h>
Creates a Public Broadcast Announcement based on the information received in the features parameter.
meta | Metadata to be included in the advertising data |
meta_len | Size of the metadata fields to be included in the advertising data |
features | Public Broadcast Announcement features |
pba_data_buf | Pointer to store the PBA advertising data. Buffer size needs to be meta_len + BT_PBP_MIN_PBA_SIZE. |
int bt_pbp_parse_announcement | ( | struct bt_data * | data, |
enum bt_pbp_announcement_feature * | features, | ||
uint8_t ** | meta | ||
) |
#include <zephyr/bluetooth/audio/pbp.h>
Parses the received advertising data corresponding to a Public Broadcast Announcement.
Returns the advertised Public Broadcast Announcement features and metadata.
[in] | data | Advertising data to be checked |
[out] | features | Pointer to public broadcast source features to store the parsed features in |
[out] | meta | Pointer to the metadata present in the advertising data |
-EINVAL | if data , features or meta are NULL. |
-ENOENT | if data is not of type BT_DATA_SVC_DATA16 or if the UUID in the service data is not BT_UUID_PBA. |
-EMSGSIZE | if data is not large enough to contain a PBP announcement. |
-EBADMSG | if the data contains invalid data. |