esp-nimble-cpp  1.4.1
NimBLEAdvertisedDeviceCallbacks Class Referenceabstract

A callback handler for callbacks associated device scanning. More...

Public Member Functions

virtual void onResult (NimBLEAdvertisedDevice *advertisedDevice)=0
 Called when a new scan result is detected. More...
 

Detailed Description

A callback handler for callbacks associated device scanning.

When we are performing a scan as a BLE client, we may wish to know when a new device that is advertising has been found. This class can be sub-classed and registered such that when a scan is performed and a new advertised device has been found, we will be called back to be notified.

Member Function Documentation

◆ onResult()

virtual void NimBLEAdvertisedDeviceCallbacks::onResult ( NimBLEAdvertisedDevice advertisedDevice)
pure virtual

Called when a new scan result is detected.

As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the device that was found. During any individual scan, a device will only be detected one time.