Class MavlinkCommand
Tracks one command awaiting its acknowledgement.
public sealed class MavlinkCommand : IDisposable
- Inheritance
-
MavlinkCommand
- Implements
- Inherited Members
Constructors
MavlinkCommand(ushort, byte)
Starts tracking a command.
public MavlinkCommand(ushort command, byte maxRetries = 5)
Parameters
commandushortThe
MAV_CMDid being sent.maxRetriesbyteHow many times the command may be resent after a timeout before the caller gives up.
Properties
Command
The command id being tracked.
public ushort Command { get; }
Property Value
Confirmation
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
Methods
Dispose()
Releases the tracker.
public void Dispose()
OnFrame(MavlinkFrame)
Classifies an incoming frame against the command in flight.
public MavlinkAckOutcome? OnFrame(MavlinkFrame frame)
Parameters
frameMavlinkFrameThe frame off the link.
Returns
- MavlinkAckOutcome?
The outcome, or
nullif the frame is not aCOMMAND_ACK.
OnTimeout()
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
nullonce the retry budget is exhausted.