Skip to main content

pamoja_mavlink_enum_entry

Function pamoja_mavlink_enum_entry 

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

Names the entry of an enumeration that stands for a value.

§Arguments

  • enumeration - the enumeration’s name, such as MAV_STATE, as null-terminated UTF-8.
  • value - the value a field carried.
  • out_name - receives the entry’s name, which the caller releases with pamoja_string_free, or null when no entry names the value.

§Returns

PamojaStatus::Ok, whether or not an entry names the value, or PamojaStatus::InvalidArgument if the enumeration is unknown or an argument is null.

§Safety

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