Table of Contents

Class MavlinkMissionReceiver

Namespace
Pamoja.Mavlink
Assembly
Pamoja.Mavlink.dll

Requests a plan's items in order and collects them, ending with an acknowledgement.

public sealed class MavlinkMissionReceiver : IDisposable
Inheritance
MavlinkMissionReceiver
Implements
Inherited Members

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

Creates a receiver for a plan from a target vehicle.

public MavlinkMissionReceiver(byte targetSystem, byte targetComponent, byte missionType = 0)

Parameters

targetSystem byte

The sending system's id.

targetComponent byte

The sending component's id.

missionType byte

The MAV_MISSION_TYPE to transfer.

Properties

Whether every item has been received and the acknowledgement produced.

public bool Complete { get; }

Property Value

bool

The next sequence number the receiver expects.

public ushort Expected { get; }

Property Value

ushort

Methods

Releases the receiver.

public void Dispose()

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

public MavlinkReceiverStep? OnFrame(MavlinkFrame frame, MavlinkHeader header)

Parameters

frame MavlinkFrame

The frame off the link.

header MavlinkHeader

The addressing fields to stamp on the reply.

Returns

MavlinkReceiverStep?

The step taken, or null if the frame carries a message this transfer does not handle.

A MISSION_COUNT opens the transfer and a MISSION_ITEM_INT advances it.

Builds the frame that starts a download.

public MavlinkFrame RequestList(MavlinkHeader header)

Parameters

header MavlinkHeader

The addressing fields to stamp on the frame.

Returns

MavlinkFrame

The MISSION_REQUEST_LIST frame.