UdsNegativeResponseException Class¶
Raised when the ECU replies with a Negative Response (0x7F, requestSid, NRC). The three raw bytes are surfaced verbatim so callers can log / branch on any NRC value, not just the ones named in UdsNegativeResponseCode (SRS FR-UDS-010).
Inheritance Object → Exception → CanKitException → UdsException → UdsNegativeResponseException
Constructors¶
UdsNegativeResponseException(UdsServiceId, byte) Constructor¶
Creates a structured NRC exception.
Parameters¶
requestedService UdsServiceId
code Byte
Properties¶
UdsNegativeResponseException.Code Property¶
Raw NRC byte returned by the ECU (byte 3 of the NRC frame).
Property Value¶
UdsNegativeResponseException.CodeAsEnum Property¶
The named NRC value when Code matches one of the entries in
UdsNegativeResponseCode; null otherwise. Callers should still branch
on Code for values not covered by the enum.
Property Value¶
Nullable<UdsNegativeResponseCode>
UdsNegativeResponseException.CodeName Property¶
Human-readable NRC name (e.g. "requestOutOfRange") when the code is known,
otherwise a hex literal. Handy for log lines.
Property Value¶
UdsNegativeResponseException.RequestedService Property¶
Service the request targeted (the byte returned as byte 2 of the NRC frame).