ace_uds/message/services/
negative_response.rs1use crate::{message::ServiceIdentifier, UdsError};
2use ace_macros::FrameCodec;
3
4#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, FrameCodec)]
5#[frame(error = UdsError)]
6pub struct NegativeResponse {
7 pub request_sid: ServiceIdentifier,
8 pub response_code: NegativeResponseCode,
9}
10
11#[repr(u8)]
12#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, FrameCodec)]
13#[frame(error = UdsError)]
14pub enum NegativeResponseCode {
15 #[frame(id = 0x00)]
16 PositiveResponse,
17 #[frame(id = 0x10)]
18 GeneralReject,
19 #[frame(id = 0x11)]
20 ServiceNotSupported,
21 #[frame(id = 0x12)]
22 SubFunctionNotSupported,
23 #[frame(id = 0x13)]
24 IncorrectMessageLengthOrInvalidFormat,
25 #[frame(id = 0x14)]
26 ReponseTooLong,
27 #[frame(id = 0x21)]
28 BusyRepeatRequest,
29 #[frame(id = 0x22)]
30 ConditionsNotCorrect,
31 #[frame(id = 0x24)]
32 RequestSequenceError,
33 #[frame(id = 0x25)]
34 NoResponseFromSubnetComponent,
35 #[frame(id = 0x26)]
36 FailurePreventsExecutionOfRequestedAction,
37 #[frame(id = 0x31)]
38 RequestOutOfRange,
39 #[frame(id = 0x33)]
40 SecurityAccessDenied,
41 #[frame(id = 0x34)]
42 AuthenticationRequired,
43 #[frame(id = 0x35)]
44 InvalidKey,
45 #[frame(id = 0x36)]
46 ExceedNumberOfAttempts,
47 #[frame(id = 0x37)]
48 RequiredTimeDelayNotExpired,
49 #[frame(id = 0x38)]
50 SecureDataTransmissionRequired,
51 #[frame(id = 0x39)]
52 SecureDataTransmissionNotAllowed,
53 #[frame(id = 0x3A)]
54 SecureDataVerificationFailed,
55 #[frame(id = 0x50)]
56 CertificateVerificationFailedInvalidTimePeriod,
57 #[frame(id = 0x51)]
58 CertificateVerificationFailedInvalidSignature,
59 #[frame(id = 0x52)]
60 CertificateVerificationFailedInvalidChainOfTrust,
61 #[frame(id = 0x53)]
62 CertificateVerificationFailedInvalidType,
63 #[frame(id = 0x54)]
64 CertificateVerificationFailedInvalidFormat,
65 #[frame(id = 0x55)]
66 CertificateVerificationFailedInvalidContent,
67 #[frame(id = 0x56)]
68 CertificateVerificationFailedInvalidScope,
69 #[frame(id = 0x57)]
70 CertificateVerificationFailedInvalidCertificateRevoked,
71 #[frame(id = 0x58)]
72 OwnershipVerificationFailed,
73 #[frame(id = 0x59)]
74 ChallengeCalculationFailed,
75 #[frame(id = 0x5A)]
76 SettingAccessRightsFailed,
77 #[frame(id = 0x5B)]
78 SessionKeyCreationDerivationFailed,
79 #[frame(id = 0x5C)]
80 ConfigurationDataUsageFailed,
81 #[frame(id = 0x5D)]
82 DeAuthenticationFailed,
83 #[frame(id = 0x70)]
84 UploadDownloadNotAccepted,
85 #[frame(id = 0x71)]
86 TransferDataSuspended,
87 #[frame(id = 0x72)]
88 GeneralProgrammingFailure,
89 #[frame(id = 0x73)]
90 WrongBlockSequenceCounter,
91 #[frame(id = 0x78)]
92 RequestCorrectlyReceivedResponsePending,
93 #[frame(id = 0x7E)]
94 SubFunctionNotSupportedInActiveSession,
95 #[frame(id = 0x7F)]
96 ServiceNotSupportedInActiveSession,
97 #[frame(id = 0x81)]
98 RPMTooHigh,
99 #[frame(id = 0x82)]
100 RPMTooLow,
101 #[frame(id = 0x83)]
102 EngineIsRunning,
103 #[frame(id = 0x84)]
104 EngineIsNotRunning,
105 #[frame(id = 0x85)]
106 EngineRunTimeTooLow,
107 #[frame(id = 0x86)]
108 TemperatureTooHigh,
109 #[frame(id = 0x87)]
110 TemperatureTooLow,
111 #[frame(id = 0x88)]
112 VehicleSpeedTooHigh,
113 #[frame(id = 0x89)]
114 VehicleSpeedTooLow,
115 #[frame(id = 0x8A)]
116 ThrottlePedalTooHigh,
117 #[frame(id = 0x8B)]
118 ThrottlePedalTooLow,
119 #[frame(id = 0x8C)]
120 TransmissionRangeNotInNeutral,
121 #[frame(id = 0x8D)]
122 TransmissionRangeNotInGear,
123 #[frame(id = 0x8F)]
124 BrakeSwitchesNotClosed,
125 #[frame(id = 0x90)]
126 ShifterLeverNotInPark,
127 #[frame(id = 0x91)]
128 TorqueConverterClutchLocked,
129 #[frame(id = 0x92)]
130 VoltageTooHigh,
131 #[frame(id = 0x93)]
132 VoltageTooLow,
133 #[frame(id = 0x94)]
134 ResourceTemporarilyNotAvailable,
135}