pub struct KwpRoutineManager<'a> { /* private fields */ }
Expand description

KWP2000 Routine execution wrapper

Implementations§

source§

impl<'a> KwpRoutineManager<'a>

source

pub fn new( rid: RoutineID, server: &'a mut DynamicDiagSession ) -> DiagServerResult<Self>

Creates a new routine manager. Upon creation, the KWP2000 diagnostic server will automatically attempt to enter extended diagnostic session mode, which is required for routine execution and management.

§Parameters
  • rid - The routine ID
  • server - Reference to running KWP2000 diagnostic server
§Returns

If an error of DiagError::ParameterInvalid is returned, then it means that the value of rid is invalid and violates the KWP2000 specification. Other DiagError’s will come from the attempt to set the ECU into extended diagnostic session mode.

source

pub fn start_routine(&self, entry_options: &[u8]) -> DiagServerResult<()>

Attempts to start the routine

source

pub fn stop_routine( &self, exit_options: &[u8] ) -> DiagServerResult<RoutineExitStatusByte>

Attempts to stop the routine. Note that some routines automatically exit themselves and do NOT need to be manually stopped

source

pub fn request_routine_results(&self) -> DiagServerResult<Vec<u8>>

Requests the results of the routine. If the routine was manually stopped prior to running this, it is best practice to check the [RoutineExitStatus] to see if the routine exited with [RoutineExitStatus::NormalExitWithResults] first.

Trait Implementations§

source§

impl<'a> Debug for KwpRoutineManager<'a>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for KwpRoutineManager<'a>

§

impl<'a> !RefUnwindSafe for KwpRoutineManager<'a>

§

impl<'a> Send for KwpRoutineManager<'a>

§

impl<'a> Sync for KwpRoutineManager<'a>

§

impl<'a> Unpin for KwpRoutineManager<'a>

§

impl<'a> !UnwindSafe for KwpRoutineManager<'a>

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