SpaceWire (ECSS-E-ST-50-12C) and RMAP (ECSS-E-ST-50-52C)
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.

+22 -6
+15 -6
README.md
··· 23 23 24 24 ## Installation 25 25 26 + Install with opam: 27 + 28 + ```sh 29 + $ opam install spacewire 26 30 ``` 27 - opam install spacewire 31 + 32 + If opam cannot find the package, it may not yet be released in the public 33 + `opam-repository`. Add the overlay repository, then install it: 34 + 35 + ```sh 36 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 37 + $ opam update 38 + $ opam install spacewire 28 39 ``` 29 40 30 41 ## Usage 31 42 32 43 ```ocaml 33 44 (* Create and encode a SpaceWire packet *) 34 - let pkt = Spacewire.packet_exn ~address:[1; 5] ~cargo:"sensor data" EOP in 35 - let bytes = Spacewire.encode_packet pkt in 36 - 45 + let pkt = Spacewire.packet_exn ~address:[1; 5] ~cargo:"sensor data" EOP 46 + let bytes = Spacewire.encode_packet pkt 37 47 (* Decode *) 38 48 match Spacewire.decode_packet bytes with 39 49 | Ok decoded -> Printf.printf "cargo: %s\n" (Spacewire.cargo decoded) ··· 48 58 ~key:42 ~initiator_logical_address:0xFE 49 59 ~transaction_id:1 ~address:0x1000L ~data_length:256 () 50 60 in 51 - let encoded = Spacewire.encode_rmap_command ~target_logical_address:0x50 cmd in 52 - 61 + let encoded = Spacewire.encode_rmap_command ~target_logical_address:0x50 cmd 53 62 match Spacewire.decode_rmap_command encoded with 54 63 | Ok (target, decoded) -> 55 64 Printf.printf "target: 0x%02X, tid: %d\n"
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries spacewire))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 3 4 (name spacewire) 4 5 ··· 24 25 (wire (>= 0.1)) 25 26 (alcotest :with-test) 26 27 (alcobar :with-test) 28 + (mdx :with-test) 27 29 (odoc :with-doc)))
+1
spacewire.opam
··· 16 16 "wire" {>= "0.1"} 17 17 "alcotest" {with-test} 18 18 "alcobar" {with-test} 19 + "mdx" {with-test} 19 20 "odoc" {with-doc} 20 21 ] 21 22 build: [