bundle.ble¶
Bundle BLE module public interface definitions.
Submodules¶
Attributes¶
Classes¶
Bleak advertisement adapter with convenience helpers. |
|
Entity describing a discovered peripheral. |
|
Decode arbitrary BLE notification splits using a 2-byte BE header. |
|
High-level helper managing a single Nordic UART Service connection. |
|
Provide a compact API for scanning and opening Nordic UART links. |
|
Collect advertisement snapshots from nearby peripherals. |
|
Entity describing a scan run and its collected devices. |
Package Contents¶
- class bundle.ble.Advertisement(/, **data: Any)¶
Bases:
bundle.core.data.DataBleak advertisement adapter with convenience helpers.
- class bundle.ble.Device(/, **data: Any)¶
Bases:
bundle.core.EntityEntity describing a discovered peripheral.
- class bundle.ble.FrameCodec(/, **data: Any)¶
Bases:
bundle.core.data.DataDecode arbitrary BLE notification splits using a 2-byte BE header.
- feed(chunk: bytes) collections.abc.Iterable[bytes]¶
Yield every completed frame extracted from chunk.
- class bundle.ble.NordicLink(*args, scanner: bundle.ble.scanner.Scanner | None = None, **kwargs)¶
Bases:
bundle.core.EntityHigh-level helper managing a single Nordic UART Service connection.
- on_message(callback: collections.abc.Callable[[bytes], None]) None¶
- class bundle.ble.Manager(*args, **kwargs)¶
Bases:
bundle.core.EntityProvide a compact API for scanning and opening Nordic UART links.
- async scan(*, timeout: float | None = None) bundle.ble.scanner.ScanResult¶
- bundle.ble.DEFAULT_SCAN_TIMEOUT = 5.0¶
- class bundle.ble.Scanner(/, **data: Any)¶
Bases:
bundle.core.EntityCollect advertisement snapshots from nearby peripherals.
- async scan(*, timeout: float | None = None) ScanResult¶
- class bundle.ble.ScanResult(/, **data: Any)¶
Bases:
bundle.core.data.DataEntity describing a scan run and its collected devices.
- devices: list[bundle.ble.device.Device] = None¶
- sorted_devices() list[bundle.ble.device.Device]¶