-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.h
42 lines (33 loc) · 778 Bytes
/
device.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
#ifndef DEVICE_H
#define DEVICE_H
#include <QObject>
#include <QSerialPort>
#include <QSqlQuery>
#include <QVector>
class Device : public QObject
{
Q_OBJECT
private:
QSerialPort *m_serialPort;
QString m_id;
QByteArray *m_dataByteArray;
int m_maxArraySize;
int m_ppm;
int m_ppmMax;
QVector<float> m_temperatures;
double m_temperatureMin;
signals:
void dataReceived();
void dataChecked(int p_state);
public slots:
void getData();
void checkData();
public:
Device(QString p_id, QString p_port, QSerialPort::BaudRate p_baudRate, int p_ppmMax, double p_temperatureMin);
virtual ~Device();
int getPPM();
QVector<float> getTemperatures();
QString getId();
void recordAllData();
};
#endif // DEVICE_H