4#define MAVLINK_MSG_ID_STATUSTEXT 253
7typedef struct __mavlink_statustext_t {
10}) mavlink_statustext_t;
12#define MAVLINK_MSG_ID_STATUSTEXT_LEN 51
13#define MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN 51
14#define MAVLINK_MSG_ID_253_LEN 51
15#define MAVLINK_MSG_ID_253_MIN_LEN 51
17#define MAVLINK_MSG_ID_STATUSTEXT_CRC 83
18#define MAVLINK_MSG_ID_253_CRC 83
20#define MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN 50
22#if MAVLINK_COMMAND_24BIT
23#define MAVLINK_MESSAGE_INFO_STATUSTEXT { \
27 { { "severity", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_statustext_t, severity) }, \
28 { "text", NULL, MAVLINK_TYPE_CHAR, 50, 1, offsetof(mavlink_statustext_t, text) }, \
32#define MAVLINK_MESSAGE_INFO_STATUSTEXT { \
35 { { "severity", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_statustext_t, severity) }, \
36 { "text", NULL, MAVLINK_TYPE_CHAR, 50, 1, offsetof(mavlink_statustext_t, text) }, \
51static inline uint16_t mavlink_msg_statustext_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
52 uint8_t severity,
const char *text)
54#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
55 char buf[MAVLINK_MSG_ID_STATUSTEXT_LEN];
56 _mav_put_uint8_t(buf, 0, severity);
57 _mav_put_char_array(buf, 1, text, 50);
58 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STATUSTEXT_LEN);
60 mavlink_statustext_t packet;
61 packet.severity = severity;
62 mav_array_memcpy(packet.text, text,
sizeof(
char)*50);
63 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STATUSTEXT_LEN);
66 msg->msgid = MAVLINK_MSG_ID_STATUSTEXT;
67 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
80static inline uint16_t mavlink_msg_statustext_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
81 mavlink_message_t* msg,
82 uint8_t severity,
const char *text)
84#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
85 char buf[MAVLINK_MSG_ID_STATUSTEXT_LEN];
86 _mav_put_uint8_t(buf, 0, severity);
87 _mav_put_char_array(buf, 1, text, 50);
88 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STATUSTEXT_LEN);
90 mavlink_statustext_t packet;
91 packet.severity = severity;
92 mav_array_memcpy(packet.text, text,
sizeof(
char)*50);
93 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STATUSTEXT_LEN);
96 msg->msgid = MAVLINK_MSG_ID_STATUSTEXT;
97 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
108static inline uint16_t mavlink_msg_statustext_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_statustext_t* statustext)
110 return mavlink_msg_statustext_pack(system_id, component_id, msg, statustext->severity, statustext->text);
122static inline uint16_t mavlink_msg_statustext_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_statustext_t* statustext)
124 return mavlink_msg_statustext_pack_chan(system_id, component_id, chan, msg, statustext->severity, statustext->text);
134#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
136static inline void mavlink_msg_statustext_send(mavlink_channel_t chan, uint8_t severity,
const char *text)
138#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
139 char buf[MAVLINK_MSG_ID_STATUSTEXT_LEN];
140 _mav_put_uint8_t(buf, 0, severity);
141 _mav_put_char_array(buf, 1, text, 50);
142 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, buf, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
144 mavlink_statustext_t packet;
145 packet.severity = severity;
146 mav_array_memcpy(packet.text, text,
sizeof(
char)*50);
147 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, (
const char *)&packet, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
156static inline void mavlink_msg_statustext_send_struct(mavlink_channel_t chan,
const mavlink_statustext_t* statustext)
158#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
159 mavlink_msg_statustext_send(chan, statustext->severity, statustext->text);
161 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, (
const char *)statustext, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
165#if MAVLINK_MSG_ID_STATUSTEXT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
173static inline void mavlink_msg_statustext_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t severity,
const char *text)
175#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 char *buf = (
char *)msgbuf;
177 _mav_put_uint8_t(buf, 0, severity);
178 _mav_put_char_array(buf, 1, text, 50);
179 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, buf, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
181 mavlink_statustext_t *packet = (mavlink_statustext_t *)msgbuf;
182 packet->severity = severity;
183 mav_array_memcpy(packet->text, text,
sizeof(
char)*50);
184 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STATUSTEXT, (
const char *)packet, MAVLINK_MSG_ID_STATUSTEXT_MIN_LEN, MAVLINK_MSG_ID_STATUSTEXT_LEN, MAVLINK_MSG_ID_STATUSTEXT_CRC);
199static inline uint8_t mavlink_msg_statustext_get_severity(
const mavlink_message_t* msg)
201 return _MAV_RETURN_uint8_t(msg, 0);
209static inline uint16_t mavlink_msg_statustext_get_text(
const mavlink_message_t* msg,
char *text)
211 return _MAV_RETURN_char_array(msg, text, 50, 1);
220static inline void mavlink_msg_statustext_decode(
const mavlink_message_t* msg, mavlink_statustext_t* statustext)
222#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
223 statustext->severity = mavlink_msg_statustext_get_severity(msg);
224 mavlink_msg_statustext_get_text(msg, statustext->text);
226 uint8_t len = msg->len < MAVLINK_MSG_ID_STATUSTEXT_LEN? msg->len : MAVLINK_MSG_ID_STATUSTEXT_LEN;
227 memset(statustext, 0, MAVLINK_MSG_ID_STATUSTEXT_LEN);
228 memcpy(statustext, _MAV_PAYLOAD(msg), len);