My Project
Public Member Functions | Friends | List of all members
BLEScan Class Reference

Perform and manage BLE scans. More...

#include <BLEScan.h>

Public Member Functions

void setActiveScan (bool active)
 Should we perform an active or passive scan? The default is a passive scan. An active scan means that we will wish a scan response. More...
 
void setAdvertisedDeviceCallbacks (BLEAdvertisedDeviceCallbacks *pAdvertisedDeviceCallbacks)
 Set the callbacks to be invoked. More...
 
void setInterval (uint16_t intervalMSecs)
 Set the interval to scan. More...
 
void setWindow (uint16_t windowMSecs)
 Set the window to actively scan. More...
 
std::vector< BLEAdvertisedDevice * > start (uint32_t duration)
 Start scanning. More...
 
void stop ()
 Stop an in progress scan. More...
 

Friends

class BLE
 

Detailed Description

Perform and manage BLE scans.

Scanning is associated with a BLE client that is attempting to locate BLE servers.

Member Function Documentation

◆ setActiveScan()

void BLEScan::setActiveScan ( bool  active)

Should we perform an active or passive scan? The default is a passive scan. An active scan means that we will wish a scan response.

Parameters
[in]activeIf true, we perform an active scan otherwise a passive scan.
Returns
N/A.

◆ setAdvertisedDeviceCallbacks()

void BLEScan::setAdvertisedDeviceCallbacks ( BLEAdvertisedDeviceCallbacks pAdvertisedDeviceCallbacks)

Set the callbacks to be invoked.

Parameters
[in]pAdvertisedDeviceCallbacksCallbacks to be invoked.

◆ setInterval()

void BLEScan::setInterval ( uint16_t  intervalMSecs)

Set the interval to scan.

Parameters
[in]Theinterval in msecs.

◆ setWindow()

void BLEScan::setWindow ( uint16_t  windowMSecs)

Set the window to actively scan.

Parameters
[in]windowMSecsHow long to actively scan.

◆ start()

std::vector< BLEAdvertisedDevice * > BLEScan::start ( uint32_t  duration)

Start scanning.

Parameters
[in]durationThe duration in seconds for which to scan.
Returns
N/A.

◆ stop()

void BLEScan::stop ( )

Stop an in progress scan.

Returns
N/A.

The documentation for this class was generated from the following files: