Logfile.h 529 Bytes
Newer Older
pixhawk's avatar
pixhawk committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#ifndef LOGFILE_H
#define LOGFILE_H

#include <QFile>
#include <QTextStream>
#include <UASInterface.h>

class LogFile : public QObject
{
    Q_OBJECT
public:
    LogFile(UASInterface* uas, QString filename, QString formatString="");
    ~LogFile();

public slots:
    void addValue(QString id, double value);
    void addValue(int uas, QString id, double value, quint64 timestamp);

protected:
    QFile* file;
    QTextStream* out;
    QString separator;
    QString formatString;
    UASInterface* uas;
};

#endif // LOGFILE_H