Skip to content

CanKit.Pro.CANopen.Safety Namespace

Classes
CanOpenSafetyExtensions Reaches the safety layer of a node without widening ICanOpenNode (adding members to a published interface breaks every implementer; see the DisposeAsync extension for the precedent).
ForeignSrdoConfiguration Immutable, explicitly prepared input for a passive SRDO monitor. Construction sends nothing.
ForeignSrdoMonitor Passive continuous SRDO/GFC analysis (FR-CO-061), independent of any CANopen node or object dictionary.
ForeignSrdoObservation Immutable trace item. Every captured GFC occurrence gets its own item.
ForeignSrdoObserveResult Outcome of ICanOpenSafety.ObserveForeignSrdoAsync.
ForeignSrdoPollResult Bounded poll result. Items are returned directly without a lossy callback/event buffer.
ForeignSrdoSignal Owned immutable bytes of one decoded object, in CANopen little-endian order.
ForeignSrdoState State as of one poll. A retained instance is historical, not a live clock.
GlobalFailsafeCommandReceivedEventArgs A global failsafe command (COB-ID 001h, DLC 0) was received while Operational (CiA DSP 304 V1.0 §8.2; EN 50325-5:2010 §7.2.1 — 1300h is set to 1, not consulted). On a bus that echoes, the node's own GFC arrives here too.
PeerSafetyConfiguration What a safety node's configuration should be: 1300h and, per SRDO number, the communication parameter and the mapping — and, for a configuration, whether the peer is to store it (Storage). Built by hand or from a DCF's parameter values (CiA 306). A record whose direction is 0 is not part of it — it is deleted on the peer. Not thread-safe: fill it on one thread, then hand it over. A transaction takes its own copy when it starts; a concurrent Add(int, SrdoCommunicationParameter, SrdoMapping) while that copy is being made is not supported.
PeerSafetyEntry Immutable raw bytes and provenance of one attempted upload.
PeerSafetyFinding One immutable diagnostic, located at an object entry.
PeerSafetyMismatch One (index, sub-index) whose value on the peer is not what was expected: an identity entry 1018h:01–03 that differs from the bound description's own 1018h entries (CiA 319 §5.2, nothing was written then) — or that the peer does not implement, reported with no bytes read once an earlier entry differed —, or a safety object whose readback differs from what was written (a configuration) or from the expectation (a verification).
PeerSafetyResult Outcome of ICanOpenSafety.ConfigurePeerSafetyAsync (succeeded = acknowledged with 13FEh = A5h, and stored when asked) and ICanOpenSafety.VerifyPeerSafetyConfigurationAsync (succeeded = verified).
PeerSafetySnapshot One immutable, read-only acquisition of a peer's safety communication configuration (#403).
PeerSafetySrdoSnapshot Immutable interpreted SRDO records and independent comparison outcomes.
SrdoCrc The safety configuration checksum of object 13FFh (CiA DSP 304 V1.0 §8.4.2.2; EN 50325-5:2010 §6.4.1.5, Table 9). Both texts give the generator polynomial x^16 + x^12 + x^5 + 1 and the order of the fields; EN 50325-5 adds the seed 0000h, and its formula (2) lists a multi-byte field low byte first (b7..0, then b15..8), each byte from its bit 7 down. This implementation uses CRC-16/XMODEM (initial value 0000h, no reflection, no final XOR — the algorithm CiA 301 §7.2.4.3.16 prescribes for the SDO block transfer) and feeds multi-byte fields little-endian, the CANopen byte image, as CANopenNode's CO_SRDOcalcCrc does (#289).
SrdoMapping The application objects an SRDO carries (CiA DSP 304 V1.0 §8.4.2.2, object 1381h–13C0h): up to MaxEntries byte-aligned entries whose widths sum to at most 8 bytes — the plain-data frame. The record in the dictionary holds each entry twice (odd sub-index plain, even sub-index inverted); this type names the objects once. Each entry must name an object of fixed width equal to the entry's: the dictionary, the device-description loader and the peer configuration refuse a string or a domain. That is this implementation's rule, not a clause of DSP 304 — safety process data has a fixed width, and the width is what the mapping entry and the checksum pin.
SrdoReceivedEventArgs A consumer SRDO received a complete, correct pair in time; the plain data was written to the mapped objects (CiA DSP 304 V1.0 §8.1.3.1, "Indication").
SrdoState A snapshot of one SRDO's validity. For a consumer, valid means the last pair was complete, correct and in time; for a producer, valid means the node is Operational with a valid configuration and is transmitting the cycle.
SrdoStateChangedEventArgs An SRDO became valid or invalid. Delivered on transitions only, never dropped (a critical event like a heartbeat timeout).
Structs
SrdoCommunicationParameter The SRDO communication parameter record, data type 26h (CiA DSP 304 V1.0 §8.4.1.1 Table 5): direction (sub1), refresh time for a producer or SCT for a consumer (sub2), SRVT (sub3, consumer only), and the two COB-IDs (sub5, sub6). Sub4, the transmission type, is the constant 254 and is not part of this record.
Interfaces
ICanOpenSafety CANopen Safety (CiA DSP 304 V1.0) on a node: the SRDOs it produces and consumes, the global failsafe command, and — for a master or tool — the configuration and verification of a peer's safety parameters, run as the configuration entity of CiA 319 v2.0.0 (identity verification, the configuration steps, the storage, the checksum of an SRVT the peer does not implement). Reached through Safety(this ICanOpenNode). A node has SRDOs only when opened with SrdoCount > 0 or a device description that declares them.
ICanOpenSafetyInspection Optional tool-side read-only inspection without widening published ICanOpenSafety.
Enums
ForeignSrdoCaptureQuality Capture evidence, independent of pair status. No value proves upstream completeness.
ForeignSrdoStatus What the monitor observed, rather than a remote device's safety state.
PeerSafetyFindingKind Machine-readable diagnostic category (#403).
PeerSafetySnapshotConsistency Sequential uploads cannot establish an atomic device image.
PeerSafetyStorage Step 5 of the safe configuration procedure (CiA 319 v2.0.0 §5.3): whether the configuration entity, once the SRD has acknowledged the configuration, asks it to store the safety-related configuration — 13FEh and 13FFh included — in non-volatile memory through object 1010h (CiA 301 §7.5.2.13), with the "save" signature. The value is the sub-index written.
SafetyComparison A comparison, separate from the device's validity flag and from safety approval.
SafetyValueOrigin Where a captured value came from; file values never stand in for live evidence.
SrdoDirection Information direction of an SRDO, the value of sub-index 1 of its communication parameter record (CiA DSP 304 V1.0 §8.4.2.2, object 1301h–1340h).
SrdoInvalidReason Why an SRDO is not valid (CiA DSP 304 V1.0 §8.1.1, §8.1.3.1, §9.5).