-
Notifications
You must be signed in to change notification settings - Fork 0
/
olaworker.h
54 lines (39 loc) · 1.11 KB
/
olaworker.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
#ifndef OLAWORKER_H_
#define OLAWORKER_H_
#include <stdint.h>
#include <QObject>
#include <ola/client/ClientWrapper.h>
#include <ola/network/IPV4Address.h>
#include <ola/acn/CID.h>
#include <string>
#include <vector>
struct E131Source {
ola::acn::CID cid;
ola::network::IPV4Address ip_address;
std::string source_name;
std::vector<uint16_t> universes;
};
bool lessThan(const E131Source &e1, const E131Source &e2);
class OLAWorker : public QObject {
Q_OBJECT
public:
explicit OLAWorker(QObject *parent = 0);
~OLAWorker();
bool Init();
void RefreshDiscoveredE131Sources();
// Callback for the OLA Client
void HandleDevices(const ola::client::Result &result,
const std::vector<ola::client::OlaDevice> &devices);
void HandleConfigResponse(const ola::client::Result &result,
const std::string &reply);
signals:
void finished();
void E131SourceList(const QVector<E131Source> &sources);
public slots:
void process();
private:
ola::client::OlaClientWrapper m_wrapper;
unsigned int device_alias_;
bool got_devices_;
};
#endif // OLAWORKER_H_