uds_client/uds_client/mod.rs
1mod client;
2mod frame;
3mod pci;
4mod response;
5mod services;
6
7pub use client::UdsClient;
8pub use frame::*;
9pub use pci::{PciByte, PciType};
10pub use response::{Response, ResponseSlot};
11pub use services::RealTimeType;
12
13#[derive(Clone, Debug)]
14/// Diagnostic server error
15pub enum DiagError {
16 NotSupported,
17 ECUError {
18 /// Raw Negative response code from ECU
19 code: u8,
20 /// Negative response code definition according to protocol
21 def: Option<String>,
22 },
23 /// Response empty
24 EmptyResponse,
25 /// ECU Responded but send a message that wasn't a reply for the sent message
26 WrongMessage,
27 /// Diagnostic server terminated!?
28 ServerNotRunning,
29 /// ECU Responded with a message, but the length was incorrect
30 InvalidResponseLength,
31 /// A parameter given to the function is invalid. Check the function's documentation
32 /// for more information
33 ParameterInvalid,
34 /// Error with underlying communication channel
35 ChannelError,
36 /// Device hardware error
37 HardwareError,
38 /// Feauture is not iumplemented yet
39 NotImplemented(String),
40 /// Mismatched PID response ID
41 MismatchedIdentResponse {
42 /// Requested PID
43 want: u16,
44 /// Received PID from ECU
45 received: u16,
46 },
47 /// timeout response
48 Timeout,
49}