8000 uds: separate NRC waiting and distinguish transmit retry exhaustion by tomrford · Pull Request #88 · tomrford/gocan · GitHub
[go: up one dir, main page]

Skip to content

uds: separate NRC waiting and distinguish transmit retry exhaustion - #88

Merged
tomrford merged 4 commits into
mainfrom
uds/await-nrc
Sep 24, 2026
Merged

tomrford merged 4 commits into
mainfrom
uds/await-nrc

Conversation

@tomrford
Copy link
Copy Markdown
Owner

Separate suppressed UDS sends into Send and SendAwaitNRC, making response waiting explicit at the call site while reusing the existing exchange loop. Initial P2 silence succeeds; ResponsePending still requires a final response within P2*.

This changes the public signatures: replace Send(ctx, request, false) with Send(ctx, request) and Send(ctx, request, true) with SendAwaitNRC(ctx, request). SendTesterPresent and SendECUReset become send-only and lose their boolean argument; waiting callers use SendAwaitNRC with the corresponding suppressed request.

Transmit retry-budget exhaustion, including the next cyclic occurrence, returns the last queue rejection without a misleading caller-deadline error. Caller cancellation/deadlines remain distinguishable. Preserve that rejection when expiry occurs inside a driver call, while retaining definite acceptance. Both ISO-TP constructors now reject negative retry timeouts.

Validation: go test -race ./..., go vet ./..., gofmt -l ., git diff --check, and Windows amd64/arm64/386 compilation passed. The added driver-expiry regression failed before the fix and passes afterwards. Existing lifecycle tests cover suppressed silence, final NRCs, pending completion/timeouts, cancellation, retention, and Flow Control failure. No physical hardware validation.

Diff size: production +63/−47 (net +16); tests +43/−25 (net +18).

Send, SendTesterPresent and SendECUReset are send-only again; callers
that want a suppressed request's negative response use SendAwaitNRC.
…P retry timeouts

gocan.Send and cyclic's next-occurrence bound now end retries with the
queue-full rejection alone, so callers no longer see context.DeadlineExceeded
for a deadline they did not set. isotp.New and NewFunctional reject a
negative TransmitRetryTimeout at construction.
@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 24, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T13:59:23.721996Z 327b5eb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tomrford
tomrford merged commit af3e896 into main Sep 24, 2026
1 check passed
@tomrford
tomrford deleted the uds/await-nrc branch September 24, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0