CCSDS File Delivery Protocol (CCSDS 727.0-B-5) for space file transfer
0
fork

Configure Feed

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

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+19 -19
+1 -1
.ocamlformat
··· 1 - version = 0.28.1 1 + version = 0.29.0
+3 -3
lib/cfdp.ml
··· 1133 1133 let buf_len = String.length buf in 1134 1134 if buf_len < total_len + crc_len then 1135 1135 truncated ~need:(total_len + crc_len) ~have:buf_len 1136 - else begin 1136 + else 1137 1137 (* Verify CRC if present *) 1138 - if header.crc_present then begin 1138 + begin if header.crc_present then begin 1139 1139 let expected = crc16_ccitt_sub (Bytes.of_string buf) 0 total_len in 1140 1140 let actual = u16_be buf total_len in 1141 1141 if expected <> actual then Error (Crc_mismatch { expected; actual }) ··· 1168 1168 header.data_len 1169 1169 in 1170 1170 Ok (Pdu_file_data (header, fd), total_len) 1171 - end 1171 + end 1172 1172 1173 1173 (* {1 State Machines} *) 1174 1174
+15 -15
lib/eio/cfdp_eio.mli
··· 15 15 {2 Quick Start} 16 16 17 17 {[ 18 - Eio_main.run @@ fun env -> 19 - Eio.Switch.run @@ fun sw -> 20 - let conn = 21 - Cfdp_eio.connect ~sw ~net:env#net ~host:"flatsat-1" ~port:1734 () 22 - in 23 - let result = 24 - Cfdp_eio.Sender.send_file conn ~src:(Fpath.v "firmware.elf") 25 - ~dst:"firmware.elf" 26 - ~on_progress:(fun p -> 27 - Printf.printf "\r%Ld/%Ld" p.bytes_sent p.bytes_total) 28 - () 29 - in 30 - match result with 31 - | Ok tid -> Printf.printf "\nDone: %a\n" Cfdp.pp_transaction_id tid 32 - | Error msg -> Printf.eprintf "Error: %s\n" msg 18 + Eio_main.run @@ fun env -> 19 + Eio.Switch.run @@ fun sw -> 20 + let conn = 21 + Cfdp_eio.connect ~sw ~net:env#net ~host:"flatsat-1" ~port:1734 () 22 + in 23 + let result = 24 + Cfdp_eio.Sender.send_file conn ~src:(Fpath.v "firmware.elf") 25 + ~dst:"firmware.elf" 26 + ~on_progress:(fun p -> 27 + Printf.printf "\r%Ld/%Ld" p.bytes_sent p.bytes_total) 28 + () 29 + in 30 + match result with 31 + | Ok tid -> Printf.printf "\nDone: %a\n" Cfdp.pp_transaction_id tid 32 + | Error msg -> Printf.eprintf "Error: %s\n" msg 33 33 ]} 34 34 35 35 {2 Wire Format}