LogCompressor.h 792 Bytes
Newer Older
pixhawk's avatar
pixhawk committed
1 2 3 4 5 6 7
#ifndef LOGCOMPRESSOR_H
#define LOGCOMPRESSOR_H

#include <QThread>

class LogCompressor : public QThread
{
8
    Q_OBJECT
pixhawk's avatar
pixhawk committed
9
public:
10
    /** @brief Create the log compressor. It will only get active upon calling startCompression() */
11
    LogCompressor(QString logFileName, QString outFileName="", int uasid = 0);
12
    void startCompression();
13 14 15
    bool isFinished();
    int getDataLines();
    int getCurrentLine();
16

pixhawk's avatar
pixhawk committed
17 18 19
protected:
    void run();
    QString logFileName;
20 21 22 23
    QString outFileName;
    bool running;
    int currentDataLine;
    int dataLines;
pixhawk's avatar
pixhawk committed
24
    int uasid;
25 26 27 28 29 30

signals:
    /** @brief This signal is emitted once a logfile has been finished writing
     * @param fileName The name out the output (CSV) file
     */
    void finishedFile(QString fileName);
pixhawk's avatar
pixhawk committed
31 32 33
};

#endif // LOGCOMPRESSOR_H