pub trait DiagnosticServer<CommandType> {
    fn execute_command(
        &mut self,
        cmd: CommandType,
        args: &[u8]
    ) -> DiagServerResult<()>; fn execute_command_with_response(
        &mut self,
        cmd: CommandType,
        args: &[u8]
    ) -> DiagServerResult<Vec<u8>>; fn send_byte_array(&mut self, bytes: &[u8]) -> DiagServerResult<()>; fn send_byte_array_with_response(
        &mut self,
        bytes: &[u8]
    ) -> DiagServerResult<Vec<u8>>; fn is_server_running(&self) -> bool; fn set_repeat_count(&mut self, count: u32); fn set_repeat_interval_count(&mut self, interval_ms: u32); }
Expand description

Base trait for diagnostic servers

Required methods

Sends a command to the ECU, and doesn’t poll for its response

Sends a command to the ECU, and polls for its response

Sends an arbitrary byte array to the ECU, and doesn’t poll for its response

Sends an arbitrary byte array to the ECU, and polls for its response

Returns if the diagnostic server is running or not

Sets the maximum number of retries to send a command to the ECU if a failure occurs during transmission of the command to the ECU

Sets the minimum interval in milliseconds between a command failure and an attempted repeat transmission

Implementors