pub struct UdsClient<'a, T: CanSocketTx> { /* private fields */ }Implementations§
Source§impl<'a, T: CanSocketTx> UdsClient<'a, T>
impl<'a, T: CanSocketTx> UdsClient<'a, T>
pub fn new(channel: T, id: u32, resp: &'a LazyLock<Arc<ResponseSlot>>) -> Self
Sourcepub async fn send_command<P: Into<u8>, M: Into<u8>>(
&mut self,
pci: P,
cmd: M,
args: &[u8],
) -> Result<(), DiagError>
pub async fn send_command<P: Into<u8>, M: Into<u8>>( &mut self, pci: P, cmd: M, args: &[u8], ) -> Result<(), DiagError>
Send a command without the response.
The frame includes
Sourcepub async fn send_frame(&mut self, frame: UdsFrame) -> Result<(), DiagError>
pub async fn send_frame(&mut self, frame: UdsFrame) -> Result<(), DiagError>
Send an UDS frame without the response.
Sourcepub async fn send_frame_with_response(
&mut self,
frame: UdsFrame,
) -> Result<UdsFrame, DiagError>
pub async fn send_frame_with_response( &mut self, frame: UdsFrame, ) -> Result<UdsFrame, DiagError>
Send an UDS frame without the response.
Source§impl<T: CanSocketTx> UdsClient<'_, T>
impl<T: CanSocketTx> UdsClient<'_, T>
Sourcepub async fn uds_reset_ecu(&mut self) -> Result<(), DiagError>
pub async fn uds_reset_ecu(&mut self) -> Result<(), DiagError>
Service ID: 0x11 - ECU Reset Description: The function will request an ECU reset event.
Source§impl<T: CanSocketTx> UdsClient<'_, T>
impl<T: CanSocketTx> UdsClient<'_, T>
Sourcepub async fn uds_real_time_data_slow(&mut self) -> Result<(), DiagError>
pub async fn uds_real_time_data_slow(&mut self) -> Result<(), DiagError>
Service ID: 0x2A - Data Transmission Sub-ID: 0x01 Description: The function will request an Realtime data sent from ECU with slow rate.
Sourcepub async fn uds_real_time_data_medium(&mut self) -> Result<(), DiagError>
pub async fn uds_real_time_data_medium(&mut self) -> Result<(), DiagError>
Service ID: 0x2A - Data Transmission Sub-ID: 0x02 Description: The function will request an Realtime data sent from ECU with medium rate.
Sourcepub async fn uds_real_time_data_fast(&mut self) -> Result<(), DiagError>
pub async fn uds_real_time_data_fast(&mut self) -> Result<(), DiagError>
Service ID: 0x2A - Data Transmission Sub-ID: 0x03 Description: The function will request an Realtime data sent from ECU with fast rate.
Sourcepub async fn uds_real_time_data_stop(&mut self) -> Result<(), DiagError>
pub async fn uds_real_time_data_stop(&mut self) -> Result<(), DiagError>
Service ID: 0x2A - Data Transmission Sub-ID: 0x04 Description: The function will send a stop event for realtime data from ECU.
Auto Trait Implementations§
impl<'a, T> Freeze for UdsClient<'a, T>where
T: Freeze,
impl<'a, T> !RefUnwindSafe for UdsClient<'a, T>
impl<'a, T> Send for UdsClient<'a, T>where
T: Send,
impl<'a, T> Sync for UdsClient<'a, T>where
T: Sync,
impl<'a, T> Unpin for UdsClient<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for UdsClient<'a, T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more