Trait autd3_core::link::Link

source ·
pub trait Link<T: Transducer>: Send {
    // Required methods
    fn open(&mut self, geometry: &Geometry<T>) -> Result<(), AUTDInternalError>;
    fn close(&mut self) -> Result<(), AUTDInternalError>;
    fn send(&mut self, tx: &TxDatagram) -> Result<bool, AUTDInternalError>;
    fn receive(
        &mut self,
        rx: &mut RxDatagram
    ) -> Result<bool, AUTDInternalError>;
    fn is_open(&self) -> bool;
    fn timeout(&self) -> Duration;

    // Provided methods
    fn send_receive(
        &mut self,
        tx: &TxDatagram,
        rx: &mut RxDatagram,
        timeout: Duration
    ) -> Result<bool, AUTDInternalError> { ... }
    fn wait_msg_processed(
        &mut self,
        msg_id: u8,
        rx: &mut RxDatagram,
        timeout: Duration
    ) -> Result<bool, AUTDInternalError> { ... }
}
Expand description

Link is a interface to the AUTD device.

Required Methods§

source

fn open(&mut self, geometry: &Geometry<T>) -> Result<(), AUTDInternalError>

source

fn close(&mut self) -> Result<(), AUTDInternalError>

source

fn send(&mut self, tx: &TxDatagram) -> Result<bool, AUTDInternalError>

source

fn receive(&mut self, rx: &mut RxDatagram) -> Result<bool, AUTDInternalError>

source

fn is_open(&self) -> bool

source

fn timeout(&self) -> Duration

Provided Methods§

source

fn send_receive( &mut self, tx: &TxDatagram, rx: &mut RxDatagram, timeout: Duration ) -> Result<bool, AUTDInternalError>

source

fn wait_msg_processed( &mut self, msg_id: u8, rx: &mut RxDatagram, timeout: Duration ) -> Result<bool, AUTDInternalError>

Trait Implementations§

source§

impl<T: Transducer> Link<T> for Box<dyn Link<T>>

source§

fn open(&mut self, geometry: &Geometry<T>) -> Result<(), AUTDInternalError>

source§

fn close(&mut self) -> Result<(), AUTDInternalError>

source§

fn send(&mut self, tx: &TxDatagram) -> Result<bool, AUTDInternalError>

source§

fn receive(&mut self, rx: &mut RxDatagram) -> Result<bool, AUTDInternalError>

source§

fn is_open(&self) -> bool

source§

fn timeout(&self) -> Duration

source§

fn send_receive( &mut self, tx: &TxDatagram, rx: &mut RxDatagram, timeout: Duration ) -> Result<bool, AUTDInternalError>

source§

fn wait_msg_processed( &mut self, msg_id: u8, rx: &mut RxDatagram, timeout: Duration ) -> Result<bool, AUTDInternalError>

Implementations on Foreign Types§

source§

impl<T: Transducer> Link<T> for Box<dyn Link<T>>

Implementors§