Pigweed
 
Loading...
Searching...
No Matches
pw::bluetooth::low_energy::Central2::ScanHandle Class Referenceabstract

Represents an ongoing LE scan. More...

#include <central2.h>

Public Types

using Ptr = internal::RaiiPtr< ScanHandle, &ScanHandle::Release >
 

Public Member Functions

virtual ~ScanHandle ()=default
 Stops the scan.
 
virtual async2::Poll< pw::Result< ScanResult > > PendResult (async2::Context &cx)=0
 

Private Member Functions

virtual void Release ()=0
 

Detailed Description

Represents an ongoing LE scan.

Member Typedef Documentation

◆ Ptr

Movable ScanHandle smart pointer. The controller will continue scanning until the ScanHandle::Ptr is destroyed.

Member Function Documentation

◆ PendResult()

virtual async2::Poll< pw::Result< ScanResult > > pw::bluetooth::low_energy::Central2::ScanHandle::PendResult ( async2::Context cx)
pure virtual

Returns the next ScanResult if available. Otherwise, invokes cx.waker() when a ScanResult is available. Only one waker is supported at a time.

Returns
embed:rst:leading-asterisk
 
* 
*  .. pw-status-codes::
* 
*     OK: ScanResult was returned.
* 
*     CANCELLED: An internal error occurred and the scan was cancelled.
* 
*  

◆ Release()

virtual void pw::bluetooth::low_energy::Central2::ScanHandle::Release ( )
privatepure virtual

Stop the current scan. This method is called by the ~ScanHandlePtr() when it goes out of scope, the API client should never call this method.


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