CCSDS TM Transfer Frames (CCSDS 132.0-B-3)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

tm: rename find_clcw to extract_clcw to drop find_ prefix

The find_ prefix was redundant. We can't use bare 'clcw' because Tm.clcw
is the CLCW constructor, so 'extract_clcw' makes the intent (decode
the CLCW out of the frame's OCF) explicit.

+4 -4
+1 -1
fuzz/fuzz_tm.ml
··· 167 167 match Tm.decode ~frame_len:(String.length encoded) encoded with 168 168 | Error e -> fail (Fmt.str "decode: %a" Tm.pp_error e) 169 169 | Ok decoded -> ( 170 - match Tm.find_clcw decoded with 170 + match Tm.extract_clcw decoded with 171 171 | None -> fail "no CLCW in decoded frame" 172 172 | Some (Error e) -> fail (Fmt.str "CLCW: %a" Clcw.pp_error e) 173 173 | Some (Ok clcw') ->
+1 -1
lib/tm.ml
··· 529 529 let decode_clcw word = Clcw.decode word 530 530 let encode_clcw clcw = Clcw.encode clcw 531 531 532 - let find_clcw frame = 532 + let extract_clcw frame = 533 533 match frame.ocf with None -> None | Some word -> Some (Clcw.decode word) 534 534 535 535 (* Constructors *)
+2 -2
lib/tm.mli
··· 176 176 val encode_clcw : Clcw.t -> int 177 177 (** [encode_clcw clcw] encodes a CLCW to a 32-bit word. *) 178 178 179 - val find_clcw : t -> (Clcw.t, Clcw.error) result option 180 - (** [find_clcw frame] extracts and decodes the CLCW from the frame's OCF if 179 + val extract_clcw : t -> (Clcw.t, Clcw.error) result option 180 + (** [extract_clcw frame] extracts and decodes the CLCW from the frame's OCF if 181 181 present. Returns [None] if no OCF. *) 182 182 183 183 (** {1 Constructors} *)