-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPCMdekoder.h
58 lines (39 loc) · 921 Bytes
/
PCMdekoder.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
54
55
56
57
58
#ifndef PCMDEKODER_H
#define PCMDEKODER_H
#include <QtCore>
#include <QThread>
#include <QString>
#include <QDebug>
#include <QString>
#include "serialport.h"
class PCMdekoder : public QThread
{
Q_OBJECT
public:
PCMdekoder();
~PCMdekoder();
void run();
bool init();
void uninit();
int Get_lastValue() { return m_lastValue; }
QString Get_portname() { return m_portname; }
int Get_baudrate() {return m_baudrate; }
void Set_portname(QString name) { m_portname = name; }
void Set_baudrate(int val) { m_baudrate = val; }
struct DekoderStatus_t {
int validPCMwords;
int invalidPCMwords;
};
DekoderStatus_t* Get_Status() {return &m_status; }
signals:
void newData(const QString, const double);
protected:
private:
serialport* source;
QString m_portname;
bool stop_running;
DekoderStatus_t m_status;
int m_lastValue;
int m_baudrate;
};
#endif // PCMDEKODER_H