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.
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
LocalInputGui Class Reference

#include <localinputgui.h>

+ Inheritance diagram for LocalInputGui:
+ Collaboration diagram for LocalInputGui:

Public Member Functions

 LocalInputGui (DeviceUISet *deviceUISet, QWidget *parent=0)
 
virtual ~LocalInputGui ()
 
virtual void destroy ()
 
void setName (const QString &name)
 
QString getName () const
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 centerFrequency)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &message)
 
- Public Member Functions inherited from PluginInstanceGUI
 PluginInstanceGUI ()
 
virtual ~PluginInstanceGUI ()
 

Private Slots

void handleInputMessages ()
 
void on_dcOffset_toggled (bool checked)
 
void on_iqImbalance_toggled (bool checked)
 
void on_startStop_toggled (bool checked)
 
void on_record_toggled (bool checked)
 
void updateHardware ()
 
void updateStatus ()
 
void openDeviceSettingsDialog (const QPoint &p)
 

Private Member Functions

void blockApplySettings (bool block)
 
void displaySettings ()
 
void displayTime ()
 
void sendSettings ()
 
void updateSampleRateAndFrequency ()
 

Private Attributes

Ui::LocalInputGui * ui
 
DeviceUISetm_deviceUISet
 
LocalInputSettings m_settings
 current settings More...
 
LocalInputm_sampleSource
 
bool m_acquisition
 
int m_streamSampleRate
 Sample rate of received stream. More...
 
quint64 m_streamCenterFrequency
 Center frequency of received stream. More...
 
QTimer m_updateTimer
 
QTimer m_statusTimer
 
int m_lastEngineState
 
MessageQueue m_inputMessageQueue
 
uint64_t m_startingTimeStampms
 
int m_framesDecodingStatus
 
bool m_allBlocksReceived
 
float m_bufferLengthInSecs
 
int32_t m_bufferGauge
 
int m_minNbBlocks
 
int m_minNbOriginalBlocks
 
int m_maxNbRecovery
 
float m_avgNbBlocks
 
float m_avgNbOriginalBlocks
 
float m_avgNbRecovery
 
int m_nbOriginalBlocks
 
int m_nbFECBlocks
 
int m_sampleBits
 
int m_sampleBytes
 
int m_samplesCount
 
std::size_t m_tickCount
 
bool m_addressEdited
 
bool m_dataPortEdited
 
uint32_t m_countUnrecoverable
 
uint32_t m_countRecovered
 
QTime m_eventsTime
 
bool m_doApplySettings
 
bool m_forceSettings
 
double m_txDelay
 
QPalette m_paletteGreenText
 
QPalette m_paletteWhiteText
 
QNetworkAccessManager * m_networkManager
 
QNetworkRequest m_networkRequest
 

Detailed Description

Definition at line 39 of file localinputgui.h.

Constructor & Destructor Documentation

◆ LocalInputGui()

LocalInputGui::LocalInputGui ( DeviceUISet deviceUISet,
QWidget *  parent = 0 
)
explicit

Definition at line 47 of file localinputgui.cpp.

References displaySettings(), DeviceAPI::getSampleSource(), ColorMapper::GrayGold, handleInputMessages(), DeviceUISet::m_deviceAPI, m_deviceUISet, m_eventsTime, m_forceSettings, m_inputMessageQueue, m_networkManager, m_paletteGreenText, m_paletteWhiteText, m_sampleSource, m_startingTimeStampms, m_statusTimer, m_updateTimer, openDeviceSettingsDialog(), sendSettings(), LocalInput::setMessageQueueToGUI(), ui, updateHardware(), and updateStatus().

47  :
48  QWidget(parent),
49  ui(new Ui::LocalInputGui),
50  m_deviceUISet(deviceUISet),
51  m_settings(),
52  m_sampleSource(0),
53  m_acquisition(false),
59  m_bufferGauge(-50),
60  m_nbOriginalBlocks(128),
61  m_nbFECBlocks(0),
62  m_sampleBits(16), // assume 16 bits to start with
63  m_sampleBytes(2),
64  m_samplesCount(0),
65  m_tickCount(0),
66  m_addressEdited(false),
67  m_dataPortEdited(false),
70  m_doApplySettings(true),
71  m_forceSettings(true),
72  m_txDelay(0.0)
73 {
74  m_paletteGreenText.setColor(QPalette::WindowText, Qt::green);
75  m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
76 
78  ui->setupUi(this);
79 
80  ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
81  ui->centerFrequency->setValueRange(7, 0, 9999999U);
82 
83  ui->centerFrequencyHz->setColorMapper(ColorMapper(ColorMapper::GrayGold));
84  ui->centerFrequencyHz->setValueRange(3, 0, 999U);
85 
86  CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
87  connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
88 
90 
91  connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
92  m_statusTimer.start(500);
93  connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
94 
96 
97  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
99 
100  m_networkManager = new QNetworkAccessManager();
101  connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
102 
103  m_eventsTime.start();
104 
105  m_forceSettings = true;
106  sendSettings();
107 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
void openDeviceSettingsDialog(const QPoint &p)
void displaySettings()
QPalette m_paletteWhiteText
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
Definition: deviceapi.cpp:213
int m_framesDecodingStatus
Definition: localinputgui.h:75
float m_bufferLengthInSecs
Definition: localinputgui.h:77
uint32_t m_countUnrecoverable
Definition: localinputgui.h:96
bool m_addressEdited
Definition: localinputgui.h:93
QTimer m_statusTimer
Definition: localinputgui.h:68
uint64_t m_startingTimeStampms
Definition: localinputgui.h:74
int m_nbOriginalBlocks
Definition: localinputgui.h:85
MessageQueue m_inputMessageQueue
Definition: localinputgui.h:70
engine is before initialization
Definition: deviceapi.h:53
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
int32_t m_bufferGauge
Definition: localinputgui.h:78
LocalInput * m_sampleSource
Definition: localinputgui.h:63
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
QPalette m_paletteGreenText
virtual void setMessageQueueToGUI(MessageQueue *queue)
Definition: localinput.cpp:116
bool m_doApplySettings
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
QTime m_eventsTime
Definition: localinputgui.h:98
bool m_dataPortEdited
Definition: localinputgui.h:94
std::size_t m_tickCount
Definition: localinputgui.h:91
uint32_t m_countRecovered
Definition: localinputgui.h:97
QNetworkAccessManager * m_networkManager
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
void handleInputMessages()
DeviceUISet * m_deviceUISet
Definition: localinputgui.h:61
QTimer m_updateTimer
Definition: localinputgui.h:67
+ Here is the call graph for this function:

◆ ~LocalInputGui()

LocalInputGui::~LocalInputGui ( )
virtual

Definition at line 109 of file localinputgui.cpp.

References m_networkManager, and ui.

110 {
111  disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
112  delete m_networkManager;
113  delete ui;
114 }
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
QNetworkAccessManager * m_networkManager

Member Function Documentation

◆ blockApplySettings()

void LocalInputGui::blockApplySettings ( bool  block)
private

Definition at line 116 of file localinputgui.cpp.

References m_doApplySettings.

Referenced by displaySettings(), handleMessage(), and updateSampleRateAndFrequency().

117 {
118  m_doApplySettings = !block;
119 }
bool m_doApplySettings
+ Here is the caller graph for this function:

◆ deserialize()

bool LocalInputGui::deserialize ( const QByteArray &  data)
virtual

Implements PluginInstanceGUI.

Definition at line 149 of file localinputgui.cpp.

References LocalInputSettings::deserialize(), displaySettings(), m_forceSettings, m_settings, and sendSettings().

150 {
151  qDebug("LocalInputGui::deserialize");
152 
153  if (m_settings.deserialize(data))
154  {
155  displaySettings();
156  m_forceSettings = true;
157  sendSettings();
158 
159  return true;
160  }
161  else
162  {
163  return false;
164  }
165 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
void displaySettings()
bool deserialize(const QByteArray &data)
+ Here is the call graph for this function:

◆ destroy()

void LocalInputGui::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 121 of file localinputgui.cpp.

122 {
123  delete this;
124 }

◆ displaySettings()

void LocalInputGui::displaySettings ( )
private

Definition at line 259 of file localinputgui.cpp.

References arg(), blockApplySettings(), LocalInputSettings::m_dcBlock, LocalInputSettings::m_iqCorrection, m_settings, m_streamCenterFrequency, m_streamSampleRate, and ui.

Referenced by deserialize(), handleMessage(), LocalInputGui(), and resetToDefaults().

260 {
261  blockApplySettings(true);
262 
263  ui->centerFrequency->setValue(m_streamCenterFrequency / 1000);
264  ui->centerFrequencyHz->setValue(m_streamCenterFrequency % 1000);
265  ui->deviceRateText->setText(tr("%1k").arg(m_streamSampleRate / 1000.0));
266 
267  ui->dcOffset->setChecked(m_settings.m_dcBlock);
268  ui->iqImbalance->setChecked(m_settings.m_iqCorrection);
269 
270  blockApplySettings(false);
271 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
void blockApplySettings(bool block)
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayTime()

void LocalInputGui::displayTime ( )
private

◆ getCenterFrequency()

qint64 LocalInputGui::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 167 of file localinputgui.cpp.

References m_streamCenterFrequency.

168 {
170 }
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66

◆ getInputMessageQueue()

virtual MessageQueue* LocalInputGui::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 55 of file localinputgui.h.

55 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: localinputgui.h:70

◆ getName()

QString LocalInputGui::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 131 of file localinputgui.cpp.

132 {
133  return objectName();
134 }

◆ handleInputMessages

void LocalInputGui::handleInputMessages ( )
privateslot

Definition at line 212 of file localinputgui.cpp.

References DSPSignalNotification::getCenterFrequency(), DeviceSampleSource::getInputMessageQueue(), DSPSignalNotification::getSampleRate(), handleMessage(), m_inputMessageQueue, m_sampleSource, m_streamCenterFrequency, m_streamSampleRate, Message::match(), MessageQueue::pop(), MessageQueue::push(), and updateSampleRateAndFrequency().

Referenced by LocalInputGui().

213 {
214  Message* message;
215 
216  while ((message = m_inputMessageQueue.pop()) != 0)
217  {
218  //qDebug("LocalInputGui::handleInputMessages: message: %s", message->getIdentifier());
219 
220  if (DSPSignalNotification::match(*message))
221  {
222  DSPSignalNotification* notif = (DSPSignalNotification*) message;
223 
224  if (notif->getSampleRate() != m_streamSampleRate) {
226  }
227 
229 
230  qDebug("LocalInputGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
231 
233  DSPSignalNotification *fwd = new DSPSignalNotification(*notif);
235 
236  delete message;
237  }
238  else
239  {
240  if (handleMessage(*message))
241  {
242  delete message;
243  }
244  }
245  }
246 }
Message * pop()
Pop message from queue.
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
MessageQueue m_inputMessageQueue
Definition: localinputgui.h:70
qint64 getCenterFrequency() const
Definition: dspcommands.h:329
virtual bool handleMessage(const Message &message)
LocalInput * m_sampleSource
Definition: localinputgui.h:63
static bool match(const Message *message)
Definition: message.cpp:45
void updateSampleRateAndFrequency()
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
int getSampleRate() const
Definition: dspcommands.h:328
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool LocalInputGui::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 177 of file localinputgui.cpp.

References blockApplySettings(), displaySettings(), LocalInput::MsgReportSampleRateAndFrequency::getCenterFrequency(), LocalInput::MsgReportSampleRateAndFrequency::getSampleRate(), LocalInput::MsgConfigureLocalInput::getSettings(), LocalInput::MsgStartStop::getStartStop(), m_settings, m_streamCenterFrequency, m_streamSampleRate, Message::match(), ui, and updateSampleRateAndFrequency().

Referenced by handleInputMessages().

178 {
180  {
182  m_settings = cfg.getSettings();
183  blockApplySettings(true);
184  displaySettings();
185  blockApplySettings(false);
186  return true;
187  }
188  else if (LocalInput::MsgStartStop::match(message))
189  {
191  blockApplySettings(true);
192  ui->startStop->setChecked(notif.getStartStop());
193  blockApplySettings(false);
194 
195  return true;
196  }
198  {
203 
204  return true;
205  }
206  else
207  {
208  return false;
209  }
210 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
void displaySettings()
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
void blockApplySettings(bool block)
static bool match(const Message *message)
Definition: message.cpp:45
void updateSampleRateAndFrequency()
const LocalInputSettings & getSettings() const
Definition: localinput.h:46
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
bool getStartStop() const
Definition: localinput.h:88
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_dcOffset_toggled

void LocalInputGui::on_dcOffset_toggled ( bool  checked)
privateslot

Definition at line 279 of file localinputgui.cpp.

References LocalInputSettings::m_dcBlock, m_settings, and sendSettings().

280 {
281  m_settings.m_dcBlock = checked;
282  sendSettings();
283 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
+ Here is the call graph for this function:

◆ on_iqImbalance_toggled

void LocalInputGui::on_iqImbalance_toggled ( bool  checked)
privateslot

Definition at line 285 of file localinputgui.cpp.

References LocalInputSettings::m_iqCorrection, m_settings, and sendSettings().

286 {
287  m_settings.m_iqCorrection = checked;
288  sendSettings();
289 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
+ Here is the call graph for this function:

◆ on_record_toggled

void LocalInputGui::on_record_toggled ( bool  checked)
privateslot

Definition at line 300 of file localinputgui.cpp.

References LocalInput::MsgFileRecord::create(), DeviceSampleSource::getInputMessageQueue(), m_sampleSource, MessageQueue::push(), and ui.

301 {
302  if (checked) {
303  ui->record->setStyleSheet("QToolButton { background-color : red; }");
304  } else {
305  ui->record->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
306  }
307 
310 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
LocalInput * m_sampleSource
Definition: localinputgui.h:63
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
static MsgFileRecord * create(bool startStop)
Definition: localinput.h:71
+ Here is the call graph for this function:

◆ on_startStop_toggled

void LocalInputGui::on_startStop_toggled ( bool  checked)
privateslot

Definition at line 291 of file localinputgui.cpp.

References LocalInput::MsgStartStop::create(), DeviceSampleSource::getInputMessageQueue(), m_doApplySettings, m_sampleSource, and MessageQueue::push().

292 {
293  if (m_doApplySettings)
294  {
297  }
298 }
static MsgStartStop * create(bool startStop)
Definition: localinput.h:90
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
LocalInput * m_sampleSource
Definition: localinputgui.h:63
bool m_doApplySettings
+ Here is the call graph for this function:

◆ openDeviceSettingsDialog

void LocalInputGui::openDeviceSettingsDialog ( const QPoint &  p)
privateslot

Definition at line 354 of file localinputgui.cpp.

References BasicDeviceSettingsDialog::getReverseAPIAddress(), BasicDeviceSettingsDialog::getReverseAPIDeviceIndex(), BasicDeviceSettingsDialog::getReverseAPIPort(), LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::m_reverseAPIPort, m_settings, LocalInputSettings::m_useReverseAPI, sendSettings(), BasicDeviceSettingsDialog::setReverseAPIAddress(), BasicDeviceSettingsDialog::setReverseAPIDeviceIndex(), BasicDeviceSettingsDialog::setReverseAPIPort(), BasicDeviceSettingsDialog::setUseReverseAPI(), and BasicDeviceSettingsDialog::useReverseAPI().

Referenced by LocalInputGui().

355 {
356  BasicDeviceSettingsDialog dialog(this);
357  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
358  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
359  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
360  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
361 
362  dialog.move(p);
363  dialog.exec();
364 
365  m_settings.m_useReverseAPI = dialog.useReverseAPI();
366  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
367  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
368  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
369 
370  sendSettings();
371 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
uint16_t m_reverseAPIDeviceIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LocalInputGui::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 136 of file localinputgui.cpp.

References displaySettings(), m_forceSettings, m_settings, LocalInputSettings::resetToDefaults(), and sendSettings().

137 {
139  displaySettings();
140  m_forceSettings = true;
141  sendSettings();
142 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
void displaySettings()
+ Here is the call graph for this function:

◆ sendSettings()

void LocalInputGui::sendSettings ( )
private

Definition at line 273 of file localinputgui.cpp.

References m_updateTimer.

Referenced by deserialize(), LocalInputGui(), on_dcOffset_toggled(), on_iqImbalance_toggled(), openDeviceSettingsDialog(), and resetToDefaults().

274 {
275  if(!m_updateTimer.isActive())
276  m_updateTimer.start(100);
277 }
QTimer m_updateTimer
Definition: localinputgui.h:67
+ Here is the caller graph for this function:

◆ serialize()

QByteArray LocalInputGui::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 144 of file localinputgui.cpp.

References m_settings, and LocalInputSettings::serialize().

145 {
146  return m_settings.serialize();
147 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
QByteArray serialize() const
+ Here is the call graph for this function:

◆ setCenterFrequency()

void LocalInputGui::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 172 of file localinputgui.cpp.

173 {
174  (void) centerFrequency;
175 }

◆ setName()

void LocalInputGui::setName ( const QString &  name)
virtual

Implements PluginInstanceGUI.

Definition at line 126 of file localinputgui.cpp.

127 {
128  setObjectName(name);
129 }

◆ updateHardware

void LocalInputGui::updateHardware ( )
privateslot

Definition at line 312 of file localinputgui.cpp.

References LocalInput::MsgConfigureLocalInput::create(), DeviceSampleSource::getInputMessageQueue(), m_doApplySettings, m_forceSettings, m_sampleSource, m_settings, m_updateTimer, and MessageQueue::push().

Referenced by LocalInputGui().

313 {
314  if (m_doApplySettings)
315  {
316  qDebug() << "LocalInputGui::updateHardware";
320  m_forceSettings = false;
321  m_updateTimer.stop();
322  }
323 }
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
LocalInput * m_sampleSource
Definition: localinputgui.h:63
bool m_doApplySettings
static MsgConfigureLocalInput * create(const LocalInputSettings &settings, bool force=false)
Definition: localinput.h:49
QTimer m_updateTimer
Definition: localinputgui.h:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSampleRateAndFrequency()

void LocalInputGui::updateSampleRateAndFrequency ( )
private

Definition at line 248 of file localinputgui.cpp.

References arg(), blockApplySettings(), DeviceUISet::getSpectrum(), m_deviceUISet, m_streamCenterFrequency, m_streamSampleRate, GLSpectrum::setCenterFrequency(), GLSpectrum::setSampleRate(), and ui.

Referenced by handleInputMessages(), and handleMessage().

249 {
252  ui->deviceRateText->setText(tr("%1k").arg((float)m_streamSampleRate / 1000));
253  blockApplySettings(true);
254  ui->centerFrequency->setValue(m_streamCenterFrequency / 1000);
255  ui->centerFrequencyHz->setValue(m_streamCenterFrequency % 1000);
256  blockApplySettings(false);
257 }
void setSampleRate(qint32 sampleRate)
Definition: glspectrum.cpp:211
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
GLSpectrum * getSpectrum()
Direct spectrum getter.
Definition: deviceuiset.h:57
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
void blockApplySettings(bool block)
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
void setCenterFrequency(qint64 frequency)
Definition: glspectrum.cpp:175
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
DeviceUISet * m_deviceUISet
Definition: localinputgui.h:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStatus

void LocalInputGui::updateStatus ( )
privateslot

Definition at line 325 of file localinputgui.cpp.

References DeviceAPI::errorMessage(), DeviceUISet::m_deviceAPI, m_deviceUISet, m_lastEngineState, DeviceAPI::state(), DeviceAPI::StError, DeviceAPI::StIdle, DeviceAPI::StNotStarted, DeviceAPI::StRunning, and ui.

Referenced by LocalInputGui().

326 {
327  int state = m_deviceUISet->m_deviceAPI->state();
328 
329  if(m_lastEngineState != state)
330  {
331  switch(state)
332  {
334  ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
335  break;
336  case DeviceAPI::StIdle:
337  ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
338  break;
340  ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
341  break;
342  case DeviceAPI::StError:
343  ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
344  QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceAPI->errorMessage());
345  break;
346  default:
347  break;
348  }
349 
350  m_lastEngineState = state;
351  }
352 }
QString errorMessage()
Last error message from the device engine.
Definition: deviceapi.cpp:290
engine is before initialization
Definition: deviceapi.h:53
EngineState state() const
Return the state of the device engine corresponding to the stream type.
Definition: deviceapi.cpp:277
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
engine is idle
Definition: deviceapi.h:54
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
engine is running
Definition: deviceapi.h:56
engine is in error
Definition: deviceapi.h:57
DeviceUISet * m_deviceUISet
Definition: localinputgui.h:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_acquisition

bool LocalInputGui::m_acquisition
private

Definition at line 64 of file localinputgui.h.

◆ m_addressEdited

bool LocalInputGui::m_addressEdited
private

Definition at line 93 of file localinputgui.h.

◆ m_allBlocksReceived

bool LocalInputGui::m_allBlocksReceived
private

Definition at line 76 of file localinputgui.h.

◆ m_avgNbBlocks

float LocalInputGui::m_avgNbBlocks
private

Definition at line 82 of file localinputgui.h.

◆ m_avgNbOriginalBlocks

float LocalInputGui::m_avgNbOriginalBlocks
private

Definition at line 83 of file localinputgui.h.

◆ m_avgNbRecovery

float LocalInputGui::m_avgNbRecovery
private

Definition at line 84 of file localinputgui.h.

◆ m_bufferGauge

int32_t LocalInputGui::m_bufferGauge
private

Definition at line 78 of file localinputgui.h.

◆ m_bufferLengthInSecs

float LocalInputGui::m_bufferLengthInSecs
private

Definition at line 77 of file localinputgui.h.

◆ m_countRecovered

uint32_t LocalInputGui::m_countRecovered
private

Definition at line 97 of file localinputgui.h.

◆ m_countUnrecoverable

uint32_t LocalInputGui::m_countUnrecoverable
private

Definition at line 96 of file localinputgui.h.

◆ m_dataPortEdited

bool LocalInputGui::m_dataPortEdited
private

Definition at line 94 of file localinputgui.h.

◆ m_deviceUISet

DeviceUISet* LocalInputGui::m_deviceUISet
private

Definition at line 61 of file localinputgui.h.

Referenced by LocalInputGui(), updateSampleRateAndFrequency(), and updateStatus().

◆ m_doApplySettings

bool LocalInputGui::m_doApplySettings
private

Definition at line 100 of file localinputgui.h.

Referenced by blockApplySettings(), on_startStop_toggled(), and updateHardware().

◆ m_eventsTime

QTime LocalInputGui::m_eventsTime
private

Definition at line 98 of file localinputgui.h.

Referenced by LocalInputGui().

◆ m_forceSettings

bool LocalInputGui::m_forceSettings
private

Definition at line 101 of file localinputgui.h.

Referenced by deserialize(), LocalInputGui(), resetToDefaults(), and updateHardware().

◆ m_framesDecodingStatus

int LocalInputGui::m_framesDecodingStatus
private

Definition at line 75 of file localinputgui.h.

◆ m_inputMessageQueue

MessageQueue LocalInputGui::m_inputMessageQueue
private

Definition at line 70 of file localinputgui.h.

Referenced by handleInputMessages(), and LocalInputGui().

◆ m_lastEngineState

int LocalInputGui::m_lastEngineState
private

Definition at line 69 of file localinputgui.h.

Referenced by updateStatus().

◆ m_maxNbRecovery

int LocalInputGui::m_maxNbRecovery
private

Definition at line 81 of file localinputgui.h.

◆ m_minNbBlocks

int LocalInputGui::m_minNbBlocks
private

Definition at line 79 of file localinputgui.h.

◆ m_minNbOriginalBlocks

int LocalInputGui::m_minNbOriginalBlocks
private

Definition at line 80 of file localinputgui.h.

◆ m_nbFECBlocks

int LocalInputGui::m_nbFECBlocks
private

Definition at line 86 of file localinputgui.h.

◆ m_nbOriginalBlocks

int LocalInputGui::m_nbOriginalBlocks
private

Definition at line 85 of file localinputgui.h.

◆ m_networkManager

QNetworkAccessManager* LocalInputGui::m_networkManager
private

Definition at line 107 of file localinputgui.h.

Referenced by LocalInputGui(), and ~LocalInputGui().

◆ m_networkRequest

QNetworkRequest LocalInputGui::m_networkRequest
private

Definition at line 108 of file localinputgui.h.

◆ m_paletteGreenText

QPalette LocalInputGui::m_paletteGreenText
private

Definition at line 104 of file localinputgui.h.

Referenced by LocalInputGui().

◆ m_paletteWhiteText

QPalette LocalInputGui::m_paletteWhiteText
private

Definition at line 105 of file localinputgui.h.

Referenced by LocalInputGui().

◆ m_sampleBits

int LocalInputGui::m_sampleBits
private

Definition at line 87 of file localinputgui.h.

◆ m_sampleBytes

int LocalInputGui::m_sampleBytes
private

Definition at line 88 of file localinputgui.h.

◆ m_samplesCount

int LocalInputGui::m_samplesCount
private

Definition at line 90 of file localinputgui.h.

◆ m_sampleSource

LocalInput* LocalInputGui::m_sampleSource
private

◆ m_settings

LocalInputSettings LocalInputGui::m_settings
private

◆ m_startingTimeStampms

uint64_t LocalInputGui::m_startingTimeStampms
private

Definition at line 74 of file localinputgui.h.

Referenced by LocalInputGui().

◆ m_statusTimer

QTimer LocalInputGui::m_statusTimer
private

Definition at line 68 of file localinputgui.h.

Referenced by LocalInputGui().

◆ m_streamCenterFrequency

quint64 LocalInputGui::m_streamCenterFrequency
private

Center frequency of received stream.

Definition at line 66 of file localinputgui.h.

Referenced by displaySettings(), getCenterFrequency(), handleInputMessages(), handleMessage(), and updateSampleRateAndFrequency().

◆ m_streamSampleRate

int LocalInputGui::m_streamSampleRate
private

Sample rate of received stream.

Definition at line 65 of file localinputgui.h.

Referenced by displaySettings(), handleInputMessages(), handleMessage(), and updateSampleRateAndFrequency().

◆ m_tickCount

std::size_t LocalInputGui::m_tickCount
private

Definition at line 91 of file localinputgui.h.

◆ m_txDelay

double LocalInputGui::m_txDelay
private

Definition at line 102 of file localinputgui.h.

◆ m_updateTimer

QTimer LocalInputGui::m_updateTimer
private

Definition at line 67 of file localinputgui.h.

Referenced by LocalInputGui(), sendSettings(), and updateHardware().

◆ ui

Ui::LocalInputGui* LocalInputGui::ui
private

The documentation for this class was generated from the following files: