Trait mavlink::AsyncMavConnection
source · pub trait AsyncMavConnection<M>{
// Required methods
fn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(MavHeader, M), MessageReadError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
header: &'life1 MavHeader,
data: &'life2 M,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn set_protocol_version(&mut self, version: MavlinkVersion);
fn get_protocol_version(&self) -> MavlinkVersion;
fn setup_signing(&mut self, signing_data: Option<SigningConfig>);
// Provided methods
fn send_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 MavFrame<M>,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait { ... }
fn recv_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MavFrame<M>, MessageReadError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn send_default<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 M,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait { ... }
}
Expand description
An async MAVLink connection
Required Methods§
sourcefn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(MavHeader, M), MessageReadError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(MavHeader, M), MessageReadError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Receive a mavlink message.
Yield until a valid frame is received, ignoring invalid messages.
sourcefn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
header: &'life1 MavHeader,
data: &'life2 M,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
header: &'life1 MavHeader,
data: &'life2 M,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Send a mavlink message
fn set_protocol_version(&mut self, version: MavlinkVersion)
fn get_protocol_version(&self) -> MavlinkVersion
sourcefn setup_signing(&mut self, signing_data: Option<SigningConfig>)
Available on crate feature signing
only.
fn setup_signing(&mut self, signing_data: Option<SigningConfig>)
signing
only.Setup secret key used for message signing, or disable message signing
Provided Methods§
sourcefn send_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 MavFrame<M>,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn send_frame<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 MavFrame<M>,
) -> Pin<Box<dyn Future<Output = Result<usize, MessageWriteError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Write whole frame
sourcefn recv_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MavFrame<M>, MessageReadError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn recv_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MavFrame<M>, MessageReadError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Read whole frame