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.
remoteinputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2016 Edouard Griffiths, F4EXB //
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 INCLUDE_REMOTEINPUTGUI_H
19 #define INCLUDE_REMOTEINPUTGUI_H
20 
21 #include <QTimer>
22 #include <QWidget>
23 #include <QNetworkRequest>
24 
26 #include "util/messagequeue.h"
27 
28 #include "remoteinput.h"
29 
30 class DeviceUISet;
31 class QNetworkAccessManager;
32 class QNetworkReply;
33 class QJsonObject;
34 
35 namespace Ui {
36  class RemoteInputGui;
37 }
38 
39 class RemoteInputGui : public QWidget, public PluginInstanceGUI {
40  Q_OBJECT
41 
42 public:
43  explicit RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
44  virtual ~RemoteInputGui();
45  virtual void destroy();
46 
47  void setName(const QString& name);
48  QString getName() const;
49 
50  void resetToDefaults();
51  QByteArray serialize() const;
52  bool deserialize(const QByteArray& data);
53  virtual qint64 getCenterFrequency() const;
54  virtual void setCenterFrequency(qint64 centerFrequency);
55  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
56  virtual bool handleMessage(const Message& message);
57 
58 private:
59  Ui::RemoteInputGui* ui;
60 
67  QTimer m_updateTimer;
68  QTimer m_statusTimer;
71 
72  // int m_sampleRate;
73  // quint64 m_centerFrequency;
89 
91  std::size_t m_tickCount;
92 
95 
98  QTime m_eventsTime;
99 
102  double m_txDelay;
103 
106 
107  QNetworkAccessManager *m_networkManager;
108  QNetworkRequest m_networkRequest;
109 
110  void blockApplySettings(bool block);
111  void displaySettings();
112  void displayTime();
113  void sendSettings();
114  void updateWithAcquisition();
115  void updateWithStreamTime();
116  void updateSampleRateAndFrequency();
117  void displayEventCounts();
118  void displayEventTimer();
119  void analyzeApiReply(const QJsonObject& jsonObject);
120 
121 private slots:
122  void handleInputMessages();
123  void on_apiApplyButton_clicked(bool checked);
124  void on_dataApplyButton_clicked(bool checked);
125  void on_dcOffset_toggled(bool checked);
126  void on_iqImbalance_toggled(bool checked);
127  void on_apiAddress_returnPressed();
128  void on_apiPort_returnPressed();
129  void on_dataAddress_returnPressed();
130  void on_dataPort_returnPressed();
131  void on_startStop_toggled(bool checked);
132  void on_record_toggled(bool checked);
133  void on_eventCountsReset_clicked(bool checked);
134  void updateHardware();
135  void updateStatus();
136  void networkManagerFinished(QNetworkReply *reply);
137  void openDeviceSettingsDialog(const QPoint& p);
138 };
139 
140 #endif // INCLUDE_REMOTEINPUTGUI_H
uint32_t m_countUnrecoverable
quint64 m_streamCenterFrequency
Center frequency of received stream.
virtual MessageQueue * getInputMessageQueue()
QNetworkAccessManager * m_networkManager
uint32_t m_countRecovered
std::size_t m_tickCount
Ui::RemoteInputGui * ui
uint64_t m_startingTimeStampms
DeviceUISet * m_deviceUISet
MessageQueue m_inputMessageQueue
unsigned int uint32_t
Definition: rtptypes_win.h:46
int32_t m_bufferGauge
RemoteInputSettings m_settings
current settings
bool m_allBlocksReceived
int int32_t
Definition: rtptypes_win.h:45
QTimer m_statusTimer
int m_streamSampleRate
Sample rate of received stream.
QPalette m_paletteWhiteText
QNetworkRequest m_networkRequest
float m_bufferLengthInSecs
QTimer m_updateTimer
float m_avgNbOriginalBlocks
RemoteInput * m_sampleSource
QPalette m_paletteGreenText
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48
int m_framesDecodingStatus