pub struct UDSProtocol { /* private fields */ }
Expand description

UDS diagnostic protocol

Trait Implementations§

source§

impl Clone for UDSProtocol

source§

fn clone(&self) -> UDSProtocol

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for UDSProtocol

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for UDSProtocol

source§

fn default() -> Self

Creates a new UDS protocol, and enables standard session types

source§

impl DiagProtocol<ByteWrapper<UdsError>> for UDSProtocol

source§

fn get_basic_session_mode(&self) -> Option<DiagSessionMode>

Returns the alias to the ECU ‘default’ diagnostic session mode Returns None if there is no session type control in the protocol (For example basic OBD2)
source§

fn get_protocol_name(&self) -> &'static str

Name of the diagnostic protocol
source§

fn process_req_payload(&self, payload: &[u8]) -> DiagAction

Process a byte array into a command
source§

fn create_tp_msg(response_required: bool) -> DiagPayload

Generate the tester present message (If required)
source§

fn make_session_control_msg(&self, mode: &DiagSessionMode) -> Vec<u8>

Creates a session mod req message
source§

fn process_ecu_response(r: &[u8]) -> Result<Vec<u8>, (u8, UdsErrorByte)>

Processes the ECU response, and checks to see if it is a positive or negative response, this includes checking to see if the ECU is in a waiting state
source§

fn get_diagnostic_session_list(&self) -> HashMap<u8, DiagSessionMode>

Gets a hashmap of available diagnostic session modes
source§

fn register_session_type(&mut self, session: DiagSessionMode)

Registers a new custom diagnostic session mode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.