47static constexpr uint8_t MAX_SCAN_REPORT_QUEUE_SIZE = 64;
51 void setup()
override;
70 bool scan_start(uint16_t interval, uint16_t window);
76 void enqueue_scan_report(
const uint8_t *mac, int8_t rssi, uint8_t addr_type,
const uint8_t *data, uint16_t data_len);
std::vector< BLEScanListener * > scan_listeners_
void enqueue_scan_report(const uint8_t *mac, int8_t rssi, uint8_t addr_type, const uint8_t *data, uint16_t data_len)
Internal: buffer one controller report (BDK notice callback, BLE task context — bounded copy under th...
void dump_config() override
void register_scan_listener(BLEScanListener *listener)
Register a consumer for scan reports (delivered on the main task via loop()).
void get_mac_lsb_first(uint8_t out[6]) const
Controller BLE address, least-significant octet first (BLE convention).
float get_setup_priority() const override
void enable()
Bring up the BDK BLE stack (one-time; the BDK has no teardown path).
esphome::LockFreeQueue< BLEScanReport, MAX_SCAN_REPORT_QUEUE_SIZE > report_queue_
esphome::EventPool< BLEScanReport, MAX_SCAN_REPORT_QUEUE_SIZE - 1 > report_pool_
void set_enable_on_boot(bool enable_on_boot)
void scan_stop()
Stop the controller scan (no-op when not scanning).
Consumer interface for controller scan reports.
~BLEScanListener()=default
virtual void on_scan_report(const BLEScanReport &report)=0
One advertisement report from the controller.