List for storing and printing BLE scan results.
More...
List for storing and printing BLE scan results.
- Note
- This scanlist implementation is not thread safe. So calling nimble_scanlist_update() in between nimble_scanlist_get*() calls is not a good idea.
◆ NIMBLE_SCANLIST_SIZE
#define NIMBLE_SCANLIST_SIZE (20U) |
Default number of list entries that are allocated in RAM.
Definition at line 41 of file nimble_scanlist.h.
◆ nimble_scanlist_get_by_pos()
Get an entry of the scanlist by its position.
- Parameters
-
[in] | pos | position in the list |
- Returns
- the scanlist entry at position
pos
-
NULL if there is no entry a the given position
◆ nimble_scanlist_get_next()
Get the next entry from the list, pass NULL for getting the first entry.
- Parameters
-
[in] | e | any entry in the list |
- Returns
- the entry following
e
-
NULL if
e
was the last entry
◆ nimble_scanlist_print_entry()
Dump a single scanlist entry to STDIO.
- Parameters
-
◆ nimble_scanlist_update()
void nimble_scanlist_update |
( |
uint8_t |
type, |
|
|
const ble_addr_t * |
addr, |
|
|
const nimble_scanner_info_t * |
info, |
|
|
const uint8_t * |
ad, |
|
|
size_t |
len |
|
) |
| |
Add/update the entry for the a scanned node.
If the list is already full, the scanned node is simply ignored.
- Parameters
-
[in] | type | type of the advertising packet received |
[in] | addr | BLE address of the scanned node |
[in] | info | Additional information on received advertising event |
[in] | ad | the payload of the advertising packet |
[in] | len | length of ad |