Skip to content

lin: send the diagnostic slave response (0x3D) only once - #454

Draft
KonradBreitsprecherBkd wants to merge 1 commit into
mainfrom
private/visbkd/COE-96025_lin_0x3d_diag_response
Draft

KonradBreitsprecherBkd wants to merge 1 commit into
mainfrom
private/visbkd/COE-96025_lin_0x3d_diag_response

Conversation

@KonradBreitsprecherBkd

Copy link
Copy Markdown
Contributor

Subject

Bugfix, LIN.

Description

A LIN slave with ID 0x3D configured as TxUnconditional answered every 0x3D header with the last data. The LIN specification defines the SlaveResp frame differently: a slave answers only if a response is pending, and only once.

For a non-dynamic slave, SetFrameResponse and UpdateTxBuffer on 0x3D now make the response pending; Init does not. The next 0x3D header sends it once. Without a pending response, the slave reports LIN_RX_NO_RESPONSE to the master in the trivial simulation, or stays silent if a dynamic node is present. Other IDs, masters and dynamic mode are unchanged. Masters on older SIL Kit versions work, because the master passes the slave's status through.

No API, ABI or wire format change. The network simulator needs the same change, prepared separately.

Instructions for review / testing

  • LinController.cpp: the pending flag; SimBehaviorTrivial::ProcessFrameHeaderRequest: the 0x3D decision.
  • New unit tests Test_LinControllerTrivialSimDiagResponse.* (9 cases).
  • Known limitation, unchanged: in the trivial simulation, two or more slaves with 0x3D as TxUnconditional still make the master report LIN_RX_ERROR.

Developer checklist (address before review)

  • Changelog.md updated
  • Prepared update for depending repositories
  • Documentation updated (public API changes only)
  • API docstrings updated (public API changes only)
  • Rebase → commit history clean
  • Squash and merge → proper PR title

🤖 Generated with Claude Code

@KonradBreitsprecherBkd KonradBreitsprecherBkd added the status: needs discussion Proposal for internal changes. We need to agree on the approach before a detailed review. label Nov 6, 2026
A LIN slave with ID 0x3D configured as TxUnconditional answered every 0x3D
header with the last data. The LIN specification defines the SlaveResp frame
differently: a slave answers only if it has a response pending, and only once.

For a non-dynamic slave, SetFrameResponse and UpdateTxBuffer on 0x3D now make
the response pending; Init does not. The next 0x3D header sends it once. Without
a pending response the slave reports LIN_RX_NO_RESPONSE to the master (trivial
simulation), or stays silent if a dynamic node is present. Other IDs, masters
and dynamic mode are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
@KonradBreitsprecherBkd
KonradBreitsprecherBkd force-pushed the private/visbkd/COE-96025_lin_0x3d_diag_response branch from b9b6187 to 9e17af7 Compare November 6, 2026 11:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs discussion Proposal for internal changes. We need to agree on the approach before a detailed review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant