template <size_t kMaxPacketSize>

class PacketReassembler

Defined at line 25 of file ../../src/connectivity/bluetooth/hci/transport/usb/packet_reassembler.h

PacketReassembler is a utility for accumulating packet chunks and reporting when a complete

packet has been accumulated. It is intended to be used for SCO packets and HCI event packets,

which both have a 1-byte length field in the header. |kMaxPacketSize| is the max frame size of

the packet this reasembler is being used for.

Public Methods

void PacketReassembler<kMaxPacketSize> (size_t length_param_index, size_t header_size, PacketCallback packet_cb)

|length_param_index| is the index in the header of the 1-byte header field.

|header_size| is the size of the packet header.

|packet_cb| is called with packets as soon as a full packet is

accumulated via ProcessData().

Defined at line 32 of file ../../src/connectivity/bluetooth/hci/transport/usb/packet_reassembler.h

void clear ()

Defined at line 40 of file ../../src/connectivity/bluetooth/hci/transport/usb/packet_reassembler.h

void ProcessData (cpp20::span<const uint8_t> buffer)

Append data to the accumulator and call packet handler if a complete packet has been

accumulated. |buffer| may contain data from multiple packets.

Defined at line 47 of file ../../src/connectivity/bluetooth/hci/transport/usb/packet_reassembler.h