#ifndef MAVLINKDECODER_H#define MAVLINKDECODER_H#include <QObject>#include "MAVLinkProtocol.h"classMAVLinkDecoder:publicQObject{Q_OBJECTpublic:MAVLinkDecoder(MAVLinkProtocol*protocol,QObject*parent=0);signals:voidtextMessageReceived(intuasid,intcomponentid,intseverity,constQString&text);voidvalueChanged(constintuasId,constQString&name,constQString&unit,constdoublevalue,constquint64msec);voidvalueChanged(constintuasId,constQString&name,constQString&unit,constintvalue,constquint64msec);voidvalueChanged(constintuasId,constQString&name,constQString&unit,constunsignedintvalue,constquint64msec);voidvalueChanged(constintuasId,constQString&name,constQString&unit,constquint64value,constquint64msec);voidvalueChanged(constintuasId,constQString&name,constQString&unit,constqint64value,constquint64msec);publicslots:/** @brief Receive one message from the protocol and decode it */voidreceiveMessage(LinkInterface*link,mavlink_message_tmessage);protected:/** @brief Emit the value of one message field */voidemitFieldValue(mavlink_message_t*msg,intfieldid,quint64time);mavlink_message_treceivedMessages[256];///< Available / known messagesmavlink_message_info_tmessageInfo[256];};#endif // MAVLINKDECODER_H