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: Fmt.pf, rename find_clcw, document Wire fields (merlint)

+27 -5
+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 clcw frame = 533 533 match frame.ocf with None -> None | Some word -> Some (Clcw.decode word) 534 534 535 535 (* Constructors *)
+23 -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 clcw : t -> (Clcw.t, Clcw.error) result option 180 + (** [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} *) ··· 286 286 {!Wire.Codec.set} and batch bitfield reads via {!Wire.Codec.bitfield}. *) 287 287 288 288 val f_version : (int, packed_header) Wire.Codec.field 289 + (** Version number field (2 bits). *) 290 + 289 291 val f_scid : (int, packed_header) Wire.Codec.field 292 + (** Spacecraft identifier field (10 bits). *) 293 + 290 294 val f_vcid : (int, packed_header) Wire.Codec.field 295 + (** Virtual channel identifier field (3 bits). *) 296 + 291 297 val f_ocf_flag : (bool, packed_header) Wire.Codec.field 298 + (** Operational control field flag. *) 299 + 292 300 val f_mcfc : (int, packed_header) Wire.Codec.field 301 + (** Master channel frame count field (8 bits). *) 302 + 293 303 val f_vcfc : (int, packed_header) Wire.Codec.field 304 + (** Virtual channel frame count field (8 bits). *) 305 + 294 306 val f_sec_hdr : (bool, packed_header) Wire.Codec.field 307 + (** Secondary header flag. *) 308 + 295 309 val f_sync_flag : (bool, packed_header) Wire.Codec.field 310 + (** Synchronization flag. *) 311 + 296 312 val f_pkt_order : (bool, packed_header) Wire.Codec.field 313 + (** Packet order flag. *) 314 + 297 315 val f_seg_len_id : (int, packed_header) Wire.Codec.field 316 + (** Segment length identifier field (2 bits). *) 317 + 298 318 val f_first_hdr_ptr : (int, packed_header) Wire.Codec.field 319 + (** First header pointer field (11 bits). *) 299 320 300 321 (** {1 Header Wire Parse/Encode} *) 301 322
+2 -2
test/test_tm.ml
··· 132 132 let packed_header_testable = 133 133 Alcotest.testable 134 134 (fun ppf h -> 135 - Format.fprintf ppf 135 + Fmt.pf ppf 136 136 "{ver=%d scid=%d vcid=%d ocf=%b mcfc=%d vcfc=%d sec=%b sync=%b pkt=%b \ 137 137 seg=%d fhp=%d}" 138 138 h.Tm.version h.scid h.vcid h.ocf_flag h.mcfc h.vcfc h.sec_hdr ··· 212 212 let packed_frame_testable = 213 213 Alcotest.testable 214 214 (fun ppf (f : Tm.packed_frame) -> 215 - Format.fprintf ppf 215 + Fmt.pf ppf 216 216 "{ver=%d scid=%d vcid=%d ocf=%d mcfc=%d vcfc=%d sec=%b sync=%b pkt=%b \ 217 217 seg=%d fhp=%d data=%d ocf=%s fecf=%s}" 218 218 f.pf_version f.pf_scid f.pf_vcid f.pf_ocf_flag f.pf_mcfc f.pf_vcfc
+1
tm.opam
··· 6 6 maintainer: ["Thomas Gazagnaire <thomas@gazagnaire.org>"] 7 7 authors: ["Thomas Gazagnaire <thomas@gazagnaire.org>"] 8 8 license: "MIT" 9 + tags: ["org:blacksun" "aerospace" "codec" "ccsds" "binary"] 9 10 homepage: "https://tangled.org/gazagnaire.org/ocaml-tm" 10 11 bug-reports: "https://tangled.org/gazagnaire.org/ocaml-tm/issues" 11 12 depends: [