C++ Pixels Library For Windows
Enable communications with Pixels dice using Bluetooth Low Energy.
|
Represents a Bluetooth scanner for Pixels dice. More...
#include <PixelScanner.h>
Public Types | |
using | ScannedPixelListener = std::function< void(const std::shared_ptr< const ScannedPixel > &)> |
Signature of a scanned Pixel listener. | |
Public Member Functions | |
PixelScanner (const ScannedPixelListener &listener) | |
Initializes a new instance of PixelScanner with the given listener. More... | |
~PixelScanner () | |
Default destructor. | |
bool | isScanning () |
Indicates whether a scan for Pixels dice is currently running. | |
void | copyScannedPixels (std::vector< std::shared_ptr< const ScannedPixel > > &outScannedPixels) |
Copy the list of scanned Pixels to the given std::vector. More... | |
void | start () |
Starts a Bluetooth scan for Pixels. | |
void | stop () |
Stops scanning for Pixels. | |
void | clear () |
Clear the list of scanned Pixels. | |
Represents a Bluetooth scanner for Pixels dice.
This class is thread safe.
|
explicit |
Initializes a new instance of PixelScanner with the given listener.
listener | A function to be called upon each Pixel advertisement packet received by the scanner. |
void Systemic::Pixels::PixelScanner::copyScannedPixels | ( | std::vector< std::shared_ptr< const ScannedPixel > > & | outScannedPixels | ) |