Sending a Message to be Displayed on Mission Planner


I’m trying to accomplish a very simple task: send a message through MavLink and have it displayed on the Mission Planner. The message (for now) is just to have an integer be sent. I added the message into the common.xml file and used to get my mavlink_msg_my_test file, as described on … k-message/, but I’m having problem going further. Step 5 of the guide says:

[quote] Add functions to the main vehicle code to handle sending or receiving the command to/from the ground station.
The top level of this code will most likely be in the vehicle’s GCS_MAVLink.cpp file or in the …/libraries/GCS_MAVLink/GCS class.[/quote]

However, I’m not sure what exactly that entails. I’ve been spending days trying to find the top level of the code and I’m quite sure how the message is going from my common.xml file to the Mission Planner. I realize this has something to do with the scheduler but I’m not quite sure how that would come in to play. Can anyone explain how to send a simple message to the Mission Planner and how the protocol between the vehicle and MavLink works?

send a STATUSTEXT packet
with the severity >= 3 (MAV_SEVERITY)

How exactly do we send a message? I looked at the send_message function but I’m not sure where/how to use it.