C/C++ API Reference
Loading...
Searching...
No Matches
pw::bluetooth_sapphire::Central Class Referencefinal

Overview

Must only be constructed and destroyed on the Bluetooth thread.

Inheritance diagram for pw::bluetooth_sapphire::Central:
pw::bluetooth::low_energy::Central2

Public Member Functions

 Central (bt::gap::Adapter::WeakPtr adapter, pw::async::Dispatcher &dispatcher, pw::multibuf::MultiBufAllocator &allocator)
 
async2::OnceReceiver< ConnectResultConnect (pw::bluetooth::PeerId peer_id, bluetooth::low_energy::Connection2::ConnectionOptions options) override
 
async2::OnceReceiver< ScanStartResultScan (const ScanOptions &options) override
 
- Public Member Functions inherited from pw::bluetooth::low_energy::Central2
virtual async2::OnceReceiver< ConnectResultConnect (PeerId peer_id, Connection2::ConnectionOptions options)=0
 
virtual async2::OnceReceiver< ScanStartResultScan (const ScanOptions &options)=0
 

Static Public Member Functions

static pw::sync::Mutexlock ()
 

Static Public Attributes

static constexpr uint8_t kMaxScanResultsQueueSize = 10
 

Additional Inherited Members

- Public Types inherited from pw::bluetooth::low_energy::Central2
enum class  ScanType : uint8_t { kPassive , ScanType::kActiveUsePublicAddress , ScanType::kActiveUseRandomAddress , ScanType::kActiveUseResolvablePrivateAddress }
 
enum class  ConnectError : uint8_t { ConnectError::kUnknownPeer , ConnectError::kInvalidOptions , ConnectError::kAlreadyExists , ConnectError::kCouldNotBeEstablished }
 Possible errors returned by Connect. More...
 
enum class  StartScanError : uint8_t { StartScanError::kScanInProgress , StartScanError::kInvalidParameters , StartScanError::kInternal }
 
using ConnectResult = pw::expected< Connection2::Ptr, ConnectError >
 The result type returned by Connect().
 
using ScanStartResult = pw::expected< ScanHandle::Ptr, StartScanError >
 The result type returned by Scan().
 

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