-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flrig.h
52 lines (44 loc) · 1.01 KB
/
flrig.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
#ifndef FLRIG_H
#define FLRIG_H
#include <QObject>
#include <QTimer>
#include "maia/maiaXmlRpcClient.h"
class Flrig : public QObject
{
Q_OBJECT
public:
explicit Flrig(QHostAddress host, uint16_t port, uint16_t updateInterval, QObject *parent = nullptr);
void start();
void stop();
QString getVersion();
unsigned int getFrequencyHz();
QString getMode();
QString getErrorString();
int getErrorCode();
bool getConnState();
private:
MaiaXmlRpcClient *rpc;
QHostAddress host;
uint16_t port;
uint16_t updateInterval;
QTimer *updateTimer;
int errorCode;
QString errorString;
QString flrigVersion;
unsigned int frequencyHz;
QString mode;
bool rpc_connected;
private slots:
void requestRpcData();
void rpcResponseInfo(QVariant &);
void rpcResponseFreq(QVariant &);
void rpcResponseMode(QVariant &);
void rpcDefaultResponse(QVariant &arg);
void rpcFault(int, const QString &);
signals:
void connected();
void disconnected();
void rpcError();
void updated();
};
#endif // FLRIG_H