Skip to main content

pamoja_mavlink_schema_builder_field

Function pamoja_mavlink_schema_builder_field 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_schema_builder_field( builder: *mut PamojaMavlinkSchemaBuilder, name: *const c_char, field_type: u32, array_len: u8, ) -> PamojaStatus
Expand description

Adds a base field, in the order the definition declares it.

§Arguments

  • builder - the description to extend.
  • name - the field name.
  • field_type - the field’s type, one of the PAMOJA_MAVLINK_FIELD_* codes.
  • array_len - the element count for an array, or 0 for a scalar.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if a pointer is null, name is not UTF-8, or field_type is not a MAVLink field type.

§Safety

builder must be a live builder handle and name a null-terminated C string.