A 31 byte advertising or scan response payload, packed in the order and with the fit rules of Bluedroid's btm_ble_build_adv_data, so the raw bytes match what the esp_ble_adv_data_t API put on air.
More...
#include <adv_payload.h>
|
| const uint8_t * | data () const |
| |
| size_t | size () const |
| |
| void | add_flags (uint8_t flags) |
| |
| void | add_appearance (uint16_t appearance) |
| |
| void | add_name (const char *name, size_t len) |
| | Complete name, or the shortened name type with what fits.
|
| |
| void | add_manufacturer_data (std::span< const uint8_t > data) |
| | Truncated to what fits.
|
| |
| void | add_tx_power (int8_t dbm) |
| |
| void | add_uuids (std::span< const ESPBTUUID > uuids, const ESPBTUUID &skip={}) |
| | 16 and 32-bit lists (partial when they do not all fit), then the first 128-bit UUID; skip is left out.
|
| |
| void | add_service_data (std::span< const uint8_t > data) |
| | Raw service data element (its first bytes are the UUID); dropped whole when it does not fit.
|
| |
|
| static size_t | uuid_size (const ESPBTUUID &uuid, uint32_t *value=nullptr) |
| | Bluedroid's width for uuid: 2 or 4 (and its value) when it has a 16 or 32-bit form, else 16.
|
| |
|
| static constexpr size_t | MAX_LEN = 31 |
| |
A 31 byte advertising or scan response payload, packed in the order and with the fit rules of Bluedroid's btm_ble_build_adv_data, so the raw bytes match what the esp_ble_adv_data_t API put on air.
Definition at line 17 of file adv_payload.h.
◆ add_()
| void esphome::ble_device_base::AdvPayload::add_ |
( |
uint8_t | type, |
|
|
const uint8_t * | value, |
|
|
size_t | len ) |
|
inlineprotected |
◆ add_appearance()
| void esphome::ble_device_base::AdvPayload::add_appearance |
( |
uint16_t | appearance | ) |
|
|
inline |
◆ add_flags()
| void esphome::ble_device_base::AdvPayload::add_flags |
( |
uint8_t | flags | ) |
|
|
inline |
◆ add_manufacturer_data()
| void esphome::ble_device_base::AdvPayload::add_manufacturer_data |
( |
std::span< const uint8_t > | data | ) |
|
|
inline |
◆ add_name()
| void esphome::ble_device_base::AdvPayload::add_name |
( |
const char * | name, |
|
|
size_t | len ) |
|
inline |
Complete name, or the shortened name type with what fits.
Definition at line 36 of file adv_payload.h.
◆ add_service_data()
| void esphome::ble_device_base::AdvPayload::add_service_data |
( |
std::span< const uint8_t > | data | ) |
|
|
inline |
Raw service data element (its first bytes are the UUID); dropped whole when it does not fit.
Definition at line 65 of file adv_payload.h.
◆ add_short_uuids_()
| void esphome::ble_device_base::AdvPayload::add_short_uuids_ |
( |
std::span< const ESPBTUUID > | uuids, |
|
|
const ESPBTUUID & | skip, |
|
|
size_t | size, |
|
|
uint8_t | partial_type ) |
|
inlineprotected |
◆ add_tx_power()
| void esphome::ble_device_base::AdvPayload::add_tx_power |
( |
int8_t | dbm | ) |
|
|
inline |
◆ add_uuids()
| void esphome::ble_device_base::AdvPayload::add_uuids |
( |
std::span< const ESPBTUUID > | uuids, |
|
|
const ESPBTUUID & | skip = {} ) |
|
inline |
16 and 32-bit lists (partial when they do not all fit), then the first 128-bit UUID; skip is left out.
Definition at line 52 of file adv_payload.h.
◆ data()
| const uint8_t * esphome::ble_device_base::AdvPayload::data |
( |
| ) |
const |
|
inline |
◆ left_()
| size_t esphome::ble_device_base::AdvPayload::left_ |
( |
| ) |
const |
|
inlineprotected |
◆ size()
| size_t esphome::ble_device_base::AdvPayload::size |
( |
| ) |
const |
|
inline |
◆ uuid_size()
| static size_t esphome::ble_device_base::AdvPayload::uuid_size |
( |
const ESPBTUUID & | uuid, |
|
|
uint32_t * | value = nullptr ) |
|
inlinestatic |
Bluedroid's width for uuid: 2 or 4 (and its value) when it has a 16 or 32-bit form, else 16.
Definition at line 71 of file adv_payload.h.
◆ buf_
| std::array<uint8_t, MAX_LEN> esphome::ble_device_base::AdvPayload::buf_ {} |
|
protected |
◆ len_
| uint8_t esphome::ble_device_base::AdvPayload::len_ {0} |
|
protected |
◆ MAX_LEN
| size_t esphome::ble_device_base::AdvPayload::MAX_LEN = 31 |
|
staticconstexpr |
The documentation for this class was generated from the following file: