Repository navigation
vector: join channels already active in other applications - #112
Conversation
Discover active Vector channels with their current rates and reuse Config.External to join without initialization access or timing changes. Recheck on-bus state before opening and keep ordinary configured opens strict when another port owns initialization access. Share the classical and FD conformance setup between configured and joined ports. Exercise discovery, bidirectional traffic, both close orders, rejoining, and stale discovery through the public API, with an ASC trace artifact. Document that the owner must keep its measurement and timing stable while flashing. Validated with go test -race ./..., go vet ./..., gofmt, and Windows amd64/arm64/386 cross-compilation. Vector hardware and CANoe/BOOST flashing have not been run.
Two nodes with mismatched FD data timing cannot drive the sender bus-off: both reach error-passive after about 15 attempts, after which the sender sees only missing acknowledgements and its error counter stays at 128. The mismatched-timing test now asserts that both ends report FD errors and the receiver keeps running. The bus-off assertions move to a collision test: both channels queue colliding frames with the same identifier behind a long blocker frame. The node sending recessive at the first differing data bit takes a bit error on every collision and goes bus-off; the other stays open. Validated on a VN1630A with CH1 and CH2 back-to-back: both tests passed 10/10 and the Vector hardware suite passes.
Native retransmissions may reach bus-off before the test goroutine has queued every collision pair. Treat ErrBusOff from the losing sender as completion of fault injection, then retain the terminal error, event ordering, and surviving-peer assertions. Portable race tests, vet, formatting, and affected Windows amd64 compilation and vet pass. Hardware validation of the collision setup preceded this adjustment; it was not rerun here.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Pre-merge checks complete for HEAD |
Why
Allow BOOST to use gocan alongside an active CANoe or other test application, so automated flashing can share the existing Vector bus without changing its timing.
What changed
Config.Externalto join without requesting initialization access.Scope
Vector sharing only; existing configured opens remain strict about initialization access. No dependencies or BOOST application changes.
Risks
Discovery and the on-bus check cannot reserve another application's configuration. Its measurement and timing must remain stable while flashing.
Verification
go test -race ./...,go vet ./..., formatting and diff checks pass.