Table of Contents

Class MavlinkVerifier

Namespace
Pamoja.Mavlink
Assembly
Pamoja.Mavlink.dll

A signing key and the timestamps it has already accepted.

public sealed class MavlinkVerifier : IDisposable
Inheritance
MavlinkVerifier
Implements
Inherited Members

Constructors

Creates a verifier.

public MavlinkVerifier(ReadOnlySpan<byte> key)

Parameters

key ReadOnlySpan<byte>

The shared signing key, KeyLength bytes.

Exceptions

ArgumentException

The key is the wrong length.

Methods

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

public void Dispose()

Sets how far a timestamp may run ahead of the last one accepted.

public void SetWindow(ulong window)

Parameters

window ulong

The window in timestamp units, ten microseconds each.

A wider window tolerates a noisier link; a narrower one narrows the chance of a replay landing inside it.

Checks a frame's signature and its place in the timestamp sequence.

public void Verify(MavlinkFrame frame)

Parameters

frame MavlinkFrame

The frame to check.

Exceptions

PamojaException

The frame is unsigned, the signature does not match the key, or the timestamp has been seen before.