#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_mavlink_message_set_number(
message: *mut PamojaMavlinkMessage,
field: *const c_char,
index: usize,
value: f64,
) -> PamojaStatusExpand description
Writes a double into a field, converting it to the field’s type.
This is the writing a host language with one numeric type needs. A value bound for an integer field must be a whole number within that field’s range, so a fractional or oversized value is refused rather than silently truncated.
§Arguments
message- the message to write.field- the field name.index- the element to write, or0for a scalar field.value- the value to store.
§Returns
PamojaStatus::Ok on success.
§Errors
Returns PamojaStatus::InvalidArgument if a pointer is null, the message has no such
field, the element is past the end of an array, or an integer field is given a value
that is fractional, infinite, not a number, or outside the range its width holds.
§Safety
message must be a live message handle and field a null-terminated C string.