Class MavlinkParser
A streaming frame parser, and the frames it has completed.
public sealed class MavlinkParser : IDisposable
- Inheritance
-
MavlinkParser
- Implements
- Inherited Members
Constructors
MavlinkParser()
Creates a parser with an empty buffer.
public MavlinkParser()
Properties
Pending
How many completed frames are waiting to be taken.
public int Pending { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Push(ReadOnlySpan<byte>, MavlinkDialect?)
Feeds bytes off a link and returns the frames that completed.
public IReadOnlyList<MavlinkFrame> Push(ReadOnlySpan<byte> bytes, MavlinkDialect? dialect = null)
Parameters
bytesReadOnlySpan<byte>The bytes just read off the link.
dialectMavlinkDialectThe dialect to prefer, or
nullfor the common one.
Returns
- IReadOnlyList<MavlinkFrame>
The frames that completed, which may be none.
Remarks
Whatever a serial port or socket delivers can be pushed as it arrives, however it is split. Noise between frames is skipped rather than reported, which is what lets a parser join a stream already in progress.