3 #define MAVLINK_MSG_ID_STATUSTEXT 253
11 #define MAVLINK_MSG_ID_STATUSTEXT_LEN 51
12 #define MAVLINK_MSG_ID_253_LEN 51
14 #define MAVLINK_MSG_ID_STATUSTEXT_CRC 83
15 #define MAVLINK_MSG_ID_253_CRC 83
17 #define MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN 50
19 #define MAVLINK_MESSAGE_INFO_STATUSTEXT { \
22 { { "severity", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_statustext_t, severity) }, \
23 { "text", NULL, MAVLINK_TYPE_CHAR, 50, 1, offsetof(mavlink_statustext_t, text) }, \
38 static inline uint16_t mavlink_msg_statustext_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
39 uint8_t severity,
const char *text)
41 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
44 _mav_put_char_array(buf, 1, text, 50);
49 mav_array_memcpy(packet.
text, text,
sizeof(
char)*50);
71 static inline uint16_t mavlink_msg_statustext_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
72 mavlink_message_t* msg,
73 uint8_t severity,
const char *text)
75 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
78 _mav_put_char_array(buf, 1, text, 50);
83 mav_array_memcpy(packet.
text, text,
sizeof(
char)*50);
103 static inline uint16_t mavlink_msg_statustext_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_statustext_t* statustext)
105 return mavlink_msg_statustext_pack(system_id, component_id, msg, statustext->
severity, statustext->
text);
117 static 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)
119 return mavlink_msg_statustext_pack_chan(system_id, component_id, chan, msg, statustext->
severity, statustext->
text);
129 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
131 static inline void mavlink_msg_statustext_send(
mavlink_channel_t chan, uint8_t severity,
const char *text)
133 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
136 _mav_put_char_array(buf, 1, text, 50);
137 #if MAVLINK_CRC_EXTRA
145 mav_array_memcpy(packet.
text, text,
sizeof(
char)*50);
146 #if MAVLINK_CRC_EXTRA
154 #if MAVLINK_MSG_ID_STATUSTEXT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
162 static inline void mavlink_msg_statustext_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t severity,
const char *text)
164 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 char *buf = (
char *)msgbuf;
167 _mav_put_char_array(buf, 1, text, 50);
168 #if MAVLINK_CRC_EXTRA
176 mav_array_memcpy(packet->
text, text,
sizeof(
char)*50);
177 #if MAVLINK_CRC_EXTRA
196 static inline uint8_t mavlink_msg_statustext_get_severity(
const mavlink_message_t* msg)
206 static inline uint16_t mavlink_msg_statustext_get_text(
const mavlink_message_t* msg,
char *text)
208 return _MAV_RETURN_char_array(msg, text, 50, 1);
217 static inline void mavlink_msg_statustext_decode(
const mavlink_message_t* msg,
mavlink_statustext_t* statustext)
219 #if MAVLINK_NEED_BYTE_SWAP
220 statustext->
severity = mavlink_msg_statustext_get_severity(msg);
221 mavlink_msg_statustext_get_text(msg, statustext->
text);
uint8_t severity
Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.
Definition: mavlink_msg_statustext.h:7
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
Definition: mavlink_msg_statustext.h:5
#define MAVLINK_MSG_ID_STATUSTEXT_LEN
Definition: mavlink_msg_statustext.h:11
#define MAVLINK_MSG_ID_STATUSTEXT
Definition: mavlink_msg_statustext.h:3
#define MAVLINK_MSG_ID_STATUSTEXT_CRC
Definition: mavlink_msg_statustext.h:14
struct __mavlink_statustext_t mavlink_statustext_t
char text[50]
Status text message, without null termination character.
Definition: mavlink_msg_statustext.h:8
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71