Expand description
The C ABI for the MAVLink service protocols: mission transfer, commands, and offboard setpoints.
A frame carries one message; a real exchange with an autopilot is a sequence of them with rules about order, matching, and retransmission. The machines here hold those rules and nothing else: no IO, no timers, no allocation beyond the handle. A caller feeds each one the frames off its link and sends back what the machine hands it, applying its own timing policy for timeouts and retransmission.
Every machine takes a whole frame and answers with a whole frame, so the payload decoding, message-id dispatch, and reply encoding happen once, here, rather than in each caller. A frame a machine does not handle is reported as ignored rather than as an error, so one link’s traffic can be routed through several machines in turn.
Structs§
- Pamoja
Mavlink Command - Tracks one command awaiting its acknowledgement.
- Pamoja
Mavlink Mission Receiver - Requests a plan’s items in order and collects them, ending with an acknowledgement.
- Pamoja
Mavlink Mission Sender - Holds a plan and answers a receiver’s requests for its items.
Constants§
- PAMOJA_
MAVLINK_ ACK_ FINAL - The command finished; the value is its
MAV_RESULT. - PAMOJA_
MAVLINK_ ACK_ IN_ PROGRESS - The command is still running; the value is the reported progress percent, or 255 when the autopilot does not report one.
- PAMOJA_
MAVLINK_ ACK_ UNRELATED - An acknowledgement was for a different command; keep waiting.
- PAMOJA_
MAVLINK_ MAX_ RETRIES - The number of times a request is retransmitted before a transfer is abandoned, as the mission protocol recommends.
- PAMOJA_
MAVLINK_ RECEIVER_ ACK - A mission receiver answered with the acknowledgement that ends the transfer.
- PAMOJA_
MAVLINK_ RECEIVER_ REQUEST - A mission receiver answered with a request for the next item.
- PAMOJA_
MAVLINK_ SENDER_ FINISHED - A mission sender saw the receiver’s acknowledgement; the transfer is over.
- PAMOJA_
MAVLINK_ SENDER_ REPLY - A mission sender answered with a frame to send.
- PAMOJA_
MAVLINK_ STEP_ IGNORED - The frame was not one this machine handles; nothing was produced.
- PAMOJA_
MAVLINK_ TYPEMASK_ ACCELERATION - Use the acceleration fields of a setpoint.
- PAMOJA_
MAVLINK_ TYPEMASK_ FORCE - Treat the acceleration fields as a force.
- PAMOJA_
MAVLINK_ TYPEMASK_ POSITION - Use the position fields of a setpoint.
- PAMOJA_
MAVLINK_ TYPEMASK_ VELOCITY - Use the velocity fields of a setpoint.
- PAMOJA_
MAVLINK_ TYPEMASK_ YAW - Use the yaw field of a setpoint.
- PAMOJA_
MAVLINK_ TYPEMASK_ YAW_ RATE - Use the yaw rate field of a setpoint.
Functions§
- pamoja_
mavlink_ ⚠command_ confirmation - Returns the
confirmationcount to stamp on the command being sent. - pamoja_
mavlink_ ⚠command_ free - Releases a command tracker.
- pamoja_
mavlink_ ⚠command_ id - Returns the command id being tracked.
- pamoja_
mavlink_ command_ new - Starts tracking a command.
- pamoja_
mavlink_ ⚠command_ on_ frame - Classifies an incoming frame against the command in flight.
- pamoja_
mavlink_ ⚠command_ on_ timeout - Records a timeout and reports whether the command may be resent.
- pamoja_
mavlink_ ⚠mission_ receiver_ expected - Returns the next sequence number the receiver expects.
- pamoja_
mavlink_ ⚠mission_ receiver_ free - Releases a receiver.
- pamoja_
mavlink_ ⚠mission_ receiver_ is_ complete - Reports whether the transfer has finished.
- pamoja_
mavlink_ mission_ receiver_ new - Creates a receiver for a plan from a target vehicle.
- pamoja_
mavlink_ ⚠mission_ receiver_ on_ frame - Handles an incoming frame, if it is one this transfer is waiting for.
- pamoja_
mavlink_ ⚠mission_ receiver_ request_ list - Builds the frame that starts a download.
- pamoja_
mavlink_ ⚠mission_ sender_ add_ item - Appends an item to the plan.
- pamoja_
mavlink_ ⚠mission_ sender_ count - Builds the frame that opens an upload.
- pamoja_
mavlink_ ⚠mission_ sender_ free - Releases a sender.
- pamoja_
mavlink_ ⚠mission_ sender_ len - Returns the number of items in the plan.
- pamoja_
mavlink_ mission_ sender_ new - Creates a sender for a plan bound for a target vehicle, with no items yet.
- pamoja_
mavlink_ ⚠mission_ sender_ on_ frame - Handles an incoming frame, if it is one this transfer answers.
- pamoja_
mavlink_ ⚠offboard_ global_ position - Builds a global-frame position setpoint frame.
- pamoja_
mavlink_ ⚠offboard_ local_ position - Builds a local-frame position setpoint frame.
- pamoja_
mavlink_ ⚠offboard_ local_ velocity - Builds a local-frame velocity setpoint frame.
- pamoja_
mavlink_ offboard_ type_ mask - Builds a setpoint
type_maskfrom the fields to use.