Added "continuous logging" functionality.

This is useful if you're having stability troubles and/or are worried
about crashes. With traditional logging you can lose your capture if
the program, CAN adapter, or computer crash before you've saved. With
continuous logging the file is flushed to disk every couple of seconds
so you won't lose more than a few seconds of log even during a crash.
This commit is contained in:
Collin Kidder
2017-10-07 22:15:21 -04:00
parent 316ecedc13
commit 9be4838618
6 changed files with 170 additions and 10 deletions
+8 -1
View File
@@ -42,7 +42,7 @@ public:
static bool loadCanDumpFile(QString, QVector<CANFrame>*);
static bool loadPCANFile(QString, QVector<CANFrame>*);
static bool loadKvaserFile(QString, QVector<CANFrame>*, bool);
static bool saveCRTDFile(QString, const QVector<CANFrame>*);
static bool saveCRTDFile(QString, const QVector<CANFrame>*);
static bool saveNativeCSVFile(QString, const QVector<CANFrame>*);
static bool saveGenericCSVFile(QString, const QVector<CANFrame>*);
static bool saveLogFile(QString, const QVector<CANFrame>*);
@@ -51,6 +51,13 @@ public:
static bool saveIXXATFile(QString, const QVector<CANFrame>*);
static bool saveCANDOFile(QString, const QVector<CANFrame>*);
static bool saveVehicleSpyFile(QString, const QVector<CANFrame>*);
static bool openContinuousNative();
static bool closeContinuousNative();
static bool writeContinuousNative(const QVector<CANFrame>*, int);
static bool flushContinuousNative();
private:
static QFile continuousFile;
};
#endif // FRAMEFILEIO_H