Main Content

serializemsg

Serialize MAVLink message to binary buffer

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

Version History

Introduced in R2019a