CCSDS 133.0-B Space Packet Protocol for OCaml
0
fork

Configure Feed

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

ocaml-space-packet: enable MDX on lib/space_packet.mli

Run mdx on lib/space_packet.mli so the {[ ... ]} odoc block now
type-checks. The example referenced free `codec`, `buf`, `off`;
qualified the codec names to `Space_packet.codec` /
`Space_packet.bf_apid`, allocated a real `buf = Bytes.make 6 '\x00'`,
and added an `assert (apid = 0)` so the zero-copy field-getter
example documents what an empty buffer reads.

+10 -2
+4
lib/dune
··· 2 2 (name space_packet) 3 3 (public_name space-packet) 4 4 (libraries bytesrw fmt wire)) 5 + 6 + (mdx 7 + (files space_packet.mli) 8 + (libraries space-packet wire))
+6 -2
lib/space_packet.mli
··· 203 203 Bound field handles for zero-copy access to individual fields in a buffer 204 204 via {!Wire.Codec.get} and {!Wire.Codec.set}. For example: 205 205 {[ 206 - let get_apid = Wire.Staged.unstage (Wire.Codec.get codec bf_apid) 207 - let apid = get_apid buf off 206 + let get_apid = 207 + Wire.Staged.unstage (Wire.Codec.get Space_packet.codec Space_packet.bf_apid) 208 + 209 + let buf = Bytes.make 6 '\x00' 210 + let apid = get_apid buf 0 211 + let () = assert (apid = 0) 208 212 ]} *) 209 213 210 214 val bf_version : (int, t) Wire.Codec.field