CCSDS Proximity-1 Space Link Protocol (211.0-B)
0
fork

Configure Feed

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

Add 8 new CCSDS/RFC protocol packages

- ocaml-rice: CCSDS 121.0-B lossless compression (Rice/Golomb)
- ocaml-udpcl: RFC 7122 UDP convergence layer for Bundle Protocol
- ocaml-erasure: CCSDS 131.5-B erasure correcting codes (GF(2^8))
- ocaml-short-ldpc: CCSDS 131.4-B short block-length LDPC
- ocaml-opm: CCSDS 502.0-B Orbit Parameter Message (KVN)
- ocaml-aem: CCSDS 504.0-B Attitude Ephemeris Message (KVN)
- ocaml-tdm: CCSDS 503.0-B Tracking Data Message (KVN)
- ocaml-rdm: CCSDS 508.1-B Re-entry Data Message (KVN)

+16 -36
+16 -36
test/test_proximity1.ml
··· 221 221 222 222 Frame: ver=0, scid=42, frame_type=Data(0), seq=1000, data="hello" 223 223 224 - Header layout (CCSDS 211.0-B-5): 225 - Byte 0-1 (U16be): Version(3b) | SCID(8b) | FrameType(3b) | Reserved(2b) 226 - ver=0 -> 000 227 - scid=42 -> 00101010 228 - type=0 -> 000 229 - reserved=0 -> 00 230 - Binary: 000_00101010_000_00 = 0000_0101_0100_0000 = 0x05 0x40 224 + Header layout (CCSDS 211.0-B-5): Byte 0-1 (U16be): Version(3b) | SCID(8b) | 225 + FrameType(3b) | Reserved(2b) ver=0 -> 000 scid=42 -> 00101010 type=0 -> 000 226 + reserved=0 -> 00 Binary: 000_00101010_000_00 = 0000_0101_0100_0000 = 0x05 227 + 0x40 231 228 232 - Byte 2: SeqHi = seq >> 16 = 1000 >> 16 = 0 -> 0x00 229 + Byte 2: SeqHi = seq >> 16 = 1000 >> 16 = 0 -> 0x00 233 230 234 - Byte 3-4 (U16be): SeqLo = seq & 0xFFFF = 1000 = 0x03E8 231 + Byte 3-4 (U16be): SeqLo = seq & 0xFFFF = 1000 = 0x03E8 235 232 236 - Byte 5-6 (U16be): FrameLength = header_size + data_len = 7 + 5 = 12 237 - = 0x000C 233 + Byte 5-6 (U16be): FrameLength = header_size + data_len = 7 + 5 = 12 = 0x000C 238 234 239 - Byte 7-11: "hello" = 0x68 0x65 0x6C 0x6C 0x6F 235 + Byte 7-11: "hello" = 0x68 0x65 0x6C 0x6C 0x6F 240 236 241 237 Total: 12 bytes. *) 242 238 let test_wire_format () = ··· 251 247 } 252 248 in 253 249 let encoded = Proximity1.encode t in 254 - let expected = 255 - "\x05\x40\x00\x03\xE8\x00\x0C\x68\x65\x6C\x6C\x6F" 256 - in 250 + let expected = "\x05\x40\x00\x03\xE8\x00\x0C\x68\x65\x6C\x6C\x6F" in 257 251 Alcotest.(check int) "wire format total length" 12 (String.length encoded); 258 252 (* Check each header byte individually for clear diagnostics *) 259 - Alcotest.(check int) 260 - "byte 0 (ver|scid high)" 0x05 261 - (Char.code encoded.[0]); 262 - Alcotest.(check int) 263 - "byte 1 (scid low|type|rsv)" 0x40 264 - (Char.code encoded.[1]); 265 - Alcotest.(check int) 266 - "byte 2 (seq_hi)" 0x00 267 - (Char.code encoded.[2]); 268 - Alcotest.(check int) 269 - "byte 3 (seq_lo high)" 0x03 270 - (Char.code encoded.[3]); 271 - Alcotest.(check int) 272 - "byte 4 (seq_lo low)" 0xE8 273 - (Char.code encoded.[4]); 274 - Alcotest.(check int) 275 - "byte 5 (frame_len high)" 0x00 276 - (Char.code encoded.[5]); 277 - Alcotest.(check int) 278 - "byte 6 (frame_len low)" 0x0C 279 - (Char.code encoded.[6]); 253 + Alcotest.(check int) "byte 0 (ver|scid high)" 0x05 (Char.code encoded.[0]); 254 + Alcotest.(check int) "byte 1 (scid low|type|rsv)" 0x40 (Char.code encoded.[1]); 255 + Alcotest.(check int) "byte 2 (seq_hi)" 0x00 (Char.code encoded.[2]); 256 + Alcotest.(check int) "byte 3 (seq_lo high)" 0x03 (Char.code encoded.[3]); 257 + Alcotest.(check int) "byte 4 (seq_lo low)" 0xE8 (Char.code encoded.[4]); 258 + Alcotest.(check int) "byte 5 (frame_len high)" 0x00 (Char.code encoded.[5]); 259 + Alcotest.(check int) "byte 6 (frame_len low)" 0x0C (Char.code encoded.[6]); 280 260 (* Full byte-exact comparison *) 281 261 Alcotest.(check string) "wire format exact bytes" expected encoded 282 262