uds_client/uds_client/
mod.rs

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