4#define MAVLINK_MSG_ID_CPU_LOAD 170
7typedef struct __mavlink_cpu_load_t {
13#define MAVLINK_MSG_ID_CPU_LOAD_LEN 4
14#define MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN 4
15#define MAVLINK_MSG_ID_170_LEN 4
16#define MAVLINK_MSG_ID_170_MIN_LEN 4
18#define MAVLINK_MSG_ID_CPU_LOAD_CRC 75
19#define MAVLINK_MSG_ID_170_CRC 75
23#if MAVLINK_COMMAND_24BIT
24#define MAVLINK_MESSAGE_INFO_CPU_LOAD { \
28 { { "sensLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_cpu_load_t, sensLoad) }, \
29 { "ctrlLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_cpu_load_t, ctrlLoad) }, \
30 { "batVolt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cpu_load_t, batVolt) }, \
34#define MAVLINK_MESSAGE_INFO_CPU_LOAD { \
37 { { "sensLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_cpu_load_t, sensLoad) }, \
38 { "ctrlLoad", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_cpu_load_t, ctrlLoad) }, \
39 { "batVolt", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cpu_load_t, batVolt) }, \
55static inline uint16_t mavlink_msg_cpu_load_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
56 uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
58#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
59 char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
60 _mav_put_uint16_t(buf, 0, batVolt);
61 _mav_put_uint8_t(buf, 2, sensLoad);
62 _mav_put_uint8_t(buf, 3, ctrlLoad);
64 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CPU_LOAD_LEN);
66 mavlink_cpu_load_t packet;
67 packet.batVolt = batVolt;
68 packet.sensLoad = sensLoad;
69 packet.ctrlLoad = ctrlLoad;
71 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CPU_LOAD_LEN);
74 msg->msgid = MAVLINK_MSG_ID_CPU_LOAD;
75 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
89static inline uint16_t mavlink_msg_cpu_load_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint8_t sensLoad,uint8_t ctrlLoad,uint16_t batVolt)
93#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
94 char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
95 _mav_put_uint16_t(buf, 0, batVolt);
96 _mav_put_uint8_t(buf, 2, sensLoad);
97 _mav_put_uint8_t(buf, 3, ctrlLoad);
99 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CPU_LOAD_LEN);
101 mavlink_cpu_load_t packet;
102 packet.batVolt = batVolt;
103 packet.sensLoad = sensLoad;
104 packet.ctrlLoad = ctrlLoad;
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CPU_LOAD_LEN);
109 msg->msgid = MAVLINK_MSG_ID_CPU_LOAD;
110 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
121static inline uint16_t mavlink_msg_cpu_load_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_cpu_load_t* cpu_load)
123 return mavlink_msg_cpu_load_pack(system_id, component_id, msg, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
135static inline uint16_t mavlink_msg_cpu_load_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_cpu_load_t* cpu_load)
137 return mavlink_msg_cpu_load_pack_chan(system_id, component_id, chan, msg, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
148#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
150static inline void mavlink_msg_cpu_load_send(mavlink_channel_t chan, uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
152#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
153 char buf[MAVLINK_MSG_ID_CPU_LOAD_LEN];
154 _mav_put_uint16_t(buf, 0, batVolt);
155 _mav_put_uint8_t(buf, 2, sensLoad);
156 _mav_put_uint8_t(buf, 3, ctrlLoad);
158 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, buf, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
160 mavlink_cpu_load_t packet;
161 packet.batVolt = batVolt;
162 packet.sensLoad = sensLoad;
163 packet.ctrlLoad = ctrlLoad;
165 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (
const char *)&packet, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
174static inline void mavlink_msg_cpu_load_send_struct(mavlink_channel_t chan,
const mavlink_cpu_load_t* cpu_load)
176#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
177 mavlink_msg_cpu_load_send(chan, cpu_load->sensLoad, cpu_load->ctrlLoad, cpu_load->batVolt);
179 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (
const char *)cpu_load, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
183#if MAVLINK_MSG_ID_CPU_LOAD_LEN <= MAVLINK_MAX_PAYLOAD_LEN
191static inline void mavlink_msg_cpu_load_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sensLoad, uint8_t ctrlLoad, uint16_t batVolt)
193#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 char *buf = (
char *)msgbuf;
195 _mav_put_uint16_t(buf, 0, batVolt);
196 _mav_put_uint8_t(buf, 2, sensLoad);
197 _mav_put_uint8_t(buf, 3, ctrlLoad);
199 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, buf, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
201 mavlink_cpu_load_t *packet = (mavlink_cpu_load_t *)msgbuf;
202 packet->batVolt = batVolt;
203 packet->sensLoad = sensLoad;
204 packet->ctrlLoad = ctrlLoad;
206 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CPU_LOAD, (
const char *)packet, MAVLINK_MSG_ID_CPU_LOAD_MIN_LEN, MAVLINK_MSG_ID_CPU_LOAD_LEN, MAVLINK_MSG_ID_CPU_LOAD_CRC);
221static inline uint8_t mavlink_msg_cpu_load_get_sensLoad(
const mavlink_message_t* msg)
223 return _MAV_RETURN_uint8_t(msg, 2);
231static inline uint8_t mavlink_msg_cpu_load_get_ctrlLoad(
const mavlink_message_t* msg)
233 return _MAV_RETURN_uint8_t(msg, 3);
241static inline uint16_t mavlink_msg_cpu_load_get_batVolt(
const mavlink_message_t* msg)
243 return _MAV_RETURN_uint16_t(msg, 0);
252static inline void mavlink_msg_cpu_load_decode(
const mavlink_message_t* msg, mavlink_cpu_load_t* cpu_load)
254#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
255 cpu_load->batVolt = mavlink_msg_cpu_load_get_batVolt(msg);
256 cpu_load->sensLoad = mavlink_msg_cpu_load_get_sensLoad(msg);
257 cpu_load->ctrlLoad = mavlink_msg_cpu_load_get_ctrlLoad(msg);
259 uint8_t len = msg->len < MAVLINK_MSG_ID_CPU_LOAD_LEN? msg->len : MAVLINK_MSG_ID_CPU_LOAD_LEN;
260 memset(cpu_load, 0, MAVLINK_MSG_ID_CPU_LOAD_LEN);
261 memcpy(cpu_load, _MAV_PAYLOAD(msg), len);