Skip to main content

pamoja_mavlink_message_new

Function pamoja_mavlink_message_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_message_new( schema: *const PamojaMavlinkSchema, out_message: *mut *mut PamojaMavlinkMessage, ) -> PamojaStatus
Expand description

Creates a message with every field zero.

§Arguments

  • schema - the shape of the message to build.
  • out_message - set to a new message handle on success, which the caller releases with pamoja_mavlink_message_free.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if either pointer is null or the shape does not fit a MAVLink payload.

§Safety

schema must be a live schema handle, and out_message must point at writable storage for one pointer.