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.

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+26 -10
+19 -10
README.md
··· 19 19 20 20 ## Installation 21 21 22 + Install with opam: 23 + 24 + ```sh 25 + $ opam install tm 22 26 ``` 23 - opam install tm 27 + 28 + If opam cannot find the package, it may not yet be released in the public 29 + `opam-repository`. Add the overlay repository, then install it: 30 + 31 + ```sh 32 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 33 + $ opam update 34 + $ opam install tm 24 35 ``` 25 36 26 37 ## Usage 27 38 28 39 ```ocaml 29 40 (* Create a TM frame *) 30 - let scid = Tm.scid_exn 100 in 31 - let vcid = Tm.vcid_exn 2 in 32 - let data = String.make 1103 '\x00' in 33 - let frame = Tm.v ~scid ~vcid ~mcfc:1 ~vcfc:2 data in 34 - 41 + let scid = Tm.scid_exn 100 42 + let vcid = Tm.vcid_exn 2 43 + let data = String.make 1103 '\x00' 44 + let frame = Tm.v ~scid ~vcid ~mcfc:1 ~vcfc:2 data 35 45 (* Encode to bytes *) 36 - let bytes = Tm.encode frame in 37 - 46 + let bytes = Tm.encode frame 38 47 (* Decode from bytes *) 39 48 match Tm.decode bytes with 40 49 | Ok frame -> Printf.printf "SCID: %d\n" (Tm.scid_to_int frame.header.scid) ··· 53 62 if clcw.flags.lockout then print_endline "FARM-1 in lockout!" 54 63 55 64 (* Create a CLCW *) 56 - let clcw = Tm.clcw ~vcid ~report_value:42 ~lockout:false () in 57 - let ocf_word = Tm.encode_clcw clcw in 65 + let clcw = Tm.clcw ~vcid ~report_value:42 ~lockout:false () 66 + let ocf_word = Tm.encode_clcw clcw 58 67 ``` 59 68 60 69 ## Frame Structure
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries tm))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 3 4 (name tm) 4 5 ··· 26 27 (fmt (>= 0.1)) 27 28 (wire (>= 0.1)) 28 29 (alcotest :with-test) 30 + (mdx :with-test) 29 31 (alcobar :with-test)))
+1
tm.opam
··· 17 17 "fmt" {>= "0.1"} 18 18 "wire" {>= "0.1"} 19 19 "alcotest" {with-test} 20 + "mdx" {with-test} 20 21 "alcobar" {with-test} 21 22 "odoc" {with-doc} 22 23 ]