This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

serializemsg

Serialize MAVLink message to binary buffer

Syntax

buffer = serializemsg(mavlink,msg)

Description

buffer = serializemsg(mavlink,msg) serializes a MAVLink message structure to a binary buffer for transmission. This buffer is for manual transmission using your own communication channel. To send over UDP, see sendmsg.

Input Arguments

collapse all

MAVLink client connection, 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.

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

Output Arguments

collapse all

Serialized messaged, returned as vector of uint8 integers.

Data Types: uint8

Introduced in R2019a