SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
kiwisdrworker.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Vort //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef _KIWISDR_KIWISDRWORKER_H_
19 #define _KIWISDR_KIWISDRWORKER_H_
20 
21 #include <QTimer>
22 #include <QtWebSockets/QtWebSockets>
23 
24 #include "dsp/samplesinkfifo.h"
25 
26 class KiwiSDRWorker : public QObject {
27  Q_OBJECT
28 
29 public:
30  KiwiSDRWorker(SampleSinkFifo* sampleFifo);
31  int getStatus() const { return m_status; }
32 
33 private:
34  QTimer m_timer;
35  QWebSocket m_webSocket;
36 
39 
40  QString m_serverAddress;
42 
44  bool m_useAGC;
45 
46  int m_status;
47 
48  void sendCenterFrequency();
49  void sendGain();
50 
51 signals:
52  void updateStatus(int status);
53 
54 public slots:
55  void onCenterFrequencyChanged(quint64 centerFrequency);
56  void onServerAddressChanged(QString serverAddress);
57  void onGainChanged(quint32 gain, bool useAGC);
58 
59 private slots:
60  void onConnected();
61  void onDisconnected();
62  void onBinaryMessageReceived(const QByteArray &message);
63  void onSocketError(QAbstractSocket::SocketError error);
64 
65  void tick();
66 };
67 
68 #endif // _KIWISDR_KIWISDRWORKER_H_
int getStatus() const
Definition: kiwisdrworker.h:31
std::vector< Sample > SampleVector
Definition: dsptypes.h:96
void onCenterFrequencyChanged(quint64 centerFrequency)
QString m_serverAddress
Definition: kiwisdrworker.h:40
SampleVector m_samplesBuf
Definition: kiwisdrworker.h:37
void sendCenterFrequency()
QWebSocket m_webSocket
Definition: kiwisdrworker.h:35
KiwiSDRWorker(SampleSinkFifo *sampleFifo)
uint32_t m_gain
Definition: kiwisdrworker.h:43
void onDisconnected()
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint64_t m_centerFrequency
Definition: kiwisdrworker.h:41
SampleSinkFifo * m_sampleFifo
Definition: kiwisdrworker.h:38
void onBinaryMessageReceived(const QByteArray &message)
void updateStatus(int status)
void onServerAddressChanged(QString serverAddress)
void onSocketError(QAbstractSocket::SocketError error)
void onGainChanged(quint32 gain, bool useAGC)
int m_status
See GUI for status number detail.
Definition: kiwisdrworker.h:46
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48