주요 콘텐츠

sendmsg

R2026b

Send MAVLink message to other connected MAVLink clients

Description

sendmsg(mavlink,msg) sends the MAVLink message msg to all MAVLink clients connected to the local MAVLink client mavlink.

sendmsg(mavlink,msg,client) sends the MAVLink message msg to the MAVLink client client.

Tip

  • To see the list of connected MAVLink clients, use the listClients function

  • The local MAVLink client must send HEARTBEAT messages regularly to establish a connection with other MAVLink clients. To send HEARTBEAT messages from the local MAVLink client, use the heartbeatMicroservice object

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.

MAVLink client information, specified as a mavlinkclient object.

Version History

Introduced in R2019a