Table of Contents

Class MavlinkCommand

Namespace
Pamoja.Mavlink
Assembly
Pamoja.Mavlink.dll

Tracks one command awaiting its acknowledgement.

public sealed class MavlinkCommand : IDisposable
Inheritance
MavlinkCommand
Implements
Inherited Members

Constructors

Starts tracking a command.

public MavlinkCommand(ushort command, byte maxRetries = 5)

Parameters

command ushort

The MAV_CMD id being sent.

maxRetries byte

How many times the command may be resent after a timeout before the caller gives up.

Properties

The command id being tracked.

public ushort Command { get; }

Property Value

ushort

The confirmation count to stamp on the command being sent: zero for the first transmission, incremented on each retransmission.

public byte Confirmation { get; }

Property Value

byte

Methods

Releases the tracker.

public void Dispose()

Classifies an incoming frame against the command in flight.

public MavlinkAckOutcome? OnFrame(MavlinkFrame frame)

Parameters

frame MavlinkFrame

The frame off the link.

Returns

MavlinkAckOutcome?

The outcome, or null if the frame is not a COMMAND_ACK.

Records a timeout and reports whether the command may be resent.

public byte? OnTimeout()

Returns

byte?

The new confirmation count to stamp on the resend, or null once the retry budget is exhausted.