Skip to content

TxConfirmation Struct

Result of SendConfirmed(CanFrame, Nullable<TimeSpan>, CancellationToken): a uniform "was this frame actually sent" answer regardless of whether the underlying adapter supports hardware TX echo (arc42 §5.3/§6.3, ADR-7; FR-RAW-030..034).

public readonly record struct TxConfirmation : System.IEquatable<CanKit.Pro.RawCan.TxConfirmation>

Implements IEquatable<TxConfirmation>

Remarks

A TxConfirmation value is only ever produced for a *resolved* outcome — the returned Task<TxConfirmation> never completes successfully while the send is still pending. Confirmed is true only for an actual driver-accepted send (approximated) or an actually-matched echo frame (real); for every other outcome (timeout, bus-off, outright rejection) Confirmed is false and FailureReason explains why (FR-RAW-033). Explicit caller-supplied CancellationToken cancellation is reported as task cancellation (standard .NET convention), not as a TxConfirmation value.

Properties

TxConfirmation.Confirmed Property

True if the send was confirmed — either by a matched hardware echo, or (when the adapter has no echo capability enabled) by the driver accepting the frame. See IsApproximated to tell the two apart.

public bool Confirmed { get; init; }

Property Value

Boolean

TxConfirmation.FailureReason Property

Why the send was not confirmed; None when Confirmed is true.

public CanKit.Pro.RawCan.TxConfirmFailureReason FailureReason { get; init; }

Property Value

TxConfirmFailureReason

TxConfirmation.IsApproximated Property

True when Confirmed reflects driver acceptance rather than an actual hardware echo (FR-RAW-032) — i.e. "best-effort acknowledgment", not a guarantee the frame reached the wire. Always false when Confirmed is false.

public bool IsApproximated { get; init; }

Property Value

Boolean

TxConfirmation.Timestamp Property

UTC timestamp of when this result was produced (confirmation or failure).

public System.DateTime Timestamp { get; init; }

Property Value

DateTime