Repository navigation
docs: split the README into integration, API and design docs - #11
Merged
Merged
Conversation
The README becomes a landing page, with installation and buffer sizing in docs/integration.md, the API and scaled-field semantics in docs/api.md, and the wire format, range argument and verification in docs/design.md, which absorbs the large-payload verification record. A docs example test compiles every C block, and CONTRIBUTING.md and AGENTS.md follow the shared primitives structure. Refs #10
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #10
Summary
README.md: a landing page (82 lines) with a compiled quick start, description, validated toolchains and links.docs/integration.md: requirements, copy-in, Meson subproject, installed package, buffer sizing andPPACK_PAYLOAD_BITS, build and test, cross builds in generic wording.docs/api.md: field descriptors, pack and unpack, error codes with their check order, scaled-field semantics, and recipes (CAN-FD frame, narrow scaled field, round to nearest, stored record).docs/design.md: goals and non-goals, wire format, addressing models, range argument, scaled arithmetic, failure behaviour, cost, MISRA position, verification. It absorbsdocs/large-payload-verification.md, which is deleted.CONTRIBUTING.mdandAGENTS.mdin the shared primitives structure, keeping the MISRA deviation process, the wire-format stability rules and the legacy-comparison commands.ppack docs examplestest viatests/docs/check_snippets.py.src/ppack.c: theGLOBAL PROTOTYPESbanner above the function definitions now readsGLOBAL FUNCTIONS, the banner the shared structure names. Comment only.Verification of documented values
Each value was checked with a scratch probe built under ASan, UBSan and float-cast-overflow, natively and with
PPACK_SIMULATE_16BIT_MAU; both models agree:B8 0B F6 FF E2 04 00 00and the round trip.UINT321e10 gives 4294967040,INT32-1e10 gives -2147483648,INT16+inf gives 32767, NaN gives-PPACK_ERR_INVALARG.UINT16carries 5000 as 904; 12-bitINT16carries 2048 as -2048; the 10-bit thermal field carries 260 °C as raw 176, 4 °C, and the recipe's clamp keeps 215.75.UINT160x1234 gives34 12 00, 24-bitINT16-2 givesFE FF FF.-PPACK_ERR_NULLPTR; unknown type with zero width gives-PPACK_ERR_INVALARG.-PPACK_ERR_OVERFLOW, unpack returnsoffset.-PPACK_ERR_OVERFLOW.Checks
meson test: 3 of 3 pass under ASan and UBSan (native, simulated, docs examples).ppack_packcall fails it atdocs/api.md:137; reverted.check_links.py: 29 relative links, 0 broken. The 2.5.0 CHANGELOG entry now links to the verification record at thev2.5.0tag.scripts/format.sh: 28 files match.Routing ledger
api.mdother usesintegration.mdrequirementsintegration.mdPPACK_PAYLOAD_BITSoverrideintegration.mdbuffer sizingapi.mdrecipesintegration.md,CONTRIBUTING.mdapi.mddesign.md,api.mdfield descriptorsapi.mdscaled fields; clamp rationale indesign.mdintegration.mdbuild and testdesign.mdnon-goalsdesign.md,api.md,integration.mddesign.mdrange argumentdesign.mdverification; commands inCONTRIBUTING.mdapi.mdconventions and stored record;design.mdnon-goalsDropped with reason:
Not changed
The header Doxygen and code semantics. Scaled fields saturate to the type's range, not the field width, so a narrow scaled field wraps; this is documented as current behaviour with a call-site clamp recipe, not changed.