NimBLE-Arduino 1.4.2
|
A class that contains and operates on the results of a BLE scan. More...
#include <NimBLEScan.h>
Public Member Functions | |
void | dump () |
Dump the scan results to the log. | |
int | getCount () |
Get the count of devices found in the last scan. More... | |
NimBLEAdvertisedDevice | getDevice (uint32_t i) |
Return the specified device at the given index. The index should be between 0 and getCount()-1. More... | |
std::vector< NimBLEAdvertisedDevice * >::iterator | begin () |
Get iterator to the beginning of the vector of advertised device pointers. More... | |
std::vector< NimBLEAdvertisedDevice * >::iterator | end () |
Get iterator to the end of the vector of advertised device pointers. More... | |
NimBLEAdvertisedDevice * | getDevice (const NimBLEAddress &address) |
Get a pointer to the specified device at the given address. If the address is not found a nullptr is returned. More... | |
A class that contains and operates on the results of a BLE scan.
When a scan completes, we have a set of found devices. Each device is described by a NimBLEAdvertisedDevice object. The number of items in the set is given by getCount(). We can retrieve a device by calling getDevice() passing in the index (starting at 0) of the desired device.
std::vector< NimBLEAdvertisedDevice * >::iterator NimBLEScanResults::begin | ( | ) |
Get iterator to the beginning of the vector of advertised device pointers.
std::vector< NimBLEAdvertisedDevice * >::iterator NimBLEScanResults::end | ( | ) |
Get iterator to the end of the vector of advertised device pointers.
int NimBLEScanResults::getCount | ( | ) |
Get the count of devices found in the last scan.
NimBLEAdvertisedDevice * NimBLEScanResults::getDevice | ( | const NimBLEAddress & | address | ) |
Get a pointer to the specified device at the given address. If the address is not found a nullptr is returned.
[in] | address | The address of the device. |
NimBLEAdvertisedDevice NimBLEScanResults::getDevice | ( | uint32_t | i | ) |
Return the specified device at the given index. The index should be between 0 and getCount()-1.
[in] | i | The index of the device. |