Struct ecu_diagnostics::uds::UDSProtocol
source · pub struct UDSProtocol { /* private fields */ }
Expand description
UDS diagnostic protocol
Trait Implementations§
source§impl Clone for UDSProtocol
impl Clone for UDSProtocol
source§fn clone(&self) -> UDSProtocol
fn clone(&self) -> UDSProtocol
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 UDSProtocol
impl Debug for UDSProtocol
source§impl Default for UDSProtocol
impl Default for UDSProtocol
source§impl DiagProtocol<ByteWrapper<UdsError>> for UDSProtocol
impl DiagProtocol<ByteWrapper<UdsError>> for UDSProtocol
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, UdsErrorByte)>
fn process_ecu_response(r: &[u8]) -> Result<Vec<u8>, (u8, UdsErrorByte)>
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
Auto Trait Implementations§
impl Freeze for UDSProtocol
impl RefUnwindSafe for UDSProtocol
impl Send for UDSProtocol
impl Sync for UDSProtocol
impl Unpin for UDSProtocol
impl UnwindSafe for UDSProtocol
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