NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mavlink_msg_gimbal_report_factory_tests_progress.h
Go to the documentation of this file.
1 // MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS PACKING
2 
3 #define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS 210
4 
6 {
7  uint8_t test;
8  uint8_t test_section;
10  uint8_t test_status;
12 
13 #define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN 4
14 #define MAVLINK_MSG_ID_210_LEN 4
15 
16 #define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC 238
17 #define MAVLINK_MSG_ID_210_CRC 238
18 
19 
20 
21 #define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS { \
22  "GIMBAL_REPORT_FACTORY_TESTS_PROGRESS", \
23  4, \
24  { { "test", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test) }, \
25  { "test_section", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section) }, \
26  { "test_section_progress", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section_progress) }, \
27  { "test_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_status) }, \
28  } \
29 }
30 
31 
44 static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
45  uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
46 {
47 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
49  _mav_put_uint8_t(buf, 0, test);
50  _mav_put_uint8_t(buf, 1, test_section);
51  _mav_put_uint8_t(buf, 2, test_section_progress);
52  _mav_put_uint8_t(buf, 3, test_status);
53 
55 #else
57  packet.test = test;
58  packet.test_section = test_section;
59  packet.test_section_progress = test_section_progress;
60  packet.test_status = test_status;
61 
63 #endif
64 
66 #if MAVLINK_CRC_EXTRA
68 #else
70 #endif
71 }
72 
85 static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
86  mavlink_message_t* msg,
87  uint8_t test,uint8_t test_section,uint8_t test_section_progress,uint8_t test_status)
88 {
89 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
91  _mav_put_uint8_t(buf, 0, test);
92  _mav_put_uint8_t(buf, 1, test_section);
93  _mav_put_uint8_t(buf, 2, test_section_progress);
94  _mav_put_uint8_t(buf, 3, test_status);
95 
97 #else
99  packet.test = test;
100  packet.test_section = test_section;
101  packet.test_section_progress = test_section_progress;
102  packet.test_status = test_status;
103 
105 #endif
106 
108 #if MAVLINK_CRC_EXTRA
110 #else
112 #endif
113 }
114 
123 static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
124 {
125  return mavlink_msg_gimbal_report_factory_tests_progress_pack(system_id, component_id, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
126 }
127 
137 static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
138 {
139  return mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(system_id, component_id, chan, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
140 }
141 
151 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
152 
153 static inline void mavlink_msg_gimbal_report_factory_tests_progress_send(mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
154 {
155 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
157  _mav_put_uint8_t(buf, 0, test);
158  _mav_put_uint8_t(buf, 1, test_section);
159  _mav_put_uint8_t(buf, 2, test_section_progress);
160  _mav_put_uint8_t(buf, 3, test_status);
161 
162 #if MAVLINK_CRC_EXTRA
164 #else
166 #endif
167 #else
169  packet.test = test;
170  packet.test_section = test_section;
171  packet.test_section_progress = test_section_progress;
172  packet.test_status = test_status;
173 
174 #if MAVLINK_CRC_EXTRA
176 #else
177  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
178 #endif
179 #endif
180 }
181 
182 #if MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
183 /*
184  This varient of _send() can be used to save stack space by re-using
185  memory from the receive buffer. The caller provides a
186  mavlink_message_t which is the size of a full mavlink message. This
187  is usually the receive buffer for the channel, and allows a reply to an
188  incoming message with minimum stack space usage.
189  */
190 static inline void mavlink_msg_gimbal_report_factory_tests_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
191 {
192 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193  char *buf = (char *)msgbuf;
194  _mav_put_uint8_t(buf, 0, test);
195  _mav_put_uint8_t(buf, 1, test_section);
196  _mav_put_uint8_t(buf, 2, test_section_progress);
197  _mav_put_uint8_t(buf, 3, test_status);
198 
199 #if MAVLINK_CRC_EXTRA
201 #else
203 #endif
204 #else
206  packet->test = test;
207  packet->test_section = test_section;
208  packet->test_section_progress = test_section_progress;
209  packet->test_status = test_status;
210 
211 #if MAVLINK_CRC_EXTRA
213 #else
214  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
215 #endif
216 #endif
217 }
218 #endif
219 
220 #endif
221 
222 // MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS UNPACKING
223 
224 
230 static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test(const mavlink_message_t* msg)
231 {
232  return _MAV_RETURN_uint8_t(msg, 0);
233 }
234 
240 static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(const mavlink_message_t* msg)
241 {
242  return _MAV_RETURN_uint8_t(msg, 1);
243 }
244 
250 static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(const mavlink_message_t* msg)
251 {
252  return _MAV_RETURN_uint8_t(msg, 2);
253 }
254 
260 static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(const mavlink_message_t* msg)
261 {
262  return _MAV_RETURN_uint8_t(msg, 3);
263 }
264 
271 static inline void mavlink_msg_gimbal_report_factory_tests_progress_decode(const mavlink_message_t* msg, mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
272 {
273 #if MAVLINK_NEED_BYTE_SWAP
274  gimbal_report_factory_tests_progress->test = mavlink_msg_gimbal_report_factory_tests_progress_get_test(msg);
275  gimbal_report_factory_tests_progress->test_section = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(msg);
276  gimbal_report_factory_tests_progress->test_section_progress = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(msg);
277  gimbal_report_factory_tests_progress->test_status = mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(msg);
278 #else
279  memcpy(gimbal_report_factory_tests_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
280 #endif
281 }
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134