#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_mavlink_signer_sign(
signer: *mut PamojaMavlinkSigner,
header: PamojaMavlinkHeader,
msgid: u32,
payload: *const u8,
payload_len: usize,
crc_extra: u8,
out_frame: *mut *mut PamojaMavlinkFrame,
) -> PamojaStatusExpand description
Signs a message into a v2 frame.
Each call advances the signer’s timestamp, which is what makes a replayed frame detectable.
§Arguments
signer- the signer to use.header- the addressing fields to stamp on the frame.msgid- the message id.payload- the message payload.payload_len- how many bytespayloadholds.crc_extra- the seed for this message id.out_frame- set to the signed frame on success, and to null otherwise.
§Returns
PamojaStatus::Ok on success.
§Errors
Returns PamojaStatus::InvalidArgument if signer or out_frame is null,
or the payload does not fit a frame.
§Safety
signer must be a live signer handle, payload must point to payload_len
readable bytes when the length is non-zero, and out_frame must point at
writable storage for one pointer.