Struct ecu_diagnostics::kwp2000::Kwp2000Protocol
source · pub struct Kwp2000Protocol { /* private fields */ }
Expand description
KWP2000 diagnostic protocol
Trait Implementations§
source§impl Clone for Kwp2000Protocol
impl Clone for Kwp2000Protocol
source§fn clone(&self) -> Kwp2000Protocol
fn clone(&self) -> Kwp2000Protocol
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 Kwp2000Protocol
impl Debug for Kwp2000Protocol
source§impl Default for Kwp2000Protocol
impl Default for Kwp2000Protocol
source§fn default() -> Kwp2000Protocol
fn default() -> Kwp2000Protocol
Creates a new KWP2000 protocol with standard session types
source§impl DiagProtocol<ByteWrapper<KwpError>> for Kwp2000Protocol
impl DiagProtocol<ByteWrapper<KwpError>> for Kwp2000Protocol
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, KwpErrorByte)>
fn process_ecu_response(r: &[u8]) -> Result<Vec<u8>, (u8, KwpErrorByte)>
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_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 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
Auto Trait Implementations§
impl Freeze for Kwp2000Protocol
impl RefUnwindSafe for Kwp2000Protocol
impl Send for Kwp2000Protocol
impl Sync for Kwp2000Protocol
impl Unpin for Kwp2000Protocol
impl UnwindSafe for Kwp2000Protocol
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