MAVLink Serializer
R2026bSerialize MAVLink packet messages by converting a Simulink nonvirtual bus to a
uint8 data stream
Libraries:
UAV Toolbox /
MAVLink
Description
The MAVLink Serializer block accepts a Simulink® nonvirtual bus and converts it into a uint8 MAVLink data
stream. The nonvirtual bus represents a MAVLink packet containing the Message ID, System ID,
Component ID, Sequence, and Payload information corresponding to the selected MAVLink message.
Payload information is another nonvirtual bus in the MAVLink packet bus.
MAVLink v2 removes trailing zeros in the payload. Therefore, the length of the payload in the serialized MAVLink data can be less than the maximum payload length of a selected MAVLink message type.
The Data port outputs the MAVLink data stream, and the length of the output data is the maximum possible length for the selected MAVLink message. If the length of the serialized data is less than the maximum possible length, the block adds trailing zeros to the data stream. The Length port outputs the true length of the serialized MAVLink data.
Ports
Input
Output
Parameters
Tips
You can change the values for the desired fields in the Payload in the output of the MAVLink Blank message by using a Bus Assignment block and then passing the MAVLink packet bus to the MAVLink Serializer block as an input.
Extended Capabilities
Version History
Introduced in R2020b
