Skip to main content

pamoja_mavlink_message_set_int

Function pamoja_mavlink_message_set_int 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_message_set_int( message: *mut PamojaMavlinkMessage, field: *const c_char, index: usize, value: i64, ) -> PamojaStatus
Expand description

Writes a signed integer into a field.

§Arguments

  • message - the message to write.
  • field - the field name.
  • index - the element to write, or 0 for 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, the field is floating-point, or the value does not fit the field’s type.

§Safety

message must be a live message handle and field a null-terminated C string.