bundle.ble.framing

Length-prefixed framing utilities for Bundle BLE transports.

Classes

FrameCodec

Decode arbitrary BLE notification splits using a 2-byte BE header.

Module Contents

class bundle.ble.framing.FrameCodec(/, **data: Any)

Bases: bundle.core.data.Data

Decode arbitrary BLE notification splits using a 2-byte BE header.

encode(payload: bytes) list[bytes]

Wrap payload with its length prefix.

feed(chunk: bytes) collections.abc.Iterable[bytes]

Yield every completed frame extracted from chunk.