Struct MessageInfo
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
MsgIduint24-bit MAVLink message id (0..16,777,215).
CrcExtrabytePer-message seed mixed into the frame CRC. Required to validate inbound CRCs.
MinPayloadLengthbyteTruncation floor — MAVLink v2 senders may strip trailing zero bytes of extension fields down to this length. Wire payload shorter than this is malformed.
MaxPayloadLengthbyteUntruncated payload length. Decoders zero-fill received payloads up to this length before deserialising. Wire payload longer than this is malformed.
NamestringSHOUTY_SNAKE_CASE message name from the dialect XML (e.g. "HEARTBEAT").
FlagsMessageCapabilitiesCapability 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
Flags
Capability hints derived from the spec (HasExtensions, etc.).
public MessageCapabilities Flags { get; init; }
Property Value
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
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
MsgId
24-bit MAVLink message id (0..16,777,215).
public uint MsgId { get; init; }
Property Value
Name
SHOUTY_SNAKE_CASE message name from the dialect XML (e.g. "HEARTBEAT").
public string Name { get; init; }
Property Value
Methods
IsValidPayloadLength(int)
Wire-length range check. Used by the parser before CRC validation.
public bool IsValidPayloadLength(int length)
Parameters
lengthint