Trait autd3_driver::link::Link
source · pub trait Link: Send + Sync {
// Required methods
fn close(
&mut self
) -> impl Future<Output = Result<(), AUTDInternalError>> + Send;
fn send(
&mut self,
tx: &TxDatagram
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send;
fn receive(
&mut self,
rx: &mut [RxMessage]
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send;
fn is_open(&self) -> bool;
fn timeout(&self) -> Duration;
// Provided methods
fn send_receive(
&mut self,
tx: &TxDatagram,
rx: &mut [RxMessage],
timeout: Option<Duration>,
ignore_ack: bool
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send { ... }
fn wait_msg_processed(
&mut self,
tx: &TxDatagram,
rx: &mut [RxMessage],
timeout: Duration,
ignore_ack: bool
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send { ... }
}
Expand description
Link is a interface to the AUTD device
Required Methods§
sourcefn send(
&mut self,
tx: &TxDatagram
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
fn send( &mut self, tx: &TxDatagram ) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
Send data to devices
Provided Methods§
sourcefn send_receive(
&mut self,
tx: &TxDatagram,
rx: &mut [RxMessage],
timeout: Option<Duration>,
ignore_ack: bool
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
fn send_receive( &mut self, tx: &TxDatagram, rx: &mut [RxMessage], timeout: Option<Duration>, ignore_ack: bool ) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
Send and receive data
sourcefn wait_msg_processed(
&mut self,
tx: &TxDatagram,
rx: &mut [RxMessage],
timeout: Duration,
ignore_ack: bool
) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
fn wait_msg_processed( &mut self, tx: &TxDatagram, rx: &mut [RxMessage], timeout: Duration, ignore_ack: bool ) -> impl Future<Output = Result<bool, AUTDInternalError>> + Send
Wait until message is processed
Object Safety§
This trait is not object safe.