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.

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_).

+68
+19
c/RmapInstruction.3d
··· 1 + extern typedef struct _WireCtx WireCtx 2 + 3 + extern unit WireSetU8(mutable WireCtx *ctx, UINT32 idx, UINT8 v) 4 + 5 + entrypoint 6 + typedef struct _RmapInstruction(mutable WireCtx *ctx) 7 + { 8 + UINT8 _anon_0 : 7; 9 + UINT8 reserved : 1 {:act WireSetU8(ctx, (UINT32) 0, reserved); }; 10 + UINT8 command : 1 {:act WireSetU8(ctx, (UINT32) 1, command); }; 11 + UINT8 write : 1 {:act WireSetU8(ctx, (UINT32) 2, write); }; 12 + UINT8 verify : 1 {:act WireSetU8(ctx, (UINT32) 3, verify); }; 13 + UINT8 ack : 1 {:act WireSetU8(ctx, (UINT32) 4, ack); }; 14 + UINT8 increment : 1 {:act WireSetU8(ctx, (UINT32) 5, increment); }; 15 + UINT8 _anon_1 : 6; 16 + UINT8 reply_addr_len : 2 {:act WireSetU8(ctx, (UINT32) 6, reply_addr_len); }; 17 + } RmapInstruction; 18 + 19 +
+14
c/dune
··· 1 + (executable 2 + (name gen) 3 + (modules gen) 4 + (libraries spacewire 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)
+32
c/dune.inc
··· 1 + (rule 2 + (alias gen) 3 + (mode promote) 4 + (targets RmapInstruction.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 RmapInstruction.h RmapInstruction.c test.c) 13 + (deps gen.exe RmapInstruction.3d) 14 + (action 15 + (run ./gen.exe c))) 16 + 17 + (rule 18 + (alias runtest) 19 + (deps test.c EverParse.h EverParseEndianness.h RmapInstruction.h RmapInstruction.c) 20 + (action 21 + (system 22 + "cc -std=c11 -Wall -Wextra -Werror -o test_spacewire test.c RmapInstruction.c && ./test_spacewire"))) 23 + 24 + (install 25 + (package spacewire) 26 + (section lib) 27 + (files 28 + (RmapInstruction.3d as c/RmapInstruction.3d) 29 + (RmapInstruction.h as c/RmapInstruction.h) 30 + (RmapInstruction.c as c/RmapInstruction.c) 31 + (EverParse.h as c/EverParse.h) 32 + (EverParseEndianness.h as c/EverParseEndianness.h)))
+3
c/gen.ml
··· 1 + let () = 2 + Wire_3d.main ~package:"spacewire" 3 + [ Wire.Everparse.schema Spacewire.rmap_instruction_codec ]