Main Content

sendudpmsg

R2026b

Send MAVLink message to UDP port

Description

sendudpmsg(mavlink,msg,remoteHost,remotePort) sends the message msg from the MAVLink client mavlink to the remote UDP port specified by the host name remoteHost and port number remotePort.

Input Arguments

collapse all

Local MAVLink client, 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.

Tip

To create a blank message, use the createmsg object function of the mavlinkdialect object.

Remote host IP address, specified as a string.

Example: "192.168.1.10"

Remote host port, specified as a nonnegative integer in the range [0, 65535].

Example: 14550

Version History

Introduced in R2019a