18#include "pw_async2/once_sender.h"
19#include "pw_bluetooth/internal/raii_ptr.h"
20#include "pw_bluetooth/low_energy/connection2.h"
21#include "pw_bluetooth/low_energy/phy.h"
22#include "pw_bluetooth/types.h"
23#include "pw_chrono/system_clock.h"
24#include "pw_result/expected.h"
26namespace pw::bluetooth::low_energy {
59 std::optional<std::string_view>
name;
141 std::optional<InlineString<22>>
name;
175 using Ptr = internal::RaiiPtr<ScanHandle, &ScanHandle::Release>;
Definition: once_sender.h:43
Represents an ongoing LE scan.
Definition: central2.h:148
Represents the LE central role. Used to scan and connect to peripherals.
Definition: central2.h:31
Definition: multibuf_v1.h:248
Definition: span_impl.h:235
PeerId peer_id
Uniquely identifies this peer on the current system.
Definition: central2.h:119
virtual async2::OnceReceiver< ConnectResult > Connect(PeerId peer_id, Connection2::ConnectionOptions options)=0
ScanType
Definition: central2.h:78
pw::span< const ScanFilter > filters
Definition: central2.h:95
virtual ~ScanHandle()=default
Stops the scan.
std::optional< Uuid > service_data_uuid
Filter based on service data containing the given UUID.
Definition: central2.h:40
std::optional< Uuid > service_uuid
Filter based on advertised service UUID.
Definition: central2.h:37
std::optional< Uuid > solicitation_uuid
Require that a peer solicits support for a service UUID.
Definition: central2.h:75
std::optional< uint16_t > manufacturer_id
Definition: central2.h:48
uint16_t window
Definition: central2.h:106
virtual async2::PollResult< ScanResult > PendResult(async2::Context &cx)=0
ConnectError
Possible errors returned by Connect.
Definition: central2.h:179
bool connectable
Definition: central2.h:123
pw::expected< ScanHandle::Ptr, StartScanError > ScanStartResult
The result type returned by Scan().
Definition: central2.h:208
virtual async2::OnceReceiver< ScanStartResult > Scan(const ScanOptions &options)=0
chrono::SystemClock::time_point last_updated
Timestamp of when the information in this ScanResult was last updated.
Definition: central2.h:144
std::optional< bool > connectable
Definition: central2.h:54
pw::expected< Connection2::Ptr, ConnectError > ConnectResult
The result type returned by Connect().
Definition: central2.h:205
std::optional< int8_t > max_path_loss
Definition: central2.h:72
internal::RaiiPtr< ScanHandle, &ScanHandle::Release > Ptr
Definition: central2.h:175
uint16_t interval
Definition: central2.h:100
pw::multibuf::MultiBuf data
This contains the advertising data last received from the peer.
Definition: central2.h:134
StartScanError
Definition: central2.h:195
std::optional< InlineString< 22 > > name
Definition: central2.h:141
std::optional< uint8_t > rssi
Definition: central2.h:131
ScanType scan_type
Definition: central2.h:110
std::optional< std::string_view > name
Definition: central2.h:59
Phy phys
Definition: central2.h:114
@ kActiveUseRandomAddress
Send scanning PDUs with the random address.
@ kActiveUsePublicAddress
Send scanning PDUs with the public address.
@ kActiveUseResolvablePrivateAddress
Send scanning PDUs with a generated Resolvable Private Address.
@ kUnknownPeer
The peer ID is unknown.
@ kInvalidOptions
The ConnectionOptions were invalid.
@ kAlreadyExists
A connection to the peer already exists.
@ kInvalidParameters
Some of the scan options are invalid.
@ kScanInProgress
A scan is already in progress. Only 1 scan may be active at a time.
@ kInternal
An internal error occurred and a scan could not be started.
Definition: central2.h:35
Parameters used during a scan.
Definition: central2.h:89
Definition: central2.h:117
Represents parameters that are set on a per-connection basis.
Definition: connection2.h:111