Struct MessageInfo

Namespace
MavNet.Protocol
Assembly
MavNet.Protocol.dll

Per-message metadata required by the MAVLink wire protocol. Returned from MessageRegistry.TryGet; used by the frame parser for CRC validation, by encoders for truncation, and by inspection/replay tooling.

public readonly record struct MessageInfo : IEquatable<MessageInfo>
Implements
Inherited Members

Constructors

MessageInfo(uint, byte, byte, byte, string, MessageCapabilities)

Per-message metadata required by the MAVLink wire protocol. Returned from MessageRegistry.TryGet; used by the frame parser for CRC validation, by encoders for truncation, and by inspection/replay tooling.

public MessageInfo(uint MsgId, byte CrcExtra, byte MinPayloadLength, byte MaxPayloadLength, string Name, MessageCapabilities Flags = MessageCapabilities.None)

Parameters

MsgId uint

24-bit MAVLink message id (0..16,777,215).

CrcExtra byte

Per-message seed mixed into the frame CRC. Required to validate inbound CRCs.

MinPayloadLength byte

Truncation floor — MAVLink v2 senders may strip trailing zero bytes of extension fields down to this length. Wire payload shorter than this is malformed.

MaxPayloadLength byte

Untruncated payload length. Decoders zero-fill received payloads up to this length before deserialising. Wire payload longer than this is malformed.

Name string

SHOUTY_SNAKE_CASE message name from the dialect XML (e.g. "HEARTBEAT").

Flags MessageCapabilities

Capability hints derived from the spec (HasExtensions, etc.).

Properties

CrcExtra

Per-message seed mixed into the frame CRC. Required to validate inbound CRCs.

public byte CrcExtra { get; init; }

Property Value

byte

Flags

Capability hints derived from the spec (HasExtensions, etc.).

public MessageCapabilities Flags { get; init; }

Property Value

MessageCapabilities

MaxPayloadLength

Untruncated payload length. Decoders zero-fill received payloads up to this length before deserialising. Wire payload longer than this is malformed.

public byte MaxPayloadLength { get; init; }

Property Value

byte

MinPayloadLength

Truncation floor — MAVLink v2 senders may strip trailing zero bytes of extension fields down to this length. Wire payload shorter than this is malformed.

public byte MinPayloadLength { get; init; }

Property Value

byte

MsgId

24-bit MAVLink message id (0..16,777,215).

public uint MsgId { get; init; }

Property Value

uint

Name

SHOUTY_SNAKE_CASE message name from the dialect XML (e.g. "HEARTBEAT").

public string Name { get; init; }

Property Value

string

Methods

IsValidPayloadLength(int)

Wire-length range check. Used by the parser before CRC validation.

public bool IsValidPayloadLength(int length)

Parameters

length int

Returns

bool