Skip to main content

pamoja_mavlink_mission_sender_on_frame

Function pamoja_mavlink_mission_sender_on_frame 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_mission_sender_on_frame( sender: *const PamojaMavlinkMissionSender, frame: *const PamojaMavlinkFrame, header: PamojaMavlinkHeader, out_kind: *mut u32, out_result: *mut u8, out_reply: *mut *mut PamojaMavlinkFrame, ) -> PamojaStatus
Expand description

Handles an incoming frame, if it is one this transfer answers.

A MISSION_REQUEST_LIST is answered with the count, a MISSION_REQUEST_INT (or the older MISSION_REQUEST) with the item asked for, and a request past the end of the plan with a MISSION_ACK reporting an invalid sequence. A MISSION_ACK from the receiver ends the transfer. Any other message sets out_kind to PAMOJA_MAVLINK_STEP_IGNORED.

§Arguments

  • sender - the plan.
  • frame - the frame off the link.
  • header - the addressing fields to stamp on the reply.
  • out_kind - set to PAMOJA_MAVLINK_SENDER_REPLY, PAMOJA_MAVLINK_SENDER_FINISHED, or PAMOJA_MAVLINK_STEP_IGNORED.
  • out_result - set to the receiver’s MAV_MISSION_RESULT when the transfer finished.
  • out_reply - set to the frame to send back, which the caller releases with pamoja_mavlink_frame_free, or to null if there is nothing to send.

§Returns

PamojaStatus::Ok on success, including when the frame was ignored.

§Errors

Returns PamojaStatus::InvalidArgument if any pointer is null.

§Safety

sender must be a live sender handle, frame a live frame handle, and each out pointer must point at writable storage for its value.