Table of Contents

Class MavlinkParser

Namespace
Pamoja.Mavlink
Assembly
Pamoja.Mavlink.dll

A streaming frame parser, and the frames it has completed.

public sealed class MavlinkParser : IDisposable
Inheritance
MavlinkParser
Implements
Inherited Members

Constructors

Creates a parser with an empty buffer.

public MavlinkParser()

Properties

How many completed frames are waiting to be taken.

public int Pending { get; }

Property Value

int

Methods

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Feeds bytes off a link and returns the frames that completed.

public IReadOnlyList<MavlinkFrame> Push(ReadOnlySpan<byte> bytes, MavlinkDialect? dialect = null)

Parameters

bytes ReadOnlySpan<byte>

The bytes just read off the link.

dialect MavlinkDialect

The dialect to prefer, or null for the common one.

Returns

IReadOnlyList<MavlinkFrame>

The frames that completed, which may be none.

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.