35 lines
812 B
C
35 lines
812 B
C
|
#pragma once
|
||
|
|
||
|
#include <QThread>
|
||
|
#include <QVector>
|
||
|
#include <QString>
|
||
|
#include <QMap>
|
||
|
#include <QFile>
|
||
|
#include <QTextStream>
|
||
|
#include <random>
|
||
|
|
||
|
class DataCollectionThread : public QThread
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
DataCollectionThread(QVector<QString> collectionDataNames, double collectionFrequency,
|
||
|
double collectionTime, QString collectionPath);
|
||
|
|
||
|
protected:
|
||
|
void run() override;
|
||
|
signals:
|
||
|
void DataCollectionStatus(const bool &status, const QString &filePath);
|
||
|
void UpdateDataCollectionTime(const unsigned int &time);
|
||
|
|
||
|
public slots:
|
||
|
void onStopDataCollection();
|
||
|
|
||
|
private:
|
||
|
template <typename T>
|
||
|
T generateTestCollectionData();
|
||
|
QMap<QString, QVector<double>> m_CollectionDataMap;
|
||
|
double m_CollectionFrequency;
|
||
|
double m_CollectionTime;
|
||
|
QString m_CollectionPath;
|
||
|
};
|