Repository navigation
Conversation
amolypalshetkar
force-pushed
the
feat/easycat-shutdown-and-tunable-timeouts
branch
from
November 14, 2026 10:56
0a0a2e9 to
e20a2a7
Compare
leducp
reviewed
Nov 16, 2026
leducp
reviewed
Nov 16, 2026
leducp
reviewed
Nov 16, 2026
- Handle SIGINT/SIGTERM so main() returns and the socket destructor runs, releasing a TAP slot (otherwise a rerun hits "Socket is full"). - Add --timeout, --rt-timeout and --watchdog arguments (milliseconds, defaulting to the existing 2 / 10 / 100 ms) so a slow software bus over a real NIC can be retuned at runtime without changing the defaults. - Keep process data flowing during the SAFE-OP wait and don't insert slow per-slave state reads before the first cyclic exchange, so the SyncManager watchdog stays fed across the OP transition.
amolypalshetkar
force-pushed
the
feat/easycat-shutdown-and-tunable-timeouts
branch
from
November 16, 2026 15:10
e20a2a7 to
e1d86a4
Compare
leducp
approved these changes
Nov 16, 2026
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against e1d86a4 |
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.
What
Three independent robustness improvements to the
easycatexample:SIGINT/SIGTERMhandler sets a flag so the cyclic loopexits and
main()returns, running the socket destructor.Bus::initPDIO watchdogare now
#ifndef-guarded#defines defaulting to the existing hard-codedvalues (
KICKCAT_READ_TIMEOUT_MS=2,KICKCAT_RT_TIMEOUT_MS=10,KICKCAT_INIT_WATCHDOG_MS=100, where 0 disables the watchdog). A stock build isbyte-for-byte behaviour-identical; a slow bus can be retuned at build time.
SAFE-OP wait and don't insert slow per-slave state reads before the first cyclic
exchange, so the SyncManager watchdog stays fed through the transition.
Why
TAP transport that leaves the endpoint slot marked and the next run fails with
TapSocket: Socket is full.defaults can expire mid-transition and the slaves trip
SYNC_MANAGER_WATCHDOGwhen entering OP. Exposing the values as opt-in buildknobs fixes that without changing defaults for everyone.
Testing
With the watchdog/timeouts raised at build time, all slaves reach and hold
OPERATIONAL with live PDO over a slow bus; with defaults, behaviour matches
upstream. SIGINT cleanly frees the TAP slot for an immediate rerun.
Notes
Defaults are deliberately unchanged — the knobs are for slow/non-RT transports and
are documented inline at the top of the file.