#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_mavlink_mission_receiver_on_frame(
receiver: *mut PamojaMavlinkMissionReceiver,
frame: *const PamojaMavlinkFrame,
header: PamojaMavlinkHeader,
out_kind: *mut u32,
out_accepted: *mut *mut PamojaMavlinkMessage,
out_reply: *mut *mut PamojaMavlinkFrame,
) -> PamojaStatusExpand description
Handles an incoming frame, if it is one this transfer is waiting for.
A MISSION_COUNT opens the transfer and a MISSION_ITEM_INT advances it. Any other
message sets out_kind to PAMOJA_MAVLINK_STEP_IGNORED and produces nothing.
§Arguments
receiver- the transfer.frame- the frame off the link.header- the addressing fields to stamp on the reply.out_kind- set toPAMOJA_MAVLINK_RECEIVER_REQUEST,PAMOJA_MAVLINK_RECEIVER_ACK, orPAMOJA_MAVLINK_STEP_IGNORED.out_accepted- set to theMISSION_ITEM_INTthe frame carried if it was the one expected next, as a message the caller reads by field name and releases withpamoja_mavlink_message_free, or to null.out_reply- set to the frame to send back, which the caller releases withpamoja_mavlink_frame_free, or to null if the frame was ignored.
§Returns
PamojaStatus::Ok on success, including when the frame was ignored.
§Errors
Returns PamojaStatus::InvalidArgument if any pointer is null.
§Safety
receiver must be a live receiver handle, frame a live frame handle, and each out
pointer must point at writable storage for its value.