Class MavlinkDialect
The CRC_EXTRA seeds of a dialect beyond the common one.
public sealed class MavlinkDialect : IDisposable
- Inheritance
-
MavlinkDialect
- Implements
- Inherited Members
Remarks
A receiver must know a message's CRC_EXTRA before it can check the frame carrying it. Entries added here are consulted before the built-in common-dialect registry, so a private dialect may also override an id the common one defines.
Constructors
MavlinkDialect()
Creates an empty dialect table.
public MavlinkDialect()
Methods
Add(uint, byte)
Adds or replaces the seed for a message id.
public void Add(uint msgid, byte crcExtra)
Parameters
AddMessage(uint, string, IReadOnlyList<MavlinkField>)
Adds a message by its definition, deriving the seed.
public byte AddMessage(uint msgid, string name, IReadOnlyList<MavlinkField> fields)
Parameters
msgiduintThe message id.
namestringThe message name.
fieldsIReadOnlyList<MavlinkField>The base fields in wire order.
Returns
- byte
The seed that was derived and added.
Remarks
This is the whole path for a vendor dialect: describe the message once, and every frame carrying it checks from then on.
AddSchema(MavlinkSchema)
Adds a message shape, so frames carrying it check.
public void AddSchema(MavlinkSchema schema)
Parameters
schemaMavlinkSchemaThe shape whose id and seed to add.
Remarks
This is the whole path for a dialect described field by field: build the shape once, register it, and every frame carrying that message checks from then on.
CrcExtra(uint)
Returns the seed this dialect resolves a message id to.
public byte? CrcExtra(uint msgid)
Parameters
msgiduintThe message id to look up.
Returns
- byte?
The seed, or
nullif neither this table nor the common dialect knows the id.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()