mavlinksub
Receive MAVLink messages
Description
The mavlinksub
object subscribes to topics from the connected
MAVLink clients using a mavlinkio
object.
Use the mavlinksub
object to obtain the most recently received messages and
call functions to process newly received messages.
Creation
Syntax
Description
subscribes to all topics from the client specified as a sub
= mavlinksub(mavlink
,client
)mavlinkclient
object. The function sets the Client
property to this input client.
subscribes to a specific topic on a specific client. The function sets the
sub
= mavlinksub(mavlink
,client
,topic
)Client
and Topic
properties.
additionally specifies the sub
= mavlinksub(___,Name=Value)BuffferSize
or
NewMessageFcn
properties using name-value pairs and the previous
syntaxes. The Name
input is one of the property names.
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Input Arguments
Properties
Object Functions
latestmsgs | Received messages from MAVLink subscriber |
Examples
Version History
Introduced in R2019a