Trait mavlink::AsyncMavConnection

source ·
pub trait AsyncMavConnection<M>
where M: Message + Sync + Send,
{ // 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§

source

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.

source

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

source

fn set_protocol_version(&mut self, version: MavlinkVersion)

source

fn get_protocol_version(&self) -> MavlinkVersion

source

fn setup_signing(&mut self, signing_data: Option<SigningConfig>)

Available on crate feature signing only.

Setup secret key used for message signing, or disable message signing

Provided Methods§

source

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

source

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

source

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,

Send a message with default header

Implementors§