-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqartnet.h
81 lines (66 loc) · 1.82 KB
/
qartnet.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef QARTNET_H
#define QARTNET_H
#include "qartnet_global.h"
#include "common.h"
#include "qartnetnode.h"
#include <QObject>
#include <QHostAddress>
#include <QNetworkInterface>
class QUdpSocket;
class QArtNetPoll;
class QArtNetReply;
class QARTNETSHARED_EXPORT QArtNet : public QObject
{
Q_OBJECT
public:
QArtNet(QObject *parent);
virtual ~QArtNet();
bool start(QNetworkInterface iface);
void stop();
void sendPoll();
void sendPollReply();
void sendDmx();
void sendRawDmx();
void sendAddress();
void sendInput();
void sendFirmware();
void sendFirmwareReply();
void sendTodRequest();
void sendTodControl();
void sendRdm();
void sendRdmDevice();
void addRdmDevice();
void removeRdmDevice();
signals:
void artnetPacketReceived();
void artnetPacketSent();
void artnetPollReceived();
void artnetReplyReceived();
void artnetDmxReceived();
void artnetAddressReceived();
void artnetInputReceived();
void artnetTodRequestReceived();
void artnetTodDataReceived();
void artnetTodControlReceived();
void artnetRdmReceived();
void artnetIpProgReceived();
void artnetFirmwareReceived();
void artnetFirmwareReplyReceived();
private slots:
void readPendingDatagrams();
private:
void processPoll(QHostAddress sender, QArtNetPoll *poll);
void processReply(QArtNetReply *reply);
void processPacket(QHostAddress sender, u_int16_t port, QByteArray datagram);
void createLocalNode();
// List of controllers on the network
QList<QHostAddress> m_controllers;
// List of nodes on the network
QList<QArtNetNode *> m_nodeList;
QUdpSocket *m_socket;
QArtNetNode *m_self; // Local node
QHostAddress m_selfIp;
QHostAddress m_broadcast;
QNetworkInterface m_iface;
};
#endif // QARTNET_H