blatann.waitables.scan_waitable module

class blatann.waitables.scan_waitable.ScanFinishedWaitable(ble_device)

Bases: Waitable

Waitable that triggers when a scan operation completes. It also provides a mechanism to acquire the received scan reports in real-time

property scan_reports: Iterable[ScanReport]

Iterable which yields the scan reports in real-time as they’re received. The iterable will block until scanning has timed out/finished

wait(timeout=None, exception_on_timeout=True)

Waits for the scanning operation to complete then returns the scan report collection

Parameters
  • timeout (Optional[float]) – How long to wait for, in seconds

  • exception_on_timeout (bool) – Flag whether or not to throw an exception if the operation timed out. If false and a timeout occurs, will return None

Return type

ScanReportCollection

Returns

The scan report collection