pub enum ServerEvent<'a, SessionState> {
    CriticalError {
        desc: String,
    },
    ServerStart,
    ServerExit,
    DiagModeChange {
        old: SessionState,
        new: SessionState,
    },
    Request(&'a [u8]),
    Response(&'a DiagServerResult<Vec<u8>>),
    TesterPresentError(DiagError),
    InterfaceCloseOnExitError(ChannelError),
}
Expand description

Diagnostic server event

Variants

CriticalError

Fields

desc: String

Text description of the error

The diagnostic server encountered an unrecoverable critical error

ServerStart

The diagnostic server has started

ServerExit

The diagnostic server has terminated

DiagModeChange

Fields

old: SessionState

Old session state

new: SessionState

New session state

The diagnostic server has changed session state

Request(&'a [u8])

Received a request to send a payload to the ECU

Response(&'a DiagServerResult<Vec<u8>>)

Response from the ECU

TesterPresentError(DiagError)

An error occurred whilst transmitting tester present message To the ECU. This might mean that the ECU has exited its session state, and a non-default session state should be re-initialized

InterfaceCloseOnExitError(ChannelError)

Error occurred whilst trying to terminate the server’s channel interface when the diagnostic server exited.

Trait Implementations

Formats the value using the given formatter. Read more

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.