mavlinkio
Description
The mavlinkio
object connects with MAVLink clients through UDP
ports to exchange messages with UAVs (unmanned aerial vehicles) using the MAVLink
communication protocols.
Creation
Syntax
Description
creates an interface to connect with MAVLink clients using the input mavlink
= mavlinkio(msgDefinitions)mavlinkdialect
object, which defines the message definitions. This dialect
object is set directly to the Dialect
property.
directly
specifies the XML file for the message definitions as a file name. A mavlink
= mavlinkio(dialectXML)mavlinkdialect
is created using this XML file and set to the
Dialect
property
additionally specifies the MAVLink protocol version as either mavlink
= mavlinkio(dialectXML,version)1
or
2
.
additionally specifies arguments using the following name-value pairs.mavlink
= mavlinkio(___,Name,Value)
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.
The name-value pairs directly set the MAVLink client information in the
LocalClient
property. See LocalClient for more info on what values can be set.
Properties
Object Functions
connect | Connect to MAVLink clients through UDP port |
disconnect | Disconnect from MAVLink clients |
sendmsg | Send MAVLink message |
sendudpmsg | Send MAVLink message to UDP port |
serializemsg | Serialize MAVLink message to binary buffer |
listConnections | List all active MAVLink connections |
listClients | List all connected MAVLink clients |
listTopics | List all topics received by MAVLink client |
Examples
Version History
Introduced in R2019a