-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDAQReader.h
45 lines (34 loc) · 956 Bytes
/
DAQReader.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef DAQREADER_H
#define DAQREADER_H
#include <QThread>
#include <QMutex>
#include <QMap>
#include <QVector>
#include <QPointF>
#include "DAQSettingsDialog/DAQSettingsDialog.h"
class DAQReader : public QThread
{
Q_OBJECT
public:
DAQReader();
int appendData(QMap<int, QVector<QPointF> >* curveMap);
void stop();
signals:
void newData();
void daqError(const QString& errorMessage);
void startedRecording();
void stoppedRecording();
public:
void run();
void updateDAQSettings(const DAQSettings& settings);
protected:
bool DAQCheckHandler(const char* cmd, int error);
enum { maxChannels = 8, maxScansPerSecond = 35000 };
volatile bool shouldStop;
int numChannels;
double dt;
double Vmins[maxChannels], Vmaxes[maxChannels];
QVector<qreal> newDataBuffer[maxChannels];
QMutex mutex;
};
#endif