feat(examples): add ACF-LIN talker/listener example#138
Open
SoundMatt wants to merge 1 commit into
Open
Conversation
Add a pair of example applications demonstrating use of the ACF-LIN PDU (IEEE Std. 1722-2016, chapter 9.4.5): - acf-lin-talker: sends a simulated LIN frame once per second over Ethernet (raw TSN) or UDP, carrying a single-byte incrementing counter as payload. Supports NTSCF and TSCF control formats. - acf-lin-listener: receives ACF-LIN packets and prints the LIN bus ID, identifier, message timestamp, and raw payload bytes to stdout. CLI options follow the same conventions as the other examples: -t/--tscf, -u/--udp, -i/--ifname, -d/--dst-addr, -n/--dst-nw-addr (talker); -u/--udp, -i/--ifname, -d/--dst-addr, -p/--udp-port (listener). Both binaries are linked against the existing open1722 and open1722examples libraries. The new subdirectory is wired into the Linux-only block in examples/CMakeLists.txt. Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
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.
Closes #21
Summary
Adds a pair of Linux example applications for the ACF-LIN PDU format (IEEE Std. 1722-2016, chapter 9.4.5):
examples/acf-lin/acf-lin-talker.cexamples/acf-lin/acf-lin-listener.cexamples/acf-lin/CMakeLists.txthello-worldpattern)examples/CMakeLists.txtgains anadd_subdirectory(acf-lin)inside the existing Linux-only block.Design
Since LIN has no standard Linux socket API (unlike SocketCAN for CAN), the talker simulates LIN data — an incrementing single-byte counter — sent periodically. Both tools follow the CLI conventions of the other examples:
Talker options
-t/--tscf— use TSCF instead of NTSCF-u/--udp— use UDP instead of Ethernet-i/--ifname IFNAME— Ethernet interface-d/--dst-addr MACADDR— destination MAC-n/--dst-nw-addr HOST:PORT— UDP destination--lin-bus-id N— LIN bus ID (0-31, default 0)--lin-id N— LIN frame identifier (0-63, default 1)Listener options
-u/--udp,-i/--ifname,-d/--dst-addr,-p/--udp-portTest plan