Skip to main content

pamoja_mavlink_enum_entry_at

Function pamoja_mavlink_enum_entry_at 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_enum_entry_at( enumeration: *const c_char, index: usize, out_name: *mut *mut PamojaString, out_value: *mut u64, ) -> PamojaStatus
Expand description

Returns an enumeration’s entry at an index, in dialect order.

§Arguments

  • enumeration - the enumeration’s name, as null-terminated UTF-8.
  • index - the position, from 0 below the count pamoja_mavlink_enum_len gives.
  • out_name - receives the entry’s name, which the caller releases with pamoja_string_free.
  • out_value - receives the value it names.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument if the enumeration is unknown, index is past the end, or an argument is null.

§Safety

enumeration must be a valid null-terminated UTF-8 string or null, and out_name and out_value must be valid for a write or null.