Pigweed
 
Loading...
Searching...
No Matches
pw::bluetooth_sapphire::Peripheral Class Referencefinal

Must only be constructed and destroyed on the Bluetooth thread. More...

#include <peripheral.h>

Inheritance diagram for pw::bluetooth_sapphire::Peripheral:
pw::bluetooth::low_energy::Peripheral2

Public Member Functions

 Peripheral (bt::gap::Adapter::WeakPtr adapter, pw::async::Dispatcher &dispatcher)
 Must only be constructed on the Bluetooth thread.
 
 ~Peripheral () override
 Must only be destroyed on the Bluetooth thread.
 
async2::OnceReceiver< AdvertiseResult > Advertise (const AdvertisingParameters &parameters) override
 
virtual async2::OnceReceiver< AdvertiseResult > Advertise (const AdvertisingParameters &parameters)=0
 

Static Public Member Functions

static pw::sync::Mutexlock ()
 

Additional Inherited Members

- Public Types inherited from pw::bluetooth::low_energy::Peripheral2
enum class  AdvertiseError {
  kNotSupported = 1 , kAdvertisingDataTooLong = 2 , kScanResponseDataTooLong = 3 , kInvalidParameters = 4 ,
  kNotEnoughAdvertisingSlots = 5 , kFailed = 6
}
 Errors returned by Advertise. More...
 
using ScanResponse = AdvertisingData
 
using ConnectionOptions = Connection2::ConnectionOptions
 
using AdvertisingProcedure = std::variant< LegacyAdvertising, ExtendedAdvertising >
 
using AdvertiseResult = pw::expected< AdvertisedPeripheral2::Ptr, AdvertiseError >
 

Detailed Description

Must only be constructed and destroyed on the Bluetooth thread.

Member Function Documentation

◆ Advertise()

async2::OnceReceiver< AdvertiseResult > pw::bluetooth_sapphire::Peripheral::Advertise ( const AdvertisingParameters parameters)
overridevirtual

Thread safe. The AdvertisedPeripheral2 returned on success is thread safe.

Implements pw::bluetooth::low_energy::Peripheral2.


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