Contenu principal

serializemsg

R2026b

Serialize MAVLink message to binary buffer

Description

buffer = serializemsg(mavlink,msg) serializes a MAVLink message structure to a binary buffer.

Input Arguments

collapse all

Local MAVLink client, specified as a mavlinkio object.

MAVLink message, specified as a structure with the fields:

  • MsgID: Positive integer for message ID.

  • Payload: Structure containing fields for the specific message definition.

Tip

To create a blank message, use the createmsg object function of the mavlinkdialect object.

Output Arguments

collapse all

Serialized message, returned as vector of uint8 integers.

Data Types: uint8

Version History

Introduced in R2019a