CCSDS Space Data Link Security (355.0-B-2)
0
fork

Configure Feed

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

Add c/ directories with EverParse 3D generation for 15 Wire packages

Creates c/gen.ml + c/dune + generated .3d files for every package
that defines Wire codecs. Each gen.ml calls Wire_3d.main to project
the OCaml Wire codec definition to EverParse 3D format.

Packages: FSR, PUS, GPT, MBR, PID1, LTP, TCPCL (8 codecs), UDPCL,
AX.25, CFDP (3 fixed-size codecs), SDLS (EP header + MC status),
SpaceWire, RPMsg, SquashFS (5 codecs), SpaceFibre.

Codecs with Wire.Param.input (variable-size) are excluded from 3D
generation: CFDP header/eof/metadata/keep-alive, SDLS security
header/trailer, PUS tm_header/hk_param.

Proximity-1 and space-wire excluded: proximity-1 has only variable-
size codecs, space-wire has its own C generation approach.

Fixes E900 (17→2) and E905 (remaining MBR Partition.struct_).

+88
+18
c/EP_Header.3d
··· 1 + extern typedef struct _WireCtx WireCtx 2 + 3 + extern unit WireSetU8(mutable WireCtx *ctx, UINT32 idx, UINT8 v) 4 + 5 + extern unit WireSetU16BE(mutable WireCtx *ctx, UINT32 idx, UINT16BE v) 6 + 7 + entrypoint 8 + typedef struct _EP_Header(mutable WireCtx *ctx) 9 + { 10 + UINT8 Type : 1 {:act WireSetU8(ctx, (UINT32) 0, Type); }; 11 + UINT8 UF : 1 {:act WireSetU8(ctx, (UINT32) 1, UF); }; 12 + UINT8 _anon_0 : 2; 13 + UINT8 PID : 4 {:act WireSetU8(ctx, (UINT32) 3, PID); }; 14 + UINT8 SG : 2 {:act WireSetU8(ctx, (UINT32) 2, SG); }; 15 + UINT16BE PDU_LEN {:on-success WireSetU16BE(ctx, (UINT32) 4, PDU_LEN); return true; }; 16 + } EP_Header; 17 + 18 +
+15
c/MC_Status_Reply.3d
··· 1 + extern typedef struct _WireCtx WireCtx 2 + 3 + extern unit WireSetU8(mutable WireCtx *ctx, UINT32 idx, UINT8 v) 4 + 5 + extern unit WireSetU16BE(mutable WireCtx *ctx, UINT32 idx, UINT16BE v) 6 + 7 + entrypoint 8 + typedef struct _MC_Status_Reply(mutable WireCtx *ctx) 9 + { 10 + UINT8 Operational {:on-success WireSetU8(ctx, (UINT32) 0, Operational); return true; }; 11 + UINT16BE KeyCount {:on-success WireSetU16BE(ctx, (UINT32) 1, KeyCount); return true; }; 12 + UINT16BE SACount {:on-success WireSetU16BE(ctx, (UINT32) 2, SACount); return true; }; 13 + } MC_Status_Reply; 14 + 15 +
+14
c/dune
··· 1 + (executable 2 + (name gen) 3 + (modules gen) 4 + (libraries sdls wire.3d)) 5 + 6 + (rule 7 + (mode promote) 8 + (alias gen) 9 + (targets dune.inc) 10 + (deps gen.exe) 11 + (action 12 + (run ./gen.exe dune))) 13 + 14 + (include dune.inc)
+35
c/dune.inc
··· 1 + (rule 2 + (alias gen) 3 + (mode promote) 4 + (targets EP_Header.3d MC_Status_Reply.3d) 5 + (deps gen.exe) 6 + (action 7 + (run ./gen.exe 3d))) 8 + 9 + (rule 10 + (alias gen) 11 + (mode fallback) 12 + (targets EverParse.h EverParseEndianness.h EP_Header.h EP_Header.c MC_Status_Reply.h MC_Status_Reply.c test.c) 13 + (deps gen.exe EP_Header.3d MC_Status_Reply.3d) 14 + (action 15 + (run ./gen.exe c))) 16 + 17 + (rule 18 + (alias runtest) 19 + (deps test.c EverParse.h EverParseEndianness.h EP_Header.h EP_Header.c MC_Status_Reply.h MC_Status_Reply.c) 20 + (action 21 + (system 22 + "cc -std=c11 -Wall -Wextra -Werror -o test_sdls test.c EP_Header.c MC_Status_Reply.c && ./test_sdls"))) 23 + 24 + (install 25 + (package sdls) 26 + (section lib) 27 + (files 28 + (EP_Header.3d as c/EP_Header.3d) 29 + (MC_Status_Reply.3d as c/MC_Status_Reply.3d) 30 + (EP_Header.h as c/EP_Header.h) 31 + (EP_Header.c as c/EP_Header.c) 32 + (MC_Status_Reply.h as c/MC_Status_Reply.h) 33 + (MC_Status_Reply.c as c/MC_Status_Reply.c) 34 + (EverParse.h as c/EverParse.h) 35 + (EverParseEndianness.h as c/EverParseEndianness.h)))
+6
c/gen.ml
··· 1 + let () = 2 + Wire_3d.main ~package:"sdls" 3 + [ 4 + Wire.Everparse.schema Sdls.Ep.codec; 5 + Wire.Everparse.schema Sdls.Ep.mc_status_reply_codec; 6 + ]