00001
00002
00003 #define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK 6
00004
00005 typedef struct __mavlink_change_operator_control_ack_t
00006 {
00007 uint8_t gcs_system_id;
00008 uint8_t control_request;
00009 uint8_t ack;
00010 } mavlink_change_operator_control_ack_t;
00011
00012 #define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN 3
00013 #define MAVLINK_MSG_ID_6_LEN 3
00014
00015 #define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC 104
00016 #define MAVLINK_MSG_ID_6_CRC 104
00017
00018
00019
00020 #define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK { \
00021 "CHANGE_OPERATOR_CONTROL_ACK", \
00022 3, \
00023 { { "gcs_system_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_change_operator_control_ack_t, gcs_system_id) }, \
00024 { "control_request", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_change_operator_control_ack_t, control_request) }, \
00025 { "ack", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_change_operator_control_ack_t, ack) }, \
00026 } \
00027 }
00028
00029
00041 static inline uint16_t mavlink_msg_change_operator_control_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
00042 uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
00043 {
00044 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
00045 char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
00046 _mav_put_uint8_t(buf, 0, gcs_system_id);
00047 _mav_put_uint8_t(buf, 1, control_request);
00048 _mav_put_uint8_t(buf, 2, ack);
00049
00050 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00051 #else
00052 mavlink_change_operator_control_ack_t packet;
00053 packet.gcs_system_id = gcs_system_id;
00054 packet.control_request = control_request;
00055 packet.ack = ack;
00056
00057 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00058 #endif
00059
00060 msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
00061 #if MAVLINK_CRC_EXTRA
00062 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00063 #else
00064 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00065 #endif
00066 }
00067
00079 static inline uint16_t mavlink_msg_change_operator_control_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
00080 mavlink_message_t* msg,
00081 uint8_t gcs_system_id,uint8_t control_request,uint8_t ack)
00082 {
00083 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
00084 char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
00085 _mav_put_uint8_t(buf, 0, gcs_system_id);
00086 _mav_put_uint8_t(buf, 1, control_request);
00087 _mav_put_uint8_t(buf, 2, ack);
00088
00089 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00090 #else
00091 mavlink_change_operator_control_ack_t packet;
00092 packet.gcs_system_id = gcs_system_id;
00093 packet.control_request = control_request;
00094 packet.ack = ack;
00095
00096 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00097 #endif
00098
00099 msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
00100 #if MAVLINK_CRC_EXTRA
00101 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00102 #else
00103 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00104 #endif
00105 }
00106
00115 static inline uint16_t mavlink_msg_change_operator_control_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_change_operator_control_ack_t* change_operator_control_ack)
00116 {
00117 return mavlink_msg_change_operator_control_ack_pack(system_id, component_id, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
00118 }
00119
00129 static inline uint16_t mavlink_msg_change_operator_control_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_change_operator_control_ack_t* change_operator_control_ack)
00130 {
00131 return mavlink_msg_change_operator_control_ack_pack_chan(system_id, component_id, chan, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
00132 }
00133
00142 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
00143
00144 static inline void mavlink_msg_change_operator_control_ack_send(mavlink_channel_t chan, uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
00145 {
00146 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
00147 char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
00148 _mav_put_uint8_t(buf, 0, gcs_system_id);
00149 _mav_put_uint8_t(buf, 1, control_request);
00150 _mav_put_uint8_t(buf, 2, ack);
00151
00152 #if MAVLINK_CRC_EXTRA
00153 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00154 #else
00155 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00156 #endif
00157 #else
00158 mavlink_change_operator_control_ack_t packet;
00159 packet.gcs_system_id = gcs_system_id;
00160 packet.control_request = control_request;
00161 packet.ack = ack;
00162
00163 #if MAVLINK_CRC_EXTRA
00164 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00165 #else
00166 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00167 #endif
00168 #endif
00169 }
00170
00171 #if MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
00172
00173
00174
00175
00176
00177
00178
00179 static inline void mavlink_msg_change_operator_control_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
00180 {
00181 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
00182 char *buf = (char *)msgbuf;
00183 _mav_put_uint8_t(buf, 0, gcs_system_id);
00184 _mav_put_uint8_t(buf, 1, control_request);
00185 _mav_put_uint8_t(buf, 2, ack);
00186
00187 #if MAVLINK_CRC_EXTRA
00188 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00189 #else
00190 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00191 #endif
00192 #else
00193 mavlink_change_operator_control_ack_t *packet = (mavlink_change_operator_control_ack_t *)msgbuf;
00194 packet->gcs_system_id = gcs_system_id;
00195 packet->control_request = control_request;
00196 packet->ack = ack;
00197
00198 #if MAVLINK_CRC_EXTRA
00199 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
00200 #else
00201 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00202 #endif
00203 #endif
00204 }
00205 #endif
00206
00207 #endif
00208
00209
00210
00211
00217 static inline uint8_t mavlink_msg_change_operator_control_ack_get_gcs_system_id(const mavlink_message_t* msg)
00218 {
00219 return _MAV_RETURN_uint8_t(msg, 0);
00220 }
00221
00227 static inline uint8_t mavlink_msg_change_operator_control_ack_get_control_request(const mavlink_message_t* msg)
00228 {
00229 return _MAV_RETURN_uint8_t(msg, 1);
00230 }
00231
00237 static inline uint8_t mavlink_msg_change_operator_control_ack_get_ack(const mavlink_message_t* msg)
00238 {
00239 return _MAV_RETURN_uint8_t(msg, 2);
00240 }
00241
00248 static inline void mavlink_msg_change_operator_control_ack_decode(const mavlink_message_t* msg, mavlink_change_operator_control_ack_t* change_operator_control_ack)
00249 {
00250 #if MAVLINK_NEED_BYTE_SWAP
00251 change_operator_control_ack->gcs_system_id = mavlink_msg_change_operator_control_ack_get_gcs_system_id(msg);
00252 change_operator_control_ack->control_request = mavlink_msg_change_operator_control_ack_get_control_request(msg);
00253 change_operator_control_ack->ack = mavlink_msg_change_operator_control_ack_get_ack(msg);
00254 #else
00255 memcpy(change_operator_control_ack, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
00256 #endif
00257 }