libpowermon 1.20
PowerMon Access Library
Loading...
Searching...
No Matches
PowermonScanner Class Referenceabstract

PowermonScanner offers support for scanning for PowerMon advertisements. Both BLE and WiFi PowerMon devices are supported. More...

#include <powermon_scanner.h>

Classes

struct  Advertisement
 Advertisement is a structure representing an advertisement packet received from the PowerMon device. More...

Public Member Functions

virtual void setCallback (const std::function< void(const Advertisement &)> &cb)=0
 Sets the callback to be called by the Powermon scanner when a new advertisement has been received.
virtual bool startWifiScan (void)=0
 Starts scanning for WiFi device advertisements.
virtual bool stopWifiScan (void)=0
 Stops scanning for WiFi device advertisements.
virtual bool startBleScan (void)=0
virtual bool stopBleScan (void)=0

Static Public Member Functions

static PowermonScannercreateInstance (void)
 Creates an instance of the PowermonScanner class.

Detailed Description

PowermonScanner offers support for scanning for PowerMon advertisements. Both BLE and WiFi PowerMon devices are supported.

Member Function Documentation

◆ createInstance()

PowermonScanner * PowermonScanner::createInstance ( void )
static

Creates an instance of the PowermonScanner class.

Returns
Pointer to the newly created PowermonScanner object. Must be freed using delete().

◆ setCallback()

virtual void PowermonScanner::setCallback ( const std::function< void(const Advertisement &)> & cb)
pure virtual

Sets the callback to be called by the Powermon scanner when a new advertisement has been received.

Parameters
cbLambda of type void(const Advertisement&)

◆ startBleScan()

virtual bool PowermonScanner::startBleScan ( void )
pure virtual

Starts scanning for BLE device advertisements

Returns
Returns true if the BLE scanning was started successfully, false if not.

◆ startWifiScan()

virtual bool PowermonScanner::startWifiScan ( void )
pure virtual

Starts scanning for WiFi device advertisements.

Returns
Returns true if the WiFi scanning was started successfully, false if not.

◆ stopBleScan()

virtual bool PowermonScanner::stopBleScan ( void )
pure virtual

Stops scanning for BLE device advertisements

Returns
Returns true if the BLE scanning was stopped successfully, false if not.

◆ stopWifiScan()

virtual bool PowermonScanner::stopWifiScan ( void )
pure virtual

Stops scanning for WiFi device advertisements.

Returns
Returns true if the WiFi scanning was stopped successfully, false if not.

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