Struct ecu_diagnostics::kwp2000::Kwp2000Cmd
source · [−]pub struct Kwp2000Cmd { /* private fields */ }
Expand description
Kwp2000 message payload
Implementations
sourceimpl Kwp2000Cmd
impl Kwp2000Cmd
sourcepub fn new(sid: KWP2000Command, args: &[u8], need_response: bool) -> Self
pub fn new(sid: KWP2000Command, args: &[u8], need_response: bool) -> Self
Creates a new KWP2000 Payload
sourcepub fn get_kwp_sid(&self) -> KWP2000Command
pub fn get_kwp_sid(&self) -> KWP2000Command
Returns the KWP2000 Service ID of the command
Trait Implementations
sourceimpl BaseServerPayload for Kwp2000Cmd
impl BaseServerPayload for Kwp2000Cmd
sourcefn get_payload(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn get_payload(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Gets the payload portion of the diagnostic message (Not including the SID)
sourcefn get_sid_byte(&self) -> u8
fn get_sid_byte(&self) -> u8
Gets the SID (Service ID) byte from the payload
sourcefn to_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn to_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Gets the entire message as a byte array. This is what is sent to the ECU
sourcefn requires_response(&self) -> bool
fn requires_response(&self) -> bool
Boolean indicating if the diagnostic server should poll the ECU for a response after sending the payload
sourceimpl Clone for Kwp2000Cmd
impl Clone for Kwp2000Cmd
sourcefn clone(&self) -> Kwp2000Cmd
fn clone(&self) -> Kwp2000Cmd
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Kwp2000Cmd
impl Send for Kwp2000Cmd
impl Sync for Kwp2000Cmd
impl Unpin for Kwp2000Cmd
impl UnwindSafe for Kwp2000Cmd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more