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

Dynamic diagnostic session

This is used if a target ECU has an unknown diagnostic protocol.

This also contains some useful wrappers for basic functions such as reading and clearing error codes.

Implementations

Creates a new dynamic session. This will first try with KWP2000, then if that fails, will try with UDS. If both server creations fail, then the last error will be returned.

NOTE: In order to test if the ECU supports the protocol, the ECU will be put into extended diagnostic session briefly to test if it supports the tested diagnostic protocol.

Returns a reference to KWP2000 session. None is returned if server type is not KWP2000

Performs operation with Kwp 2000 diagnostic server. If the type of the server is not KWP2000, then nothing happens, and DiagError::NotSupported

Performs operation with UDS diagnostic server. If the type of the server is not UDS, then nothing happens, and DiagError::NotSupported

Returns a reference to UDS session. None is returned if server type is not UDS

Puts the ECU into an extended diagnostic session

Puts the ECU into a default diagnostic session. This is how the ECU normally operates

Reads all diagnostic trouble codes from the ECU

Attempts to clear all DTCs stored on the ECU

Attempts to send a payload of bytes to the ECU, and return its full response

Attempts to send a payload of bytes to the ECU, and don’t poll for a response

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.