Skip to content
Snippets Groups Projects
QGCUASFileManager.h 958 B
Newer Older
  • Learn to ignore specific revisions
  • #ifndef QGCUASFILEMANAGER_H
    #define QGCUASFILEMANAGER_H
    
    #include <QObject>
    #include "UASInterface.h"
    
    class QGCUASFileManager : public QObject
    {
        Q_OBJECT
    public:
        QGCUASFileManager(QObject* parent, UASInterface* uas);
    
    signals:
    
    Lorenz Meier's avatar
    Lorenz Meier committed
        void statusMessage(const QString& msg);
    
    Lorenz Meier's avatar
    Lorenz Meier committed
        void receiveMessage(LinkInterface* link, mavlink_message_t message);
    
        void nothingMessage();
    
    Lorenz Meier's avatar
    Lorenz Meier committed
        void listRecursively(const QString &from);
        void downloadPath(const QString& from, const QString& to);
    
    
    protected:
        UASInterface* _mav;
    
    Lorenz Meier's avatar
    Lorenz Meier committed
        quint16 _encdata_seq;
    
        struct RequestHeader
            {
                uint8_t		magic;
                uint8_t		session;
                uint8_t		opcode;
                uint8_t		size;
                uint32_t	crc32;
                uint32_t	offset;
                uint8_t		data[];
            };
    
        static quint32 crc32(const uint8_t *src, unsigned len, unsigned state);
    
    
    };
    
    #endif // QGCUASFILEMANAGER_H