Interface for the generic BLE advertising data processing module. More...
Interface for the generic BLE advertising data processing module.
Definition in file ad.h.
Include dependency graph for ad.h:Go to the source code of this file.
Data Structures | |
| struct | bluetil_ad_data_t |
| Struct used for returning the contents of a selected field. More... | |
| struct | bluetil_ad_t |
| Descriptor for a buffer containing advertising data. More... | |
Macros | |
| #define | BLUETIL_AD_INIT(b, p, s) { .buf = b, .pos = p, .size = s } |
| Static initializer for the advertising data structure. | |
| #define | BLUETIL_AD_FLAGS_DEFAULT |
| Default flags to set when advertising BLE devices. More... | |
Enumerations | |
| enum | { BLUETIL_AD_OK = 0 , BLUETIL_AD_NOTFOUND = -1 , BLUETIL_AD_NOMEM = -2 } |
| Return values used by the bluetil_ad module. More... | |
Functions | |
| void | bluetil_ad_init (bluetil_ad_t *ad, void *buf, size_t pos, size_t size) |
| Initialize the given advertising data descriptor. More... | |
| int | bluetil_ad_find (const bluetil_ad_t *ad, uint8_t type, bluetil_ad_data_t *data) |
| Find a specific field in the given advertising data. More... | |
| int | bluetil_ad_find_and_cmp (const bluetil_ad_t *ad, uint8_t type, const void *val, size_t val_len) |
| Find a specific field and compare its value against the given data. More... | |
| int | bluetil_ad_find_str (const bluetil_ad_t *ad, uint8_t type, char *str, size_t str_len) |
| Find the given field and copy its payload into a string. More... | |
| int | bluetil_ad_add (bluetil_ad_t *ad, uint8_t type, const void *data, size_t data_len) |
| Add a new field to the given advertising data. More... | |
| static int | bluetil_ad_add_flags (bluetil_ad_t *ad, uint8_t flags) |
| Convenience function to add the "flags" field. More... | |
| static int | bluetil_ad_add_name (bluetil_ad_t *ad, const char *name) |
| Convenience function to add the "full name" field. More... | |
| static int | bluetil_ad_init_with_flags (bluetil_ad_t *ad, void *buf, size_t buf_len, uint8_t flags) |
| Convenience function for initializing the advertising data descriptor and directly adding the flags field. More... | |