Skip to content

feat(canopen): monitor foreign SRDO and GFC captures passively - #459

Merged
dborgards merged 3 commits into
mainfrom
feat/foreign-srdo-monitor-401
Oct 26, 2026
Merged

dborgards merged 3 commits into
mainfrom
feat/foreign-srdo-monitor-401

Conversation

@dborgards

@dborgards dborgards commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

What does this change?

Closes #401. Analysis tools can continuously inspect SRDO pairs and GFCs through ForeignSrdoMonitor without a local CANopen node, object-dictionary writes or any transmissions. Prepared immutable mappings and explicit observer SCT/SRVT retain configuration provenance; producer snapshot refresh periods and CRC defaults are never inferred as observer limits.

The monitor evaluates capture-time order, inversion, format, length and deadlines independently per SRDO, returns immutable values and historical age, and discards current/pending data on faults. Bounded polling preserves captured timing despite delayed UI delivery. Subscription sequences/drop counters qualify gaps separately, with fresh-pair recovery and sticky incomplete trace quality. Each valid or malformed GFC candidate remains a distinct timestamped bus event without sender or safe-state attribution. Configuration replacement, startup, mid-pair joins after gaps or timing failures, recovery, timing insufficiency and ownership/disposal are documented in the package guide and FR-CO-061.

Type of change

  • feat — new behaviour (minor release)
  • fix / perf — bug or performance fix (patch release)
  • docs / test / refactor / chore / ci — no release
  • Breaking change (! in the title, plus a BREAKING CHANGE: footer explaining the migration)

Checklist

Validation also includes net48 compilation, generated API approval, requirements traceability and engineering checks. Controlled-clock cases cover delayed delivery, interleaved traffic, deadline boundaries/ties, startup/recovery, replacement, loss sequences/counters and saturation/wrap, GFC format/repetitions, immutability, ownership and zero transmissions. Fresh Cobertura entries for every new type have no missing lines or partial branches. Source mutations for inversion, capture timing, cross-gap pairing, GFC format, producer observer limits, SRVT expiry, accidental transmission and rejoin classification/history each produced failing assertions, then were restored.

@cursor

cursor Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
New safety-adjacent diagnostics with strict non-approval semantics; timing, capture gaps, and configuration mistakes could mislead operators if misread, but the design avoids OD writes and bus transmission.

Overview
Adds FR-CO-061 and a passive ForeignSrdoMonitor that supervises foreign SRDO pairs and GFCs from Raw CAN only—no local node, SDO, or transmissions.

ForeignSrdoConfiguration holds immutable mappings, explicit observer SRVT/SCT, provenance, and can be built from PeerSafetySnapshot (producer paths require both timing overrides). Poll returns bounded observations and per-SRDO state using host arrival timestamps, pairing/inversion rules aligned with the local consumer, SRVT/SCT deadlines, and optional ILossAwareSubscription gap/drop handling. GFCs on 001h are traced per occurrence without node or safe-state claims; ReplaceConfigurations starts a new evaluation period. Package README and SRS (EN/DE) document behavior and limits vs ObserveForeignSrdoAsync.

Reviewed by Cursor Bugbot for commit 6a1741f. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-10-26T05:39:31.843266Z ce35673 New commits
ℹ️ 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.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0c3a32f. Configure here.

Comment thread src/CanKit.Pro.CANopen/Safety/ForeignSrdoMonitor.cs
@dborgards
dborgards merged commit d74230b into main Oct 26, 2026
16 checks passed
@dborgards
dborgards deleted the feat/foreign-srdo-monitor-401 branch October 26, 2026 06:05
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.

CANopen Safety: add a receive-only foreign SRDO monitor with pairing and SRVT/SCT supervision

1 participant