Skip to main content

ConnectionEvent

Enum ConnectionEvent 

Source
pub enum ConnectionEvent<const BUF: usize = 4096> {
    SendActivationResponse(RoutingActivationResponse),
    ForwardToEcu {
        source_address: u16,
        target_address: u16,
        uds_data: Vec<u8, BUF>,
    },
    SendDiagnosticAck {
        source_address: u16,
        target_address: u16,
    },
    SendDiagnosticNack {
        source_address: u16,
        target_address: u16,
        nack_code: DiagnosticNackCode,
    },
    SendAliveCheckRequest,
    SendAliveCheckResponse,
    Close,
}
Expand description

Events produced by the connection state machine.

The gateway collects these after each handle or tick call and acts on them - sending frames, routing messages, closing sockets.

Variants§

§

SendActivationResponse(RoutingActivationResponse)

Send this RoutingActivationResponse frame back to the tester.

§

ForwardToEcu

Forward these raw UDS bytes to the ECU at the given target address.

Fields

§source_address: u16
§target_address: u16
§uds_data: Vec<u8, BUF>
§

SendDiagnosticAck

Send a DiagnosticMessageAck back to the tester.

Fields

§source_address: u16
§target_address: u16
§

SendDiagnosticNack

Send a DiagnosticMessageNack back to the tester.

Fields

§source_address: u16
§target_address: u16
§

SendAliveCheckRequest

Send an AliveCheckRequest to the tester.

§

SendAliveCheckResponse

Send an AliveCheckResponse back to the tester.

§

Close

Close this TCP connection - activation denied or alive check failed.

Trait Implementations§

Source§

impl<const BUF: usize> Clone for ConnectionEvent<BUF>

Source§

fn clone(&self) -> ConnectionEvent<BUF>

Returns a duplicate 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<const BUF: usize> Debug for ConnectionEvent<BUF>

Source§

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

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

impl<const BUF: usize> PartialEq for ConnectionEvent<BUF>

Source§

fn eq(&self, other: &ConnectionEvent<BUF>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const BUF: usize> Eq for ConnectionEvent<BUF>

Source§

impl<const BUF: usize> StructuralPartialEq for ConnectionEvent<BUF>

Auto Trait Implementations§

§

impl<const BUF: usize> Freeze for ConnectionEvent<BUF>

§

impl<const BUF: usize> RefUnwindSafe for ConnectionEvent<BUF>

§

impl<const BUF: usize> Send for ConnectionEvent<BUF>

§

impl<const BUF: usize> Sync for ConnectionEvent<BUF>

§

impl<const BUF: usize> Unpin for ConnectionEvent<BUF>

§

impl<const BUF: usize> UnsafeUnpin for ConnectionEvent<BUF>

§

impl<const BUF: usize> UnwindSafe for ConnectionEvent<BUF>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.