docan_rs/client/service/
request_transfer_exit.rs1use crate::{client::DoCanClient, DoCanResult};
4use iso14229_1::Service;
5use iso15765_2::can::AddressType;
6use rs_can::{CanDevice, CanFrame};
7use std::{fmt::Display, hash::Hash};
8
9impl<D, C, F> DoCanClient<D, C, F>
10where
11 D: CanDevice<Channel = C, Frame = F> + Clone + Send + 'static,
12 C: Clone + Eq + Display + Hash + Send + Sync + 'static,
13 F: CanFrame<Channel = C> + Clone + Display + 'static,
14{
15 pub async fn request_transfer_exit(&mut self, parameter: Vec<u8>) -> DoCanResult<Vec<u8>> {
16 let cfg = self.context.get_cfg().await;
17 let request = Self::make_request(Service::RequestTransferExit, None, parameter, &cfg)?;
18
19 let response = self
20 .send_and_response(AddressType::Physical, request, None, &cfg)
21 .await?;
22
23 Ok(response.raw_data().to_vec())
24 }
25}