Struct ecu_diagnostics::obd2::OBD2Protocol
source · pub struct OBD2Protocol {}
Expand description
OBD2 diagnostic protocol
Trait Implementations§
source§impl Clone for OBD2Protocol
impl Clone for OBD2Protocol
source§fn clone(&self) -> OBD2Protocol
fn clone(&self) -> OBD2Protocol
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OBD2Protocol
impl Debug for OBD2Protocol
source§impl Default for OBD2Protocol
impl Default for OBD2Protocol
source§fn default() -> OBD2Protocol
fn default() -> OBD2Protocol
Returns the “default value” for a type. Read more
source§impl DiagProtocol<ByteWrapper<Obd2Error>> for OBD2Protocol
impl DiagProtocol<ByteWrapper<Obd2Error>> for OBD2Protocol
source§fn get_basic_session_mode(&self) -> Option<DiagSessionMode>
fn get_basic_session_mode(&self) -> Option<DiagSessionMode>
Returns the alias to the ECU ‘default’ diagnostic session mode
Returns None if there is no session type control in the protocol
(For example basic OBD2)
source§fn get_protocol_name(&self) -> &'static str
fn get_protocol_name(&self) -> &'static str
Name of the diagnostic protocol
source§fn process_req_payload(&self, payload: &[u8]) -> DiagAction
fn process_req_payload(&self, payload: &[u8]) -> DiagAction
Process a byte array into a command
source§fn create_tp_msg(_response_required: bool) -> DiagPayload
fn create_tp_msg(_response_required: bool) -> DiagPayload
Generate the tester present message (If required)
source§fn make_session_control_msg(&self, _mode: &DiagSessionMode) -> Vec<u8>
fn make_session_control_msg(&self, _mode: &DiagSessionMode) -> Vec<u8>
Creates a session mod req message
source§fn process_ecu_response(r: &[u8]) -> Result<Vec<u8>, (u8, Obd2ErrorByte)>
fn process_ecu_response(r: &[u8]) -> Result<Vec<u8>, (u8, Obd2ErrorByte)>
Processes the ECU response, and checks to see if it is a positive or negative response,
this includes checking to see if the ECU is in a waiting state
source§fn get_diagnostic_session_list(&self) -> HashMap<u8, DiagSessionMode>
fn get_diagnostic_session_list(&self) -> HashMap<u8, DiagSessionMode>
Gets a hashmap of available diagnostic session modes
source§fn register_session_type(&mut self, _session: DiagSessionMode)
fn register_session_type(&mut self, _session: DiagSessionMode)
Registers a new custom diagnostic session mode
source§impl Ord for OBD2Protocol
impl Ord for OBD2Protocol
source§fn cmp(&self, other: &OBD2Protocol) -> Ordering
fn cmp(&self, other: &OBD2Protocol) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for OBD2Protocol
impl PartialEq for OBD2Protocol
source§fn eq(&self, other: &OBD2Protocol) -> bool
fn eq(&self, other: &OBD2Protocol) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OBD2Protocol
impl PartialOrd for OBD2Protocol
source§fn partial_cmp(&self, other: &OBD2Protocol) -> Option<Ordering>
fn partial_cmp(&self, other: &OBD2Protocol) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for OBD2Protocol
impl Eq for OBD2Protocol
impl StructuralPartialEq for OBD2Protocol
Auto Trait Implementations§
impl Freeze for OBD2Protocol
impl RefUnwindSafe for OBD2Protocol
impl Send for OBD2Protocol
impl Sync for OBD2Protocol
impl Unpin for OBD2Protocol
impl UnwindSafe for OBD2Protocol
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more