-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathudpcivdata.h
56 lines (41 loc) · 929 Bytes
/
udpcivdata.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
// Class for all (pseudo) serial communications
#ifndef UDPCIVDATA_H
#define UDPCIVDATA_H
#include <QObject>
#include <QUdpSocket>
#include <QNetworkDatagram>
#include <QHostInfo>
#include <QTimer>
#include <QMutex>
#include <QDateTime>
#include <QByteArray>
#include <QVector>
#include <QMap>
#include <QUuid>
// Allow easy endian-ness conversions
#include <QtEndian>
// Needed for audio
#include <QBuffer>
#include <QThread>
#include <QDebug>
#include "packettypes.h"
#include "udpbase.h"
class udpCivData : public udpBase
{
Q_OBJECT
public:
udpCivData(QHostAddress local, QHostAddress ip, quint16 civPort, bool splitWf, quint16 lport);
~udpCivData();
QMutex serialmutex;
signals:
int receive(QByteArray);
public slots:
void send(QByteArray d);
private:
void watchdog();
void dataReceived();
void sendOpenClose(bool close);
QTimer* startCivDataTimer = Q_NULLPTR;
bool splitWaterfall = false;
};
#endif