Class MavlinkMissionReceiver
Requests a plan's items in order and collects them, ending with an acknowledgement.
public sealed class MavlinkMissionReceiver : IDisposable
- Inheritance
-
MavlinkMissionReceiver
- Implements
- Inherited Members
Remarks
The machine holds the protocol's rules and nothing else: no IO, no timers. Feed it the
frames off a link and send back what it hands you; a frame it does not handle comes back
as null rather than as an error, so one link's traffic can be routed through several
machines in turn.
Constructors
MavlinkMissionReceiver(byte, byte, byte)
Creates a receiver for a plan from a target vehicle.
public MavlinkMissionReceiver(byte targetSystem, byte targetComponent, byte missionType = 0)
Parameters
targetSystembyteThe sending system's id.
targetComponentbyteThe sending component's id.
missionTypebyteThe
MAV_MISSION_TYPEto transfer.
Properties
Complete
Whether every item has been received and the acknowledgement produced.
public bool Complete { get; }
Property Value
Expected
The next sequence number the receiver expects.
public ushort Expected { get; }
Property Value
Methods
Dispose()
Releases the receiver.
public void Dispose()
OnFrame(MavlinkFrame, MavlinkHeader)
Handles an incoming frame, if it is one this transfer is waiting for.
public MavlinkReceiverStep? OnFrame(MavlinkFrame frame, MavlinkHeader header)
Parameters
frameMavlinkFrameThe frame off the link.
headerMavlinkHeaderThe addressing fields to stamp on the reply.
Returns
- MavlinkReceiverStep?
The step taken, or
nullif the frame carries a message this transfer does not handle.
Remarks
A MISSION_COUNT opens the transfer and a MISSION_ITEM_INT advances it.
RequestList(MavlinkHeader)
Builds the frame that starts a download.
public MavlinkFrame RequestList(MavlinkHeader header)
Parameters
headerMavlinkHeaderThe addressing fields to stamp on the frame.
Returns
- MavlinkFrame
The
MISSION_REQUEST_LISTframe.