Skip to content

CanKit.Pro.J1939 Namespace

Classes
J1939CannotClaimException Thrown by ClaimAddressAsync(byte, CancellationToken) when a higher-priority peer contests the preferred address and the node has no fallback (arbitrary addressing disabled or the caller supplied only one candidate). The node transitions to CannotClaim and broadcasts Cannot Claim (SA=0xFE) before throwing (SRS FR-J1939-004).
J1939ClaimEventArgs Event payload for AddressClaimChanged. Reports both the new claim state and, if any, the peer that caused a transition.
J1939NoAddressException Thrown by SendAsync(J1939Message, CancellationToken) when the caller tries to send a message before ClaimAddressAsync(byte, CancellationToken) has succeeded (SRS FR-J1939-003/004: only a node with a valid, claimed address may transmit).
J1939Node Factory entry point for opening IJ1939Node instances. Non-instantiable.
J1939NodeException Base class for exceptions thrown by IJ1939Node operations. Derives from CanKitException so L2/L3/L4 failures can be caught uniformly across the library (NFR-006 error architecture, arc42 ADR-12).
J1939NodeOptions Immutable configuration for IJ1939Node. Captures the node's identity (Name), the SAE J1939-81 arbitration window ClaimAnnounceTimeout, receive-buffer bounds, and the transport-protocol options passed through to the shared IJ1939TpChannel for >8-byte payloads.
J1939Spn Static helpers for extracting SAE J1939-71 SPN (Suspect Parameter Number) values from a PGN payload using configurable scale/offset (SRS FR-J1939-002).
J1939SpnCatalog Registry of J1939SpnDefinitions keyed by SPN number: decode received PGN payloads to physical values by SPN number instead of hand-written offsets/scales (FR-J1939-002 convenience layer). Default ships a small set of ubiquitous SAE J1939-71 parameters (EEC1/EEC2/CCVS); applications register the SPNs of their own profiles on top. Thread-safe for concurrent reads; registration is expected at setup time but is safe to do concurrently with reads.
J1939SpnDefinition Describes one Suspect Parameter Number (SPN) from a J1939 parameter group: where the field sits in the PGN payload and how to scale the raw value to a physical one (SAE J1939-71 §5.1.3). Used by J1939SpnCatalog to decode SPNs by number instead of by hand-written offsets (FR-J1939-002 convenience layer).
Structs
J1939Message One application-layer SAE J1939 message: a parameter-group payload paired with the per-frame routing fields (Priority, PGN, source and destination address) an application needs to send or interpret it.
J1939SpnValue The result of decoding one SPN field: either a physical value, or the reason there is no physical value to report (SAE J1939-71 §5.1.1, SRS FR-J1939-002).
Interfaces
IJ1939Node One application-layer SAE J1939 node bound to a single physical bus and a single 64-bit J1939Name identity. The node owns the SAE J1939-81 address-claim state (SRS FR-J1939-003/004), routes outbound PGNs through direct 29-bit frames (≤ 8 bytes) or the shared J1939-TP channel (> 8 bytes, SRS FR-J1939-006), and surfaces every inbound application PGN (including Request-PGN, SRS FR-J1939-005) via MessageReceived.
Enums
J1939ClaimState The current state of a node's SAE J1939-81 address claim (SRS FR-J1939-003/004).
J1939SpnValueKind What a decoded SPN field actually carries: a measurement, or one of the SAE J1939-71 §5.1.1 indicator ranges that occupy the top of every SPN's raw range.