Enum ecu_diagnostics::ServerEvent[][src]

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

The diagnostic server encountered an unrecoverable critical error

Fields of CriticalError

desc: String

Text description of the error

ServerStart

The diagnostic server has started

ServerExit

The diagnostic server has terminated

DiagModeChange

The diagnostic server has changed session state

Fields of DiagModeChange

old: SessionState

Old session state

new: SessionState

New session state

Request(&'a [u8])

Received a request to send a payload to the ECU

Tuple Fields of Request

0: &'a [u8]
Response(&'a DiagServerResult<Vec<u8>>)

Response from the ECU

Tuple Fields of Response

0: &'a DiagServerResult<Vec<u8>>
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

Tuple Fields of TesterPresentError

0: DiagError
InterfaceCloseOnExitError(ChannelError)

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

Tuple Fields of InterfaceCloseOnExitError

0: ChannelError

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

Performs the conversion.

Performs the conversion.

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.