Skip to main content

DataLink

Trait DataLink 

Source
pub trait DataLink: Send + Sync {
    // Required method
    fn exchange<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        unit_id: u8,
        request_pdu: &'life1 [u8],
        response_pdu: &'life2 mut [u8],
    ) -> Pin<Box<dyn Future<Output = Result<usize, DataLinkError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn exchange<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, unit_id: u8, request_pdu: &'life1 [u8], response_pdu: &'life2 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<usize, DataLinkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Send a request PDU to a unit and write the response PDU into response_pdu.

Returns the number of response bytes written to response_pdu.

Implementors§