Module gatt

Module gatt 

Source
Expand description

Service-agnostic frame segmentation and reassembly for GATT links.

This implements the GATT Frame Transport from docs/protocol/src/ulcp-ble.md: one SAR header octet per ATT value, no HDLC escaping or checksum, and bounded reassembly state.

Structs§

Reassembler
Bounded reassembly state for one GATT characteristic.
Segment
One header-prefixed GATT frame segment.
Segments
Iterator returned by segments.

Enums§

DecodeError
Segment decoding/reassembly failure.
EncodeError
Segment encoding failure.

Constants§

FRAME_IN_UUID
ULCP Frame In characteristic UUID.
FRAME_OUT_UUID
ULCP Frame Out characteristic UUID.
MAX_FRAME
Maximum reassembled frame size for the ULCP GATT Service.
SAR_COMPLETE
SAR value for a frame contained in one segment.
SAR_CONT
SAR value for a middle segment of a multi-segment frame.
SAR_FIRST
SAR value for the first segment of a multi-segment frame.
SAR_LAST
SAR value for the final segment of a multi-segment frame.
SERVICE_UUID
ULCP GATT Service UUID.

Functions§

segments
Split one frame into segments carrying at most seg_payload frame bytes.
uuid
Return a UMSH UUID with slot spliced into the second UUID group.