forked from challinan/pmd-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HAMP_dataSupplier.h
53 lines (44 loc) · 1.1 KB
/
HAMP_dataSupplier.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
46
47
48
49
50
51
52
53
#ifndef NUC_DATASUPPLIER_H
#define NUC_DATASUPPLIER_H
#include <QObject>
#include <QTimer>
#include <QtNetwork>
#include <QTcpServer>
#include <QTcpSocket>
typedef struct {
unsigned short int index;
signed short int ecgValue;
signed short int abpValue;
signed short int plethValue;
} pm_data_struct;
class HAMPDataSupplier: public QObject
{
Q_OBJECT
public:
HAMPDataSupplier(QObject * parent = 0);
~HAMPDataSupplier();
void startStopNucleus(bool flg);
QString getScreenShortPath();
QList <unsigned int> ecgData;
QList <unsigned int> abpData;
QList <unsigned int> plethData;
public slots:
void updateData();
void updateTimer();
signals:
void dataReceived(pm_data_struct *);
void connectionStatus(bool);
private:
unsigned int getECGData();
unsigned int getABPData();
unsigned int getPlethData();
private:
pm_data_struct pm_data;
QTimer *timer;
QTimer *disTimer;
int ecgIndex;
int abpIndex;
int plethIndex;
QString m_screenShortPath;
};
#endif // DATASUPPLIER_H