4#define MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS 270
7typedef struct __mavlink_set_video_stream_settings_t {
10 uint16_t resolution_h;
11 uint16_t resolution_v;
13 uint8_t target_system;
14 uint8_t target_component;
17}) mavlink_set_video_stream_settings_t;
19#define MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN 247
20#define MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN 247
21#define MAVLINK_MSG_ID_270_LEN 247
22#define MAVLINK_MSG_ID_270_MIN_LEN 247
24#define MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC 232
25#define MAVLINK_MSG_ID_270_CRC 232
27#define MAVLINK_MSG_SET_VIDEO_STREAM_SETTINGS_FIELD_URI_LEN 230
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_SET_VIDEO_STREAM_SETTINGS { \
32 "SET_VIDEO_STREAM_SETTINGS", \
34 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_set_video_stream_settings_t, target_system) }, \
35 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_set_video_stream_settings_t, target_component) }, \
36 { "camera_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_set_video_stream_settings_t, camera_id) }, \
37 { "framerate", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_video_stream_settings_t, framerate) }, \
38 { "resolution_h", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_set_video_stream_settings_t, resolution_h) }, \
39 { "resolution_v", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_set_video_stream_settings_t, resolution_v) }, \
40 { "bitrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_set_video_stream_settings_t, bitrate) }, \
41 { "rotation", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_set_video_stream_settings_t, rotation) }, \
42 { "uri", NULL, MAVLINK_TYPE_CHAR, 230, 17, offsetof(mavlink_set_video_stream_settings_t, uri) }, \
46#define MAVLINK_MESSAGE_INFO_SET_VIDEO_STREAM_SETTINGS { \
47 "SET_VIDEO_STREAM_SETTINGS", \
49 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_set_video_stream_settings_t, target_system) }, \
50 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_set_video_stream_settings_t, target_component) }, \
51 { "camera_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_set_video_stream_settings_t, camera_id) }, \
52 { "framerate", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_video_stream_settings_t, framerate) }, \
53 { "resolution_h", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_set_video_stream_settings_t, resolution_h) }, \
54 { "resolution_v", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_set_video_stream_settings_t, resolution_v) }, \
55 { "bitrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_set_video_stream_settings_t, bitrate) }, \
56 { "rotation", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_set_video_stream_settings_t, rotation) }, \
57 { "uri", NULL, MAVLINK_TYPE_CHAR, 230, 17, offsetof(mavlink_set_video_stream_settings_t, uri) }, \
79static inline uint16_t mavlink_msg_set_video_stream_settings_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint8_t target_system, uint8_t target_component, uint8_t camera_id,
float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation,
const char *uri)
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
83 char buf[MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN];
84 _mav_put_float(buf, 0, framerate);
85 _mav_put_uint32_t(buf, 4, bitrate);
86 _mav_put_uint16_t(buf, 8, resolution_h);
87 _mav_put_uint16_t(buf, 10, resolution_v);
88 _mav_put_uint16_t(buf, 12, rotation);
89 _mav_put_uint8_t(buf, 14, target_system);
90 _mav_put_uint8_t(buf, 15, target_component);
91 _mav_put_uint8_t(buf, 16, camera_id);
92 _mav_put_char_array(buf, 17, uri, 230);
93 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN);
95 mavlink_set_video_stream_settings_t packet;
96 packet.framerate = framerate;
97 packet.bitrate = bitrate;
98 packet.resolution_h = resolution_h;
99 packet.resolution_v = resolution_v;
100 packet.rotation = rotation;
101 packet.target_system = target_system;
102 packet.target_component = target_component;
103 packet.camera_id = camera_id;
104 mav_array_memcpy(packet.uri, uri,
sizeof(
char)*230);
105 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN);
108 msg->msgid = MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS;
109 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
129static inline uint16_t mavlink_msg_set_video_stream_settings_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
130 mavlink_message_t* msg,
131 uint8_t target_system,uint8_t target_component,uint8_t camera_id,
float framerate,uint16_t resolution_h,uint16_t resolution_v,uint32_t bitrate,uint16_t rotation,
const char *uri)
133#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
134 char buf[MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN];
135 _mav_put_float(buf, 0, framerate);
136 _mav_put_uint32_t(buf, 4, bitrate);
137 _mav_put_uint16_t(buf, 8, resolution_h);
138 _mav_put_uint16_t(buf, 10, resolution_v);
139 _mav_put_uint16_t(buf, 12, rotation);
140 _mav_put_uint8_t(buf, 14, target_system);
141 _mav_put_uint8_t(buf, 15, target_component);
142 _mav_put_uint8_t(buf, 16, camera_id);
143 _mav_put_char_array(buf, 17, uri, 230);
144 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN);
146 mavlink_set_video_stream_settings_t packet;
147 packet.framerate = framerate;
148 packet.bitrate = bitrate;
149 packet.resolution_h = resolution_h;
150 packet.resolution_v = resolution_v;
151 packet.rotation = rotation;
152 packet.target_system = target_system;
153 packet.target_component = target_component;
154 packet.camera_id = camera_id;
155 mav_array_memcpy(packet.uri, uri,
sizeof(
char)*230);
156 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN);
159 msg->msgid = MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS;
160 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
171static inline uint16_t mavlink_msg_set_video_stream_settings_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_set_video_stream_settings_t* set_video_stream_settings)
173 return mavlink_msg_set_video_stream_settings_pack(system_id, component_id, msg, set_video_stream_settings->target_system, set_video_stream_settings->target_component, set_video_stream_settings->camera_id, set_video_stream_settings->framerate, set_video_stream_settings->resolution_h, set_video_stream_settings->resolution_v, set_video_stream_settings->bitrate, set_video_stream_settings->rotation, set_video_stream_settings->uri);
185static inline uint16_t mavlink_msg_set_video_stream_settings_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_set_video_stream_settings_t* set_video_stream_settings)
187 return mavlink_msg_set_video_stream_settings_pack_chan(system_id, component_id, chan, msg, set_video_stream_settings->target_system, set_video_stream_settings->target_component, set_video_stream_settings->camera_id, set_video_stream_settings->framerate, set_video_stream_settings->resolution_h, set_video_stream_settings->resolution_v, set_video_stream_settings->bitrate, set_video_stream_settings->rotation, set_video_stream_settings->uri);
204#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
206static inline void mavlink_msg_set_video_stream_settings_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t camera_id,
float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation,
const char *uri)
208#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
209 char buf[MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN];
210 _mav_put_float(buf, 0, framerate);
211 _mav_put_uint32_t(buf, 4, bitrate);
212 _mav_put_uint16_t(buf, 8, resolution_h);
213 _mav_put_uint16_t(buf, 10, resolution_v);
214 _mav_put_uint16_t(buf, 12, rotation);
215 _mav_put_uint8_t(buf, 14, target_system);
216 _mav_put_uint8_t(buf, 15, target_component);
217 _mav_put_uint8_t(buf, 16, camera_id);
218 _mav_put_char_array(buf, 17, uri, 230);
219 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS, buf, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
221 mavlink_set_video_stream_settings_t packet;
222 packet.framerate = framerate;
223 packet.bitrate = bitrate;
224 packet.resolution_h = resolution_h;
225 packet.resolution_v = resolution_v;
226 packet.rotation = rotation;
227 packet.target_system = target_system;
228 packet.target_component = target_component;
229 packet.camera_id = camera_id;
230 mav_array_memcpy(packet.uri, uri,
sizeof(
char)*230);
231 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS, (
const char *)&packet, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
240static inline void mavlink_msg_set_video_stream_settings_send_struct(mavlink_channel_t chan,
const mavlink_set_video_stream_settings_t* set_video_stream_settings)
242#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
243 mavlink_msg_set_video_stream_settings_send(chan, set_video_stream_settings->target_system, set_video_stream_settings->target_component, set_video_stream_settings->camera_id, set_video_stream_settings->framerate, set_video_stream_settings->resolution_h, set_video_stream_settings->resolution_v, set_video_stream_settings->bitrate, set_video_stream_settings->rotation, set_video_stream_settings->uri);
245 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS, (
const char *)set_video_stream_settings, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
249#if MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
257static inline void mavlink_msg_set_video_stream_settings_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t camera_id,
float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation,
const char *uri)
259#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
260 char *buf = (
char *)msgbuf;
261 _mav_put_float(buf, 0, framerate);
262 _mav_put_uint32_t(buf, 4, bitrate);
263 _mav_put_uint16_t(buf, 8, resolution_h);
264 _mav_put_uint16_t(buf, 10, resolution_v);
265 _mav_put_uint16_t(buf, 12, rotation);
266 _mav_put_uint8_t(buf, 14, target_system);
267 _mav_put_uint8_t(buf, 15, target_component);
268 _mav_put_uint8_t(buf, 16, camera_id);
269 _mav_put_char_array(buf, 17, uri, 230);
270 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS, buf, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
272 mavlink_set_video_stream_settings_t *packet = (mavlink_set_video_stream_settings_t *)msgbuf;
273 packet->framerate = framerate;
274 packet->bitrate = bitrate;
275 packet->resolution_h = resolution_h;
276 packet->resolution_v = resolution_v;
277 packet->rotation = rotation;
278 packet->target_system = target_system;
279 packet->target_component = target_component;
280 packet->camera_id = camera_id;
281 mav_array_memcpy(packet->uri, uri,
sizeof(
char)*230);
282 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS, (
const char *)packet, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_MIN_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_CRC);
297static inline uint8_t mavlink_msg_set_video_stream_settings_get_target_system(
const mavlink_message_t* msg)
299 return _MAV_RETURN_uint8_t(msg, 14);
307static inline uint8_t mavlink_msg_set_video_stream_settings_get_target_component(
const mavlink_message_t* msg)
309 return _MAV_RETURN_uint8_t(msg, 15);
317static inline uint8_t mavlink_msg_set_video_stream_settings_get_camera_id(
const mavlink_message_t* msg)
319 return _MAV_RETURN_uint8_t(msg, 16);
327static inline float mavlink_msg_set_video_stream_settings_get_framerate(
const mavlink_message_t* msg)
329 return _MAV_RETURN_float(msg, 0);
337static inline uint16_t mavlink_msg_set_video_stream_settings_get_resolution_h(
const mavlink_message_t* msg)
339 return _MAV_RETURN_uint16_t(msg, 8);
347static inline uint16_t mavlink_msg_set_video_stream_settings_get_resolution_v(
const mavlink_message_t* msg)
349 return _MAV_RETURN_uint16_t(msg, 10);
357static inline uint32_t mavlink_msg_set_video_stream_settings_get_bitrate(
const mavlink_message_t* msg)
359 return _MAV_RETURN_uint32_t(msg, 4);
367static inline uint16_t mavlink_msg_set_video_stream_settings_get_rotation(
const mavlink_message_t* msg)
369 return _MAV_RETURN_uint16_t(msg, 12);
377static inline uint16_t mavlink_msg_set_video_stream_settings_get_uri(
const mavlink_message_t* msg,
char *uri)
379 return _MAV_RETURN_char_array(msg, uri, 230, 17);
388static inline void mavlink_msg_set_video_stream_settings_decode(
const mavlink_message_t* msg, mavlink_set_video_stream_settings_t* set_video_stream_settings)
390#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
391 set_video_stream_settings->framerate = mavlink_msg_set_video_stream_settings_get_framerate(msg);
392 set_video_stream_settings->bitrate = mavlink_msg_set_video_stream_settings_get_bitrate(msg);
393 set_video_stream_settings->resolution_h = mavlink_msg_set_video_stream_settings_get_resolution_h(msg);
394 set_video_stream_settings->resolution_v = mavlink_msg_set_video_stream_settings_get_resolution_v(msg);
395 set_video_stream_settings->rotation = mavlink_msg_set_video_stream_settings_get_rotation(msg);
396 set_video_stream_settings->target_system = mavlink_msg_set_video_stream_settings_get_target_system(msg);
397 set_video_stream_settings->target_component = mavlink_msg_set_video_stream_settings_get_target_component(msg);
398 set_video_stream_settings->camera_id = mavlink_msg_set_video_stream_settings_get_camera_id(msg);
399 mavlink_msg_set_video_stream_settings_get_uri(msg, set_video_stream_settings->uri);
401 uint8_t len = msg->len < MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN? msg->len : MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN;
402 memset(set_video_stream_settings, 0, MAVLINK_MSG_ID_SET_VIDEO_STREAM_SETTINGS_LEN);
403 memcpy(set_video_stream_settings, _MAV_PAYLOAD(msg), len);