MAVLink Serializer
Serialize messages of MAVLink packet by converting Simulink nonvirtual bus to
uint8
data stream
Since R2020b
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 within 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, trailing zeros are added 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 pass the MAVLink packet bus to the MAVLink Serializer block as an input.
Extended Capabilities
Version History
Introduced in R2020b