4#define MAVLINK_MSG_ID_GENERATOR_STATUS 373
19} mavlink_generator_status_t;
21#define MAVLINK_MSG_ID_GENERATOR_STATUS_LEN 42
22#define MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN 42
23#define MAVLINK_MSG_ID_373_LEN 42
24#define MAVLINK_MSG_ID_373_MIN_LEN 42
26#define MAVLINK_MSG_ID_GENERATOR_STATUS_CRC 117
27#define MAVLINK_MSG_ID_373_CRC 117
31#if MAVLINK_COMMAND_24BIT
32#define MAVLINK_MESSAGE_INFO_GENERATOR_STATUS {
36 { { "status", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_generator_status_t, status) },
37 { "generator_speed", NULL, MAVLINK_TYPE_UINT16_T, 0
, 36
, offsetof(mavlink_generator_status_t, generator_speed) },
38 { "battery_current", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_generator_status_t, battery_current) },
39 { "load_current", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_generator_status_t, load_current) },
40 { "power_generated", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_generator_status_t, power_generated) },
41 { "bus_voltage", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_generator_status_t, bus_voltage) },
42 { "rectifier_temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 38
, offsetof(mavlink_generator_status_t, rectifier_temperature) },
43 { "bat_current_setpoint", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_generator_status_t, bat_current_setpoint) },
44 { "generator_temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 40
, offsetof(mavlink_generator_status_t, generator_temperature) },
45 { "runtime", NULL, MAVLINK_TYPE_UINT32_T, 0
, 28
, offsetof(mavlink_generator_status_t, runtime) },
46 { "time_until_maintenance", NULL, MAVLINK_TYPE_INT32_T, 0
, 32
, offsetof(mavlink_generator_status_t, time_until_maintenance) },
48}
50#define MAVLINK_MESSAGE_INFO_GENERATOR_STATUS {
53 { { "status", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_generator_status_t, status) },
54 { "generator_speed", NULL, MAVLINK_TYPE_UINT16_T, 0
, 36
, offsetof(mavlink_generator_status_t, generator_speed) },
55 { "battery_current", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_generator_status_t, battery_current) },
56 { "load_current", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_generator_status_t, load_current) },
57 { "power_generated", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_generator_status_t, power_generated) },
58 { "bus_voltage", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_generator_status_t, bus_voltage) },
59 { "rectifier_temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 38
, offsetof(mavlink_generator_status_t, rectifier_temperature) },
60 { "bat_current_setpoint", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_generator_status_t, bat_current_setpoint) },
61 { "generator_temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 40
, offsetof(mavlink_generator_status_t, generator_temperature) },
62 { "runtime", NULL, MAVLINK_TYPE_UINT32_T, 0
, 28
, offsetof(mavlink_generator_status_t, runtime) },
63 { "time_until_maintenance", NULL, MAVLINK_TYPE_INT32_T, 0
, 32
, offsetof(mavlink_generator_status_t, time_until_maintenance) },
65}
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87static inline uint16_t mavlink_msg_generator_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
88 uint64_t status, uint16_t generator_speed,
float battery_current,
float load_current,
float power_generated,
float bus_voltage, int16_t rectifier_temperature,
float bat_current_setpoint, int16_t generator_temperature, uint32_t runtime, int32_t time_until_maintenance)
90#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
92 _mav_put_uint64_t(buf, 0, status);
93 _mav_put_float(buf, 8, battery_current);
94 _mav_put_float(buf, 12, load_current);
95 _mav_put_float(buf, 16, power_generated);
96 _mav_put_float(buf, 20, bus_voltage);
97 _mav_put_float(buf, 24, bat_current_setpoint);
98 _mav_put_uint32_t(buf, 28, runtime);
99 _mav_put_int32_t(buf, 32, time_until_maintenance);
100 _mav_put_uint16_t(buf, 36, generator_speed);
101 _mav_put_int16_t(buf, 38, rectifier_temperature);
102 _mav_put_int16_t(buf, 40, generator_temperature);
106 mavlink_generator_status_t packet;
107 packet.status = status;
108 packet.battery_current = battery_current;
109 packet.load_current = load_current;
110 packet.power_generated = power_generated;
111 packet.bus_voltage = bus_voltage;
112 packet.bat_current_setpoint = bat_current_setpoint;
113 packet.runtime = runtime;
114 packet.time_until_maintenance = time_until_maintenance;
115 packet.generator_speed = generator_speed;
116 packet.rectifier_temperature = rectifier_temperature;
117 packet.generator_temperature = generator_temperature;
119 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN);
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146static inline uint16_t mavlink_msg_generator_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
147 uint64_t status, uint16_t generator_speed,
float battery_current,
float load_current,
float power_generated,
float bus_voltage, int16_t rectifier_temperature,
float bat_current_setpoint, int16_t generator_temperature, uint32_t runtime, int32_t time_until_maintenance)
149#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
151 _mav_put_uint64_t(buf, 0, status);
152 _mav_put_float(buf, 8, battery_current);
153 _mav_put_float(buf, 12, load_current);
154 _mav_put_float(buf, 16, power_generated);
155 _mav_put_float(buf, 20, bus_voltage);
156 _mav_put_float(buf, 24, bat_current_setpoint);
157 _mav_put_uint32_t(buf, 28, runtime);
158 _mav_put_int32_t(buf, 32, time_until_maintenance);
159 _mav_put_uint16_t(buf, 36, generator_speed);
160 _mav_put_int16_t(buf, 38, rectifier_temperature);
161 _mav_put_int16_t(buf, 40, generator_temperature);
165 mavlink_generator_status_t packet;
166 packet.status = status;
167 packet.battery_current = battery_current;
168 packet.load_current = load_current;
169 packet.power_generated = power_generated;
170 packet.bus_voltage = bus_voltage;
171 packet.bat_current_setpoint = bat_current_setpoint;
172 packet.runtime = runtime;
173 packet.time_until_maintenance = time_until_maintenance;
174 packet.generator_speed = generator_speed;
175 packet.rectifier_temperature = rectifier_temperature;
176 packet.generator_temperature = generator_temperature;
178 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN);
183 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_generator_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
209 mavlink_message_t* msg,
210 uint64_t status,uint16_t generator_speed,
float battery_current,
float load_current,
float power_generated,
float bus_voltage,int16_t rectifier_temperature,
float bat_current_setpoint,int16_t generator_temperature,uint32_t runtime,int32_t time_until_maintenance)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
214 _mav_put_uint64_t(buf, 0, status);
215 _mav_put_float(buf, 8, battery_current);
216 _mav_put_float(buf, 12, load_current);
217 _mav_put_float(buf, 16, power_generated);
218 _mav_put_float(buf, 20, bus_voltage);
219 _mav_put_float(buf, 24, bat_current_setpoint);
220 _mav_put_uint32_t(buf, 28, runtime);
221 _mav_put_int32_t(buf, 32, time_until_maintenance);
222 _mav_put_uint16_t(buf, 36, generator_speed);
223 _mav_put_int16_t(buf, 38, rectifier_temperature);
224 _mav_put_int16_t(buf, 40, generator_temperature);
228 mavlink_generator_status_t packet;
229 packet.status = status;
230 packet.battery_current = battery_current;
231 packet.load_current = load_current;
232 packet.power_generated = power_generated;
233 packet.bus_voltage = bus_voltage;
234 packet.bat_current_setpoint = bat_current_setpoint;
235 packet.runtime = runtime;
236 packet.time_until_maintenance = time_until_maintenance;
237 packet.generator_speed = generator_speed;
238 packet.rectifier_temperature = rectifier_temperature;
239 packet.generator_temperature = generator_temperature;
241 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN);
249
250
251
252
253
254
255
256static inline uint16_t mavlink_msg_generator_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_generator_status_t* generator_status)
258 return mavlink_msg_generator_status_pack(system_id, component_id, msg, generator_status->status, generator_status->generator_speed, generator_status->battery_current, generator_status->load_current, generator_status->power_generated, generator_status->bus_voltage, generator_status->rectifier_temperature, generator_status->bat_current_setpoint, generator_status->generator_temperature, generator_status->runtime, generator_status->time_until_maintenance);
262
263
264
265
266
267
268
269
270static inline uint16_t mavlink_msg_generator_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_generator_status_t* generator_status)
272 return mavlink_msg_generator_status_pack_chan(system_id, component_id, chan, msg, generator_status->status, generator_status->generator_speed, generator_status->battery_current, generator_status->load_current, generator_status->power_generated, generator_status->bus_voltage, generator_status->rectifier_temperature, generator_status->bat_current_setpoint, generator_status->generator_temperature, generator_status->runtime, generator_status->time_until_maintenance);
276
277
278
279
280
281
282
283
284static inline uint16_t mavlink_msg_generator_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_generator_status_t* generator_status)
286 return mavlink_msg_generator_status_pack_status(system_id, component_id, _status, msg, generator_status->status, generator_status->generator_speed, generator_status->battery_current, generator_status->load_current, generator_status->power_generated, generator_status->bus_voltage, generator_status->rectifier_temperature, generator_status->bat_current_setpoint, generator_status->generator_temperature, generator_status->runtime, generator_status->time_until_maintenance);
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
307static inline void mavlink_msg_generator_status_send(mavlink_channel_t chan, uint64_t status, uint16_t generator_speed,
float battery_current,
float load_current,
float power_generated,
float bus_voltage, int16_t rectifier_temperature,
float bat_current_setpoint, int16_t generator_temperature, uint32_t runtime, int32_t time_until_maintenance)
309#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
310 char buf[MAVLINK_MSG_ID_GENERATOR_STATUS_LEN];
311 _mav_put_uint64_t(buf, 0, status);
312 _mav_put_float(buf, 8, battery_current);
313 _mav_put_float(buf, 12, load_current);
314 _mav_put_float(buf, 16, power_generated);
315 _mav_put_float(buf, 20, bus_voltage);
316 _mav_put_float(buf, 24, bat_current_setpoint);
317 _mav_put_uint32_t(buf, 28, runtime);
318 _mav_put_int32_t(buf, 32, time_until_maintenance);
319 _mav_put_uint16_t(buf, 36, generator_speed);
320 _mav_put_int16_t(buf, 38, rectifier_temperature);
321 _mav_put_int16_t(buf, 40, generator_temperature);
323 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GENERATOR_STATUS, buf, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
325 mavlink_generator_status_t packet;
326 packet.status = status;
327 packet.battery_current = battery_current;
328 packet.load_current = load_current;
329 packet.power_generated = power_generated;
330 packet.bus_voltage = bus_voltage;
331 packet.bat_current_setpoint = bat_current_setpoint;
332 packet.runtime = runtime;
333 packet.time_until_maintenance = time_until_maintenance;
334 packet.generator_speed = generator_speed;
335 packet.rectifier_temperature = rectifier_temperature;
336 packet.generator_temperature = generator_temperature;
338 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GENERATOR_STATUS, (
const char *)&packet, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
343
344
345
346
347static inline void mavlink_msg_generator_status_send_struct(mavlink_channel_t chan,
const mavlink_generator_status_t* generator_status)
349#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
350 mavlink_msg_generator_status_send(chan, generator_status->status, generator_status->generator_speed, generator_status->battery_current, generator_status->load_current, generator_status->power_generated, generator_status->bus_voltage, generator_status->rectifier_temperature, generator_status->bat_current_setpoint, generator_status->generator_temperature, generator_status->runtime, generator_status->time_until_maintenance);
352 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GENERATOR_STATUS, (
const char *)generator_status, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
356#if MAVLINK_MSG_ID_GENERATOR_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
358
359
360
361
362
363
364static inline void mavlink_msg_generator_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t status, uint16_t generator_speed,
float battery_current,
float load_current,
float power_generated,
float bus_voltage, int16_t rectifier_temperature,
float bat_current_setpoint, int16_t generator_temperature, uint32_t runtime, int32_t time_until_maintenance)
366#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
367 char *buf = (
char *)msgbuf;
368 _mav_put_uint64_t(buf, 0, status);
369 _mav_put_float(buf, 8, battery_current);
370 _mav_put_float(buf, 12, load_current);
371 _mav_put_float(buf, 16, power_generated);
372 _mav_put_float(buf, 20, bus_voltage);
373 _mav_put_float(buf, 24, bat_current_setpoint);
374 _mav_put_uint32_t(buf, 28, runtime);
375 _mav_put_int32_t(buf, 32, time_until_maintenance);
376 _mav_put_uint16_t(buf, 36, generator_speed);
377 _mav_put_int16_t(buf, 38, rectifier_temperature);
378 _mav_put_int16_t(buf, 40, generator_temperature);
380 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GENERATOR_STATUS, buf, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
382 mavlink_generator_status_t *packet = (mavlink_generator_status_t *)msgbuf;
383 packet->status = status;
384 packet->battery_current = battery_current;
385 packet->load_current = load_current;
386 packet->power_generated = power_generated;
387 packet->bus_voltage = bus_voltage;
388 packet->bat_current_setpoint = bat_current_setpoint;
389 packet->runtime = runtime;
390 packet->time_until_maintenance = time_until_maintenance;
391 packet->generator_speed = generator_speed;
392 packet->rectifier_temperature = rectifier_temperature;
393 packet->generator_temperature = generator_temperature;
395 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GENERATOR_STATUS, (
const char *)packet, MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN, MAVLINK_MSG_ID_GENERATOR_STATUS_CRC);
406
407
408
409
410static inline uint64_t mavlink_msg_generator_status_get_status(
const mavlink_message_t* msg)
412 return _MAV_RETURN_uint64_t(msg, 0);
416
417
418
419
420static inline uint16_t mavlink_msg_generator_status_get_generator_speed(
const mavlink_message_t* msg)
422 return _MAV_RETURN_uint16_t(msg, 36);
426
427
428
429
430static inline float mavlink_msg_generator_status_get_battery_current(
const mavlink_message_t* msg)
432 return _MAV_RETURN_float(msg, 8);
436
437
438
439
440static inline float mavlink_msg_generator_status_get_load_current(
const mavlink_message_t* msg)
442 return _MAV_RETURN_float(msg, 12);
446
447
448
449
450static inline float mavlink_msg_generator_status_get_power_generated(
const mavlink_message_t* msg)
452 return _MAV_RETURN_float(msg, 16);
456
457
458
459
460static inline float mavlink_msg_generator_status_get_bus_voltage(
const mavlink_message_t* msg)
462 return _MAV_RETURN_float(msg, 20);
466
467
468
469
470static inline int16_t mavlink_msg_generator_status_get_rectifier_temperature(
const mavlink_message_t* msg)
472 return _MAV_RETURN_int16_t(msg, 38);
476
477
478
479
480static inline float mavlink_msg_generator_status_get_bat_current_setpoint(
const mavlink_message_t* msg)
482 return _MAV_RETURN_float(msg, 24);
486
487
488
489
490static inline int16_t mavlink_msg_generator_status_get_generator_temperature(
const mavlink_message_t* msg)
492 return _MAV_RETURN_int16_t(msg, 40);
496
497
498
499
500static inline uint32_t mavlink_msg_generator_status_get_runtime(
const mavlink_message_t* msg)
502 return _MAV_RETURN_uint32_t(msg, 28);
506
507
508
509
510static inline int32_t mavlink_msg_generator_status_get_time_until_maintenance(
const mavlink_message_t* msg)
512 return _MAV_RETURN_int32_t(msg, 32);
516
517
518
519
520
521static inline void mavlink_msg_generator_status_decode(
const mavlink_message_t* msg, mavlink_generator_status_t* generator_status)
523#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
524 generator_status->status = mavlink_msg_generator_status_get_status(msg);
525 generator_status->battery_current = mavlink_msg_generator_status_get_battery_current(msg);
526 generator_status->load_current = mavlink_msg_generator_status_get_load_current(msg);
527 generator_status->power_generated = mavlink_msg_generator_status_get_power_generated(msg);
528 generator_status->bus_voltage = mavlink_msg_generator_status_get_bus_voltage(msg);
529 generator_status->bat_current_setpoint = mavlink_msg_generator_status_get_bat_current_setpoint(msg);
530 generator_status->runtime = mavlink_msg_generator_status_get_runtime(msg);
531 generator_status->time_until_maintenance = mavlink_msg_generator_status_get_time_until_maintenance(msg);
532 generator_status->generator_speed = mavlink_msg_generator_status_get_generator_speed(msg);
533 generator_status->rectifier_temperature = mavlink_msg_generator_status_get_rectifier_temperature(msg);
534 generator_status->generator_temperature = mavlink_msg_generator_status_get_generator_temperature(msg);
536 uint8_t len = msg->len < MAVLINK_MSG_ID_GENERATOR_STATUS_LEN? msg->len : MAVLINK_MSG_ID_GENERATOR_STATUS_LEN;
537 memset(generator_status, 0, MAVLINK_MSG_ID_GENERATOR_STATUS_LEN);
538 memcpy(generator_status, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_GENERATOR_STATUS
Definition: mavlink_msg_generator_status.h:4
#define MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN
Definition: mavlink_msg_generator_status.h:22
#define MAVLINK_MSG_ID_GENERATOR_STATUS_LEN
Definition: mavlink_msg_generator_status.h:21
#define MAVLINK_MSG_ID_GENERATOR_STATUS_CRC
Definition: mavlink_msg_generator_status.h:26
Definition: mavlink_msg_generator_status.h:7
int16_t rectifier_temperature
Definition: mavlink_msg_generator_status.h:17
float bat_current_setpoint
Definition: mavlink_msg_generator_status.h:13
float power_generated
Definition: mavlink_msg_generator_status.h:11
uint16_t generator_speed
Definition: mavlink_msg_generator_status.h:16
uint32_t runtime
Definition: mavlink_msg_generator_status.h:14
int32_t time_until_maintenance
Definition: mavlink_msg_generator_status.h:15
float battery_current
Definition: mavlink_msg_generator_status.h:9
float bus_voltage
Definition: mavlink_msg_generator_status.h:12
uint64_t status
Definition: mavlink_msg_generator_status.h:8
int16_t generator_temperature
Definition: mavlink_msg_generator_status.h:18
float load_current
Definition: mavlink_msg_generator_status.h:10