pub struct MavlinkClient { /* private fields */ }Expand description
ctx.mavlink — read and write through the host’s MAVLink router.
Implementations§
Source§impl MavlinkClient
impl MavlinkClient
Sourcepub async fn send(
&self,
msg_bytes: &[u8],
component_id: Option<i64>,
) -> Result<Value, ClientError>
pub async fn send( &self, msg_bytes: &[u8], component_id: Option<i64>, ) -> Result<Value, ClientError>
Send a raw MAVLink frame, optionally from a registered component id.
Sourcepub async fn subscribe(
&self,
msg_name: &str,
callback: EventCallback,
) -> Result<(), ClientError>
pub async fn subscribe( &self, msg_name: &str, callback: EventCallback, ) -> Result<(), ClientError>
Subscribe to a MAVLink message name; the callback fires for each matched
delivery with the msg_name, frame, and timestamp_ms map.
Sourcepub async fn register_component(
&self,
comp_id: i64,
kind: &str,
) -> Result<Value, ClientError>
pub async fn register_component( &self, comp_id: i64, kind: &str, ) -> Result<Value, ClientError>
Register this plugin as a MAVLink component of the given kind.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MavlinkClient
impl !UnwindSafe for MavlinkClient
impl Freeze for MavlinkClient
impl Send for MavlinkClient
impl Sync for MavlinkClient
impl Unpin for MavlinkClient
impl UnsafeUnpin for MavlinkClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more