Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/requirements/SRS-CanKit.Pro-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ As-is state (2026-10-09): shipped as `CanKit.Pro.CANopen`. The scope of the devi
| FR-CO-057 | The system MUST send and receive SAM and DAM MPDOs (mapping count FEh/FFh), event-driven only, with at most one SAM producer. Scanner and dispatcher lists including sub-index blocks, addressed and broadcast DAM reception and EMCY 8230h on an unavailable DAM target are implemented. PDO observation delivers the transferred multiplexer and four data bytes. | Must | CanOpenPdoEngineTests.Destination_Mpdo_Addresses_Local_Objects_And_Reports_Unavailable_Ones, Source_Mpdo_Uses_Scanner_And_Dispatcher_And_Has_One_Producer; CanOpenForeignPdoObserveTests.Observe_Extended_Bit_Mapping_And_Mpdo_From_The_File. | CiA 301 §7.2.3, §7.5.2.39/40; user assignment PDO extensions |
| FR-CO-058 | As SRD per CiA 319 v2.0.0 §5.3 step 4 the system MUST, on the write of A5h to 13FEh — via SDO, locally or from a device description —, recalculate the checksum of every existing SRDO (sub1 ≠ 0 — also a reserved value 3..255, which only a corruption leaves behind, counts as existing and fails the checksum; a deleted one has no configuration to protect, and §9.5 does not check it, as FR-CO-044) over the record as it stands in the dictionary — all mapping slots raw, the inverted ones included, not synthesised from the plain slots (`SrdoRecords.RecordChecksum`; the same computation applies to FR-CO-038) —, compare it with 13FFh:n and on a deviation set 13FEh to 00h at once, in the same write, so that the configuration entity's readback (FR-CO-051, step 4) sees it. Per §5.4 the same check MUST run after Reset Node and Reset Communication over the restored values before the boot-up is sent; the values themselves are restored unchanged (FR-CO-035), only 13FEh is cleared on a deviation. The check on the transition to OPERATIONAL (FR-CO-038) remains. | Must | Virtual-loopback integration test (`CanOpenSafetyNodeTests.Writing_A5h_Over_A_Wrong_Checksum_Sets_13FEh_Back_To_Zero_At_Once`: deviation → 00h, matching again → A5h, a deleted SRDO is not compared; `A_Stored_Configuration_That_Does_Not_Match_Its_Checksum_Comes_Back_Invalid`: a record changed behind the dictionary — the refresh time, an inverted mapping slot, or the direction to a reserved value — is stored with A5h, restored and 13FEh cleared in the reset pass; `CanOpenSafetyDeviceDescriptionTests.A_Wrong_Checksum_In_The_File_Loads_Without_A_Finding_But_The_Configuration_Is_Not_Valid`: the file as power-on state). | CiA 319 v2.0.0 §5.3 step 4, §5.4; #308 |
| FR-CO-059 | The system MUST, with `CanOpenNodeOptions.SrdoConfigurationCheckInterval` (default null = off; a value ≤ 0 → `ArgumentOutOfRangeException`), repeat the check of FR-CO-058 periodically as long as 13FEh = A5h (CiA 319 v2.0.0 §5.3: "the SRD should validate the consistency of its safety-related configuration by periodically recalculating the CRC" — a "should", and the norm names no interval, hence opt-in); additionally it MUST compare the checksum-relevant objects of the SRDOs existing at the time (record, mapping, 13FFh:n; a deleted SRDO has nothing to protect and is not included) byte-wise with the image taken under the write gate on the A5h write or after the reset — every write to one of them clears 13FEh, so every deviation from it while A5h stands arose behind the dictionary, also a direction that now reads 0 or reserved; the engine's view is not consulted, because a regular deletion with commit may pre-empt it. A deviation sets 13FEh to 00h and MUST in OPERATIONAL invalidate every SRDO as on the transition (FR-CO-038) — `ConfigurationInvalid`, or no longer present (reason null) if its record reads as deleted — and end the send period as leaving OPERATIONAL does (FR-CO-039): neither a waiting pair nor one already queued on the send chain nor the inverted half of a running one goes out; a consumer reports invalid. `CanOpenNodeOptions.With` keeps the interval, `WithSrdoConfigurationCheckInterval` replaces it (null = off). The norm provides no notification of the configuration entity; `SrdoStateChanged` reports the transition. A reset does not end the check, dispose does. | Must | Virtual-loopback integration test with manual clock (`CanOpenSafetyNodeTests.The_Periodic_Check_Finds_A_Corrupted_Record_And_Stops_The_Producer`): a check without finding changes nothing; a record changed behind the dictionary — refresh time, direction 0, direction 3 — is found on the next one, 13FEh = 00h, `ConfigurationInvalid`, no further pair; `A_Pending_Pair_Is_Dropped_When_The_Periodic_Check_Invalidates_The_Srdo`: one waiting behind an unconfirmed pair no longer goes out after the invalidation, nor does the inverted half of the running one; `A_Pair_Already_Queued_Behind_A_Held_One_Is_Dropped_When_The_Periodic_Check_Invalidates`: an already queued pair of a second SRDO likewise; `A_Delete_Followed_By_A_Commit_Survives_The_Periodic_Check`: delete plus commit is no deviation; `A_Change_Behind_The_Dictionary_In_A_Deleted_Srdos_Record_Is_Not_A_Mismatch`: the record of a deleted SRDO is not in the image; `A_Mismatch_Found_Outside_Operational_Clears_13FEh_And_Leaves_The_Engine_To_The_Transition`: outside OPERATIONAL only 13FEh; `SafetyTypesTests.The_Check_Interval_Is_Kept_By_With_And_Replaced_By_Its_Own_With`. | CiA 319 v2.0.0 §5.3; interval decision; #308 |
| FR-CO-060 | The system MUST offer optional read-only peer Safety configuration acquisition compatible with existing Safety implementations. A bound EDS/DCF limits and validates uploads; an expected configuration is optional. The immutable snapshot retains raw entries, provenance, identity, acquisition interval, independent validity/signature/expected outcomes, repeated-read changes and unconfirmed atomic consistency. Partial/fallback data cannot silently become a complete verified image. No downloads or state-changing commands are sent. Monitoring eligibility is explicit; replacing a snapshot begins a new evaluation period. Existing CRC, mapping and CiA 319 SRVT rules apply, with #289 limitations visible. | Must | Deterministic controlled-SDO tests: complete/partial/invalid/changing records, expectation, fallback, channel isolation, cancellation, immutability and upload-only traffic; source mutations. | [#403](https://github.com/dborgards/CanKit.Pro/issues/403) |


#### 4.3.3 J1939 (application)
Expand Down
1 change: 1 addition & 0 deletions docs/requirements/SRS-CanKit.Pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ Ist-Zustand (09.10.2026): ausgeliefert als `CanKit.Pro.CANopen`. Der Zuschnitt d
| FR-CO-057 | Das System MUSS SAM- und DAM-MPDO (Mapping-Zähler FEh/FFh) senden und empfangen, nur ereignisgesteuert, mit höchstens einem SAM-Produzenten. Scanner- und Dispatcher-Listen einschließlich Subindex-Blöcken, adressierter und Broadcast-DAM-Empfang und EMCY 8230h bei nicht verfügbarem DAM-Ziel werden umgesetzt. Die PDO-Beobachtung liefert den übertragenen Multiplexer und vier Datenbytes. | Must | CanOpenPdoEngineTests.Destination_Mpdo_Addresses_Local_Objects_And_Reports_Unavailable_Ones, Source_Mpdo_Uses_Scanner_And_Dispatcher_And_Has_One_Producer; CanOpenForeignPdoObserveTests.Observe_Extended_Bit_Mapping_And_Mpdo_From_The_File. | CiA 301 §7.2.3, §7.5.2.39/40; Nutzerauftrag PDO-Erweiterungen |
| FR-CO-058 | Das System MUSS als SRD nach CiA 319 v2.0.0 §5.3 Schritt 4 beim Schreiben von A5h auf 13FEh — per SDO, lokal oder aus einer Gerätebeschreibung — die Prüfsumme jedes bestehenden SRDO (sub1 ≠ 0 — auch ein reservierter Wert 3..255, den nur eine Verfälschung hinterlässt, zählt als bestehend und fällt durch die Prüfsumme; ein gelöschtes hat keine zu schützende Konfiguration, und §9.5 prüft es nicht, wie FR-CO-044) über den Record, wie er im Verzeichnis steht — alle Mapping-Slots roh, die invertierten eingeschlossen, nicht aus den Klartext-Slots synthetisiert (`SrdoRecords.RecordChecksum`; dieselbe Berechnung gilt für FR-CO-038) — neu berechnen, mit 13FFh:n vergleichen und bei einer Abweichung 13FEh sofort, im selben Write, auf 00h setzen, sodass das Zurücklesen der Konfigurationsinstanz (FR-CO-051, Schritt 4) es sieht. Nach §5.4 MUSS dieselbe Prüfung nach Reset Node und Reset Communication über die zurückgestellten Werte laufen, bevor der Boot-up gesendet wird; die Werte selbst werden unverändert zurückgestellt (FR-CO-035), nur 13FEh wird bei Abweichung gelöscht. Die Prüfung beim Übergang nach OPERATIONAL (FR-CO-038) bleibt. | Must | Virtual-Loopback-Integrationstest (`CanOpenSafetyNodeTests.Writing_A5h_Over_A_Wrong_Checksum_Sets_13FEh_Back_To_Zero_At_Once`: Abweichung → 00h, wieder passend → A5h, ein gelöschtes SRDO wird nicht verglichen; `A_Stored_Configuration_That_Does_Not_Match_Its_Checksum_Comes_Back_Invalid`: ein hinter dem Verzeichnis geänderter Record — die Refresh-Zeit, ein invertierter Mapping-Slot, oder die Richtung zu einem reservierten Wert — wird mit A5h gespeichert, zurückgestellt und 13FEh im Reset-Durchlauf gelöscht; `CanOpenSafetyDeviceDescriptionTests.A_Wrong_Checksum_In_The_File_Loads_Without_A_Finding_But_The_Configuration_Is_Not_Valid`: die Datei als Power-on-Zustand). | CiA 319 v2.0.0 §5.3 Schritt 4, §5.4; #308 |
| FR-CO-059 | Das System MUSS mit `CanOpenNodeOptions.SrdoConfigurationCheckInterval` (Vorgabe null = aus; ein Wert ≤ 0 → `ArgumentOutOfRangeException`) die Prüfung aus FR-CO-058 periodisch wiederholen, solange 13FEh = A5h ist (CiA 319 v2.0.0 §5.3: „the SRD should validate the consistency of its safety-related configuration by periodically recalculating the CRC“ — ein „should“, und die Norm nennt kein Intervall, daher Opt-in); zusätzlich MUSS sie die prüfsummenrelevanten Objekte der damals bestehenden SRDOs (Record, Mapping, 13FFh:n; ein gelöschtes SRDO hat nichts zu schützen und ist nicht enthalten) byteweise mit dem Abbild vergleichen, das beim A5h-Write bzw. nach dem Reset unter dem Schreibtor aufgenommen wurde — jeder Write auf eines davon löscht 13FEh, also ist jede Abweichung davon, solange A5h steht, hinter dem Verzeichnis entstanden, auch eine Richtung, die jetzt 0 oder reserviert liest; die Sicht der Engine wird nicht herangezogen, weil ein reguläres Löschen mit Commit ihr zuvorkommen kann. Eine Abweichung setzt 13FEh auf 00h und MUSS in OPERATIONAL jedes SRDO ungültig machen wie beim Übergang (FR-CO-038) — `ConfigurationInvalid`, bzw. nicht mehr vorhanden (Grund null), wenn sein Record als gelöscht liest — und die Sendeperiode beenden wie das Verlassen von OPERATIONAL (FR-CO-039): weder ein wartendes noch ein schon auf der Sendekette eingereihtes Paar noch die invertierte Hälfte eines laufenden geht hinaus; ein Consumer meldet ungültig. `CanOpenNodeOptions.With` behält das Intervall, `WithSrdoConfigurationCheckInterval` ersetzt es (null = aus). Die Norm sieht keine Benachrichtigung der Konfigurationsinstanz vor; `SrdoStateChanged` meldet den Übergang. Ein Reset beendet die Prüfung nicht, das Dispose schon. | Must | Virtual-Loopback-Integrationstest mit manueller Uhr (`CanOpenSafetyNodeTests.The_Periodic_Check_Finds_A_Corrupted_Record_And_Stops_The_Producer`): eine Prüfung ohne Befund ändert nichts; ein hinter dem Verzeichnis geänderter Record — Refresh-Zeit, Richtung 0, Richtung 3 — wird bei der nächsten gefunden, 13FEh = 00h, `ConfigurationInvalid`, kein weiteres Paar; `A_Pending_Pair_Is_Dropped_When_The_Periodic_Check_Invalidates_The_Srdo`: ein hinter einem unbestätigten Paar wartendes geht nach der Entwertung nicht mehr hinaus, die invertierte Hälfte des laufenden auch nicht; `A_Pair_Already_Queued_Behind_A_Held_One_Is_Dropped_When_The_Periodic_Check_Invalidates`: ein schon eingereihtes Paar eines zweiten SRDO ebenso; `A_Delete_Followed_By_A_Commit_Survives_The_Periodic_Check`: Löschen plus Commit ist keine Abweichung; `A_Change_Behind_The_Dictionary_In_A_Deleted_Srdos_Record_Is_Not_A_Mismatch`: der Record eines gelöschten SRDO ist nicht im Abbild; `A_Mismatch_Found_Outside_Operational_Clears_13FEh_And_Leaves_The_Engine_To_The_Transition`: außerhalb von OPERATIONAL nur 13FEh; `SafetyTypesTests.The_Check_Interval_Is_Kept_By_With_And_Replaced_By_Its_Own_With`. | CiA 319 v2.0.0 §5.3; Intervall Entscheidung; #308 |
| FR-CO-060 | Das System MUSS eine optionale, zu bestehenden Safety-Implementierungen kompatible, nur lesende Erfassung der Safety-Konfiguration eines Peers anbieten. Eine gebundene EDS/DCF begrenzt und validiert Uploads; eine Sollkonfiguration ist optional. Der unveränderliche Snapshot bewahrt Rohwerte, Herkunft, Identität, Erfassungszeitraum, getrennte Gültigkeits-/Signatur-/Sollvergleiche, beobachtete Änderungen und unbestätigte atomare Konsistenz. Teil- und Ersatzdaten dürfen nicht stillschweigend zum vollständigen geprüften Geräteabbild werden. Downloads und zustandsändernde Befehle sind ausgeschlossen. Die Eignung als Monitoreingabe ist explizit; ein Snapshotwechsel beginnt einen neuen Auswertungszeitraum. Bestehende CRC-, Mapping- und CiA-319-SRVT-Regeln gelten mit sichtbaren Einschränkungen aus #289. | Must | Deterministische Tests mit gesteuerten SDO-Antworten: vollständige/unvollständige/ungültige/wechselnde Datensätze, Sollvergleich, Ersatzwerte, Kanalisolierung, Abbruch, Unveränderlichkeit und reine Upload-Kommunikation; Quellcode-Mutationen. | [#403](https://github.com/dborgards/CanKit.Pro/issues/403) |


#### 4.3.3 J1939 (Applikation)
Expand Down
Loading
Loading