···117117118118(* Staged getter for the frame-type bitfield — reads the first U16be word once
119119 and extracts bits [4..6] with pure shift+mask. No manual Char.code needed. *)
120120-let get_frame_type = Wire.Staged.unstage (Wire.Codec.get codec bf_frame_type)
120120+let frame_type = Wire.Staged.unstage (Wire.Codec.get codec bf_frame_type)
121121122122let encode t =
123123 let total = header_size + String.length t.data in
···133133 let total = Wire.Codec.wire_size_at codec buf 0 in
134134 if len < total then Error `Truncated
135135 else
136136- let ft_bits = get_frame_type buf 0 in
136136+ let ft_bits = frame_type buf 0 in
137137 match frame_type_of_int ft_bits with
138138 | None -> Error (`Invalid_frame_type ft_bits)
139139 | Some _ -> (
+1-1
lib/proximity1.mli
···5454(** [compare a b] compares two frames for ordering. *)
55555656val codec : t Wire.Codec.t
5757-(** Wire codec for the full Proximity-1 frame (header + data). The codec models
5757+(** [codec] is the Wire codec for the full Proximity-1 frame (header + data). It models
5858 the complete frame: the 7-byte header followed by a variable-length data
5959 field whose size is determined by the [frame_length] header field. *)
6060
+1
test/test_proximity1.mli
···11val suite : string * unit Alcotest.test_case list
22+(** [suite] is the Proximity-1 test suite. *)