Repository navigation
V1 Header support WIP - #215
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #215 +/- ##
=======================================
Coverage ? 99.54%
=======================================
Files ? 60
Lines ? 9221
Branches ? 228
=======================================
Hits ? 9179
Misses ? 41
Partials ? 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
…readability Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
…asons Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
d921230 to
612bc37
Compare
…e instrumentation Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unaligned field access, unchecked receive lengths, and incorrect V0 sequence wrap handling can cause runtime failures.
Review effort: Balanced
Findings: 2
Open (4)
What changed in this PR
Adds IEEE 1722-2025 V1 header support while retaining V0 compatibility.
Changes:
- Adds versioned headers, accessors, validation, and tests.
- Updates ACF examples for selectable V0/V1 transport.
- Inlines field access and adds performance benchmarks.
| File | Description |
|---|---|
unit/test-tscf.c |
Expands TSCF version tests. |
unit/test-ntscf.c |
Expands NTSCF version tests. |
unit/test-cvf.c |
Adds CVF V1 coverage. |
unit/test-commonstreamheader.c |
Tests common stream headers. |
unit/test-commonheader.c |
Tests version support. |
unit/test-avtp.c |
Removes legacy API tests. |
unit/test-alternativeheader.c |
Tests alternative headers. |
unit/test-aaf.c |
Adds AAF V1 coverage. |
unit/CMakeLists.txt |
Registers tests and adjusts coverage. |
src/avtp/Utils.c |
Removes out-of-line field engine. |
src/avtp/export/InlineExports.c |
Exports inline APIs. |
src/avtp/CommonHeader.c |
Removes out-of-line common header code. |
include/avtp/Utils.h |
Inlines field access. |
include/avtp/CommonHeader.h |
Adds inline version-aware common API. |
include/avtp/AlternativeHeader.h |
Adds alternative-header API. |
examples/hello-world/hello-world-talker.c |
Uses typed V0 accessors. |
examples/cvf/cvf-talker.c |
Uses typed V0 accessors. |
examples/cvf/cvf-listener.c |
Uses typed V0 accessors. |
examples/crf/crf-talker.c |
Uses typed V0 accessors. |
examples/crf/crf-listener.c |
Uses typed V0 accessors. |
examples/acf-vss/acf-vss-talker.c |
Uses typed V0 accessors. |
examples/acf-can/zephyr/Kconfig |
Adds header-version settings. |
examples/acf-can/zephyr/acf-can-bridge.c |
Selects V0/V1 formats. |
examples/acf-can/linux/README.md |
Documents version options. |
examples/acf-can/linux/acf-can-talker.c |
Adds runtime format selection. |
examples/acf-can/linux/acf-can-listener.c |
Widens sequence tracking. |
examples/acf-can/linux/acf-can-bridge.c |
Adds runtime format selection. |
examples/acf-can/linux-kernel-mod/Makefile |
Removes obsolete objects. |
examples/acf-can/linux-kernel-mod/1722ethernet.c |
Uses typed V0 accessors. |
examples/acf-can/acf-can-common.h |
Extends format API. |
examples/acf-can/acf-can-common.c |
Encodes and decodes all variants. |
examples/aaf/aaf-talker.c |
Uses typed V0 accessors. |
examples/aaf/aaf-listener.c |
Uses typed V0 accessors. |
docs/inline.md |
Documents inline exports and coverage. |
docs/api-design.md |
Documents versioned APIs. |
CMakeLists.txt |
Adds benchmark subdirectory. |
bench/README.md |
Documents benchmarks. |
bench/CMakeLists.txt |
Defines benchmark target. |
bench/check-folding.sh |
Checks accessor optimization. |
bench/bench-field-access.c |
Benchmarks accessor performance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
| uint8_t header[AVTP_NTSCF_HEADER_LEN]; | ||
| uint8_t header[AVTP_NTSCF_HEADER_LEN_V0]; | ||
| uint8_t payload[0]; | ||
| } __attribute__((packed)) Avtp_Ntscf_t; |
There was a problem hiding this comment.
How about also adding typedef struct Avtp_Ntscf_t Avtp_NtscfV0_t?
Same for TSCF as well. We have then both versions of the format explicitly. By default version 0 gets chosen.
There was a problem hiding this comment.
now we have an explicit Avtp_NtscfV0_t , Avtp_Ntscf_t is typedeffed to V0, but also enables agnostic accessors. Init gets a a version where you device at RUNTIME (parameter) whether you want V0 or V1. Other places where it applies use a similar pattern.
Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
…eneric alias that can be used for version agnostic access Signed-off-by: Sebastian Schildt <sebastian.schildt@hs-heilbronn.de>
nayakned
left a comment
There was a problem hiding this comment.
Code and APIs look good. CAN examples tested with CAN, CANV2 formats using NTSCF v0 and v1 combinations.
PCAPs looked as expected.


Some additions and refactoring to support 2025 V1 Common header
High Level Description:
-v0or_v1(see Readme for details)How to review?
As you like. Changes are mostly mechanical, to not get lost I do recommend
Note to copilot: This does break API. And that is ok.