Skip to main content

pamoja_mavlink_schema_builder_build

Function pamoja_mavlink_schema_builder_build 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_schema_builder_build( builder: *mut PamojaMavlinkSchemaBuilder, out_schema: *mut *mut PamojaMavlinkSchema, ) -> PamojaStatus
Expand description

Puts the declared fields in wire order and finishes the shape.

The builder is consumed and released whether or not the shape is valid, so it must not be used again.

§Arguments

  • builder - the description to finish.
  • out_schema - set to a new schema handle on success, which the caller releases with pamoja_mavlink_schema_free.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if a pointer is null, if two fields share a name, or if the fields do not fit a MAVLink payload.

§Safety

builder must be a live builder handle, and out_schema must point at writable storage for one pointer.