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

#include <remotesourcegui.h>

+ Inheritance diagram for RemoteSourceGUI:
+ Collaboration diagram for RemoteSourceGUI:

Public Slots

void channelMarkerChangedByCursor ()
 

Public Member Functions

virtual void destroy ()
 
void setName (const QString &name)
 
QString getName () const
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 centerFrequency)
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &message)
 
- Public Member Functions inherited from RollupWidget
 RollupWidget (QWidget *parent=NULL)
 
void setTitleColor (const QColor &c)
 
void setHighlighted (bool highlighted)
 
- Public Member Functions inherited from PluginInstanceGUI
 PluginInstanceGUI ()
 
virtual ~PluginInstanceGUI ()
 

Static Public Member Functions

static RemoteSourceGUIcreate (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
 

Private Slots

void handleSourceMessages ()
 
void on_dataAddress_returnPressed ()
 
void on_dataPort_returnPressed ()
 
void on_dataApplyButton_clicked (bool checked)
 
void onWidgetRolled (QWidget *widget, bool rollDown)
 
void onMenuDialogCalled (const QPoint &p)
 
void on_eventCountsReset_clicked (bool checked)
 
void tick ()
 

Private Member Functions

 RemoteSourceGUI (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
 
virtual ~RemoteSourceGUI ()
 
void blockApplySettings (bool block)
 
void applySettings (bool force=false)
 
void displaySettings ()
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 
void displayEventCounts ()
 
void displayEventStatus (int recoverableCount, int unrecoverableCount)
 
void displayEventTimer ()
 

Private Attributes

Ui::RemoteSourceGUI * ui
 
PluginAPIm_pluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_channelMarker
 
RemoteSourceSettings m_settings
 
bool m_doApplySettings
 
RemoteSourcem_remoteSrc
 
MessageQueue m_inputMessageQueue
 
uint32_t m_countUnrecoverable
 
uint32_t m_countRecovered
 
uint32_t m_lastCountUnrecoverable
 
uint32_t m_lastCountRecovered
 
uint32_t m_lastSampleCount
 
uint64_t m_lastTimestampUs
 
bool m_resetCounts
 
QTime m_time
 
uint32_t m_tickCount
 

Additional Inherited Members

- Signals inherited from RollupWidget
void widgetRolled (QWidget *widget, bool rollDown)
 
- Protected Types inherited from RollupWidget
enum  { VersionMarker = 0xff }
 
enum  ContextMenuType { ContextMenuNone, ContextMenuChannelSettings, ContextMenuStreamSettings }
 
- Protected Member Functions inherited from RollupWidget
int arrangeRollups ()
 
QByteArray saveState (int version=0) const
 
bool restoreState (const QByteArray &state, int version=0)
 
void paintEvent (QPaintEvent *)
 
int paintRollup (QWidget *rollup, int pos, QPainter *p, bool last, const QColor &frame)
 
void resizeEvent (QResizeEvent *size)
 
void mousePressEvent (QMouseEvent *event)
 
bool event (QEvent *event)
 
bool eventFilter (QObject *object, QEvent *event)
 
void resetContextMenuType ()
 
void setStreamIndicator (const QString &indicator)
 
- Protected Attributes inherited from RollupWidget
QColor m_titleColor
 
QColor m_titleTextColor
 
bool m_highlighted
 
ContextMenuType m_contextMenuType
 
QString m_streamIndicator
 

Detailed Description

Definition at line 39 of file remotesourcegui.h.

Constructor & Destructor Documentation

◆ RemoteSourceGUI()

RemoteSourceGUI::RemoteSourceGUI ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource channelTx,
QWidget *  parent = 0 
)
explicitprivate

Definition at line 158 of file remotesourcegui.cpp.

References DeviceUISet::addChannelMarker(), DeviceUISet::addRollupWidget(), applySettings(), channelMarkerChangedByCursor(), displaySettings(), getInputMessageQueue(), DeviceAPI::getMasterTimer(), handleSourceMessages(), RemoteSource::m_channelIdURI, m_channelMarker, DeviceUISet::m_deviceAPI, m_deviceUISet, m_remoteSrc, RemoteSourceSettings::m_rgbColor, m_settings, m_time, onMenuDialogCalled(), onWidgetRolled(), DeviceUISet::registerTxChannelInstance(), ChannelMarker::setCenterFrequency(), RemoteSourceSettings::setChannelMarker(), ChannelMarker::setColor(), BasebandSampleSource::setMessageQueueToGUI(), ChannelMarker::setSourceOrSinkStream(), ChannelMarker::setTitle(), ChannelMarker::setVisible(), tick(), ui, and RollupWidget::widgetRolled().

Referenced by create().

158  :
159  RollupWidget(parent),
160  ui(new Ui::RemoteSourceGUI),
161  m_pluginAPI(pluginAPI),
162  m_deviceUISet(deviceUISet),
164  m_countRecovered(0),
169  m_resetCounts(true),
170  m_tickCount(0)
171 {
172  (void) channelTx;
173  ui->setupUi(this);
174  setAttribute(Qt::WA_DeleteOnClose, true);
175  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
176  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
177 
178  m_remoteSrc = (RemoteSource*) channelTx;
180 
181  connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
182 
183  m_channelMarker.blockSignals(true);
186  m_channelMarker.setTitle("Remote source");
188  m_channelMarker.blockSignals(false);
189  m_channelMarker.setVisible(true); // activate signal on the last setting only
190 
192 
196 
197  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
198  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
199 
200  m_time.start();
201 
202  displaySettings();
203  applySettings(true);
204 }
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:88
RemoteSource * m_remoteSrc
uint32_t m_countRecovered
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
Definition: deviceapi.h:173
uint32_t m_tickCount
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
uint32_t m_lastCountRecovered
ChannelMarker m_channelMarker
DeviceUISet * m_deviceUISet
void onWidgetRolled(QWidget *widget, bool rollDown)
void channelMarkerChangedByCursor()
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
void onMenuDialogCalled(const QPoint &p)
void setSourceOrSinkStream(bool sourceOrSinkStream)
Definition: channelmarker.h:75
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
virtual void setMessageQueueToGUI(MessageQueue *queue)
uint32_t m_countUnrecoverable
void applySettings(bool force=false)
uint32_t m_lastSampleCount
void setChannelMarker(Serializable *channelMarker)
RemoteSourceSettings m_settings
void setColor(const QColor &color)
uint32_t m_lastCountUnrecoverable
void setVisible(bool visible)
void setTitle(const QString &title)
static const QString m_channelIdURI
Definition: remotesource.h:228
PluginAPI * m_pluginAPI
void setCenterFrequency(int centerFrequency)
virtual MessageQueue * getInputMessageQueue()
void widgetRolled(QWidget *widget, bool rollDown)
Ui::RemoteSourceGUI * ui
uint64_t m_lastTimestampUs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~RemoteSourceGUI()

RemoteSourceGUI::~RemoteSourceGUI ( )
privatevirtual

Definition at line 206 of file remotesourcegui.cpp.

References m_deviceUISet, m_remoteSrc, DeviceUISet::removeTxChannelInstance(), and ui.

207 {
209  delete m_remoteSrc;
210  delete ui;
211 }
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
RemoteSource * m_remoteSrc
DeviceUISet * m_deviceUISet
Ui::RemoteSourceGUI * ui
+ Here is the call graph for this function:

Member Function Documentation

◆ applySettings()

void RemoteSourceGUI::applySettings ( bool  force = false)
private

Definition at line 218 of file remotesourcegui.cpp.

References RemoteSource::MsgConfigureRemoteSource::create(), ChannelMarker::getColor(), BasebandSampleSource::getInputMessageQueue(), m_channelMarker, m_doApplySettings, m_remoteSrc, m_settings, MessageQueue::push(), and RollupWidget::setTitleColor().

Referenced by deserialize(), on_dataAddress_returnPressed(), on_dataApplyButton_clicked(), on_dataPort_returnPressed(), onMenuDialogCalled(), RemoteSourceGUI(), and resetToDefaults().

219 {
220  if (m_doApplySettings)
221  {
223 
226  }
227 }
RemoteSource * m_remoteSrc
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
ChannelMarker m_channelMarker
void setTitleColor(const QColor &c)
static MsgConfigureRemoteSource * create(const RemoteSourceSettings &settings, bool force)
Definition: remotesource.h:55
RemoteSourceSettings m_settings
const QColor & getColor() const
Definition: channelmarker.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void RemoteSourceGUI::blockApplySettings ( bool  block)
private

Definition at line 213 of file remotesourcegui.cpp.

References m_doApplySettings.

Referenced by displaySettings(), and handleMessage().

214 {
215  m_doApplySettings = !block;
216 }
+ Here is the caller graph for this function:

◆ channelMarkerChangedByCursor

void RemoteSourceGUI::channelMarkerChangedByCursor ( )
slot

Definition at line 403 of file remotesourcegui.cpp.

Referenced by RemoteSourceGUI().

404 {
405 }
+ Here is the caller graph for this function:

◆ create()

RemoteSourceGUI * RemoteSourceGUI::create ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource channelTx 
)
static

Definition at line 28 of file remotesourcegui.cpp.

References RemoteSourceGUI().

Referenced by RemoteSourcePlugin::createTxChannelGUI().

29 {
30  RemoteSourceGUI* gui = new RemoteSourceGUI(pluginAPI, deviceUISet, channelTx);
31  return gui;
32 }
RemoteSourceGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

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

Implements PluginInstanceGUI.

Definition at line 70 of file remotesourcegui.cpp.

References applySettings(), RemoteSourceSettings::deserialize(), displaySettings(), m_settings, and resetToDefaults().

71 {
72  if(m_settings.deserialize(data)) {
74  applySettings(true);
75  return true;
76  } else {
78  return false;
79  }
80 }
bool deserialize(const QByteArray &data)
void applySettings(bool force=false)
RemoteSourceSettings m_settings
+ Here is the call graph for this function:

◆ destroy()

void RemoteSourceGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 34 of file remotesourcegui.cpp.

35 {
36  delete this;
37 }

◆ displayEventCounts()

void RemoteSourceGUI::displayEventCounts ( )
private

Definition at line 356 of file remotesourcegui.cpp.

References m_countRecovered, m_countUnrecoverable, and ui.

Referenced by handleMessage(), and on_eventCountsReset_clicked().

357 {
358  QString nstr = QString("%1").arg(m_countUnrecoverable, 3, 10, QChar('0'));
359  ui->eventUnrecText->setText(nstr);
360  nstr = QString("%1").arg(m_countRecovered, 3, 10, QChar('0'));
361  ui->eventRecText->setText(nstr);
362 }
uint32_t m_countRecovered
uint32_t m_countUnrecoverable
Ui::RemoteSourceGUI * ui
+ Here is the caller graph for this function:

◆ displayEventStatus()

void RemoteSourceGUI::displayEventStatus ( int  recoverableCount,
int  unrecoverableCount 
)
private

Definition at line 364 of file remotesourcegui.cpp.

References ui.

Referenced by handleMessage().

365 {
366 
367  if (unrecoverableCount == 0)
368  {
369  if (recoverableCount == 0) {
370  ui->allFramesDecoded->setStyleSheet("QToolButton { background-color : green; }");
371  } else {
372  ui->allFramesDecoded->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
373  }
374  }
375  else
376  {
377  ui->allFramesDecoded->setStyleSheet("QToolButton { background-color : red; }");
378  }
379 }
Ui::RemoteSourceGUI * ui
+ Here is the caller graph for this function:

◆ displayEventTimer()

void RemoteSourceGUI::displayEventTimer ( )
private

Definition at line 381 of file remotesourcegui.cpp.

References m_time, and ui.

Referenced by on_eventCountsReset_clicked(), and tick().

382 {
383  int elapsedTimeMillis = m_time.elapsed();
384  QTime recordLength(0, 0, 0, 0);
385  recordLength = recordLength.addSecs(elapsedTimeMillis/1000);
386  QString s_time = recordLength.toString("HH:mm:ss");
387  ui->eventCountsTimeText->setText(s_time);
388 }
Ui::RemoteSourceGUI * ui
+ Here is the caller graph for this function:

◆ displaySettings()

void RemoteSourceGUI::displaySettings ( )
private

Definition at line 229 of file remotesourcegui.cpp.

References arg(), blockApplySettings(), ChannelMarker::getTitle(), m_channelMarker, RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, RemoteSourceSettings::m_rgbColor, m_settings, RemoteSourceSettings::m_title, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), and ui.

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

230 {
231  m_channelMarker.blockSignals(true);
234  m_channelMarker.setBandwidth(5000); // TODO
235  m_channelMarker.blockSignals(false);
236  m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
237 
239  setWindowTitle(m_channelMarker.getTitle());
240 
241  blockApplySettings(true);
242  ui->dataAddress->setText(m_settings.m_dataAddress);
243  ui->dataPort->setText(tr("%1").arg(m_settings.m_dataPort));
244  blockApplySettings(false);
245 }
ChannelMarker m_channelMarker
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void blockApplySettings(bool block)
void setTitleColor(const QColor &c)
uint16_t m_dataPort
Listening data port.
const QString & getTitle() const
Definition: channelmarker.h:38
QString m_dataAddress
Listening (local) data address.
RemoteSourceSettings m_settings
void setColor(const QColor &color)
void setBandwidth(int bandwidth)
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
Ui::RemoteSourceGUI * ui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void RemoteSourceGUI::enterEvent ( QEvent *  )
private

Definition at line 252 of file remotesourcegui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

253 {
255 }
ChannelMarker m_channelMarker
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ getCenterFrequency()

qint64 RemoteSourceGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 49 of file remotesourcegui.cpp.

49  {
50  return 0;
51 }

◆ getInputMessageQueue()

virtual MessageQueue* RemoteSourceGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 54 of file remotesourcegui.h.

Referenced by handleSourceMessages(), and RemoteSourceGUI().

54 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
+ Here is the caller graph for this function:

◆ getName()

QString RemoteSourceGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 44 of file remotesourcegui.cpp.

45 {
46  return objectName();
47 }

◆ handleMessage()

bool RemoteSourceGUI::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 82 of file remotesourcegui.cpp.

References arg(), blockApplySettings(), displayEventCounts(), displayEventStatus(), displaySettings(), RemoteSource::MsgReportStreamData::get_nbCorrectableErrors(), RemoteSource::MsgReportStreamData::get_nbFECBlocks(), RemoteSource::MsgReportStreamData::get_nbOriginalBlocks(), RemoteSource::MsgReportStreamData::get_nbUncorrectableErrors(), RemoteSource::MsgReportStreamData::get_queueLength(), RemoteSource::MsgReportStreamData::get_queueSize(), RemoteSource::MsgReportStreamData::get_readSamplesCount(), RemoteSource::MsgReportStreamData::get_sampleRate(), RemoteSource::MsgReportStreamData::get_tv_sec(), RemoteSource::MsgReportStreamData::get_tv_usec(), RemoteSource::MsgSampleRateNotification::getSampleRate(), RemoteSource::MsgConfigureRemoteSource::getSettings(), m_channelMarker, m_countRecovered, m_countUnrecoverable, m_lastCountRecovered, m_lastCountUnrecoverable, m_lastSampleCount, m_lastTimestampUs, m_resetCounts, m_settings, Message::match(), ChannelMarker::setBandwidth(), and ui.

Referenced by handleSourceMessages().

83 {
85  {
88  return true;
89  }
91  {
93  m_settings = cfg.getSettings();
94  blockApplySettings(true);
96  blockApplySettings(false);
97  return true;
98  }
100  {
102  ui->sampleRate->setText(QString("%1").arg(report.get_sampleRate()));
103  QString nominalNbBlocksText = QString("%1/%2")
104  .arg(report.get_nbOriginalBlocks() + report.get_nbFECBlocks())
105  .arg(report.get_nbFECBlocks());
106  ui->nominalNbBlocksText->setText(nominalNbBlocksText);
107  QString queueLengthText = QString("%1/%2").arg(report.get_queueLength()).arg(report.get_queueSize());
108  ui->queueLengthText->setText(queueLengthText);
109  int queueLengthPercent = (report.get_queueLength()*100)/report.get_queueSize();
110  ui->queueLengthGauge->setValue(queueLengthPercent);
111  int unrecoverableCount = report.get_nbUncorrectableErrors();
112  int recoverableCount = report.get_nbCorrectableErrors();
113  uint64_t timestampUs = report.get_tv_sec()*1000000ULL + report.get_tv_usec();
114 
115  if (!m_resetCounts)
116  {
117  int recoverableCountDelta = recoverableCount - m_lastCountRecovered;
118  int unrecoverableCountDelta = unrecoverableCount - m_lastCountUnrecoverable;
119  displayEventStatus(recoverableCountDelta, unrecoverableCountDelta);
120  m_countRecovered += recoverableCountDelta;
121  m_countUnrecoverable += unrecoverableCountDelta;
123  }
124 
125  uint32_t sampleCountDelta, sampleCount;
126  sampleCount = report.get_readSamplesCount();
127 
128  if (sampleCount < m_lastSampleCount) {
129  sampleCountDelta = (0xFFFFFFFFU - sampleCount) + m_lastSampleCount + 1;
130  } else {
131  sampleCountDelta = sampleCount - m_lastSampleCount;
132  }
133 
134  if (sampleCountDelta == 0) {
135  ui->allFramesDecoded->setStyleSheet("QToolButton { background-color : blue; }");
136  }
137 
138  double remoteStreamRate = sampleCountDelta*1e6 / (double) (timestampUs - m_lastTimestampUs);
139 
140  if (remoteStreamRate != 0) {
141  ui->streamRateText->setText(QString("%1").arg(remoteStreamRate, 0, 'f', 0));
142  }
143 
144  m_resetCounts = false;
145  m_lastCountRecovered = recoverableCount;
146  m_lastCountUnrecoverable = unrecoverableCount;
147  m_lastSampleCount = sampleCount;
148  m_lastTimestampUs = timestampUs;
149 
150  return true;
151  }
152  else
153  {
154  return false;
155  }
156 }
uint32_t get_nbOriginalBlocks() const
Definition: remotesource.h:112
uint32_t m_countRecovered
void displayEventStatus(int recoverableCount, int unrecoverableCount)
const RemoteSourceSettings & getSettings() const
Definition: remotesource.h:52
uint32_t m_lastCountRecovered
uint32_t get_readSamplesCount() const
Definition: remotesource.h:109
ChannelMarker m_channelMarker
unsigned int uint32_t
Definition: rtptypes_win.h:46
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void blockApplySettings(bool block)
static bool match(const Message *message)
Definition: message.cpp:45
uint32_t m_countUnrecoverable
uint32_t m_lastSampleCount
RemoteSourceSettings m_settings
uint32_t m_lastCountUnrecoverable
uint32_t get_nbCorrectableErrors() const
Definition: remotesource.h:110
uint32_t get_nbUncorrectableErrors() const
Definition: remotesource.h:111
void setBandwidth(int bandwidth)
Ui::RemoteSourceGUI * ui
uint64_t m_lastTimestampUs
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleSourceMessages

void RemoteSourceGUI::handleSourceMessages ( )
privateslot

Definition at line 257 of file remotesourcegui.cpp.

References getInputMessageQueue(), and handleMessage().

Referenced by RemoteSourceGUI().

258 {
259  Message* message;
260 
261  while ((message = getInputMessageQueue()->pop()) != 0)
262  {
263  if (handleMessage(*message))
264  {
265  delete message;
266  }
267  }
268 }
virtual bool handleMessage(const Message &message)
virtual MessageQueue * getInputMessageQueue()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void RemoteSourceGUI::leaveEvent ( QEvent *  )
private

Definition at line 247 of file remotesourcegui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

248 {
250 }
ChannelMarker m_channelMarker
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ on_dataAddress_returnPressed

void RemoteSourceGUI::on_dataAddress_returnPressed ( )
privateslot

Definition at line 307 of file remotesourcegui.cpp.

References applySettings(), RemoteSourceSettings::m_dataAddress, m_settings, and ui.

308 {
309  m_settings.m_dataAddress = ui->dataAddress->text();
310  applySettings();
311 }
QString m_dataAddress
Listening (local) data address.
void applySettings(bool force=false)
RemoteSourceSettings m_settings
Ui::RemoteSourceGUI * ui
+ Here is the call graph for this function:

◆ on_dataApplyButton_clicked

void RemoteSourceGUI::on_dataApplyButton_clicked ( bool  checked)
privateslot

Definition at line 330 of file remotesourcegui.cpp.

References applySettings(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, m_settings, and ui.

331 {
332  (void) checked;
333  m_settings.m_dataAddress = ui->dataAddress->text();
334 
335  bool dataOk;
336  int udpDataPort = ui->dataPort->text().toInt(&dataOk);
337 
338  if((dataOk) && (udpDataPort >= 1024) && (udpDataPort < 65535))
339  {
340  m_settings.m_dataPort = udpDataPort;
341  }
342 
343  applySettings();
344 }
uint16_t m_dataPort
Listening data port.
QString m_dataAddress
Listening (local) data address.
void applySettings(bool force=false)
RemoteSourceSettings m_settings
Ui::RemoteSourceGUI * ui
+ Here is the call graph for this function:

◆ on_dataPort_returnPressed

void RemoteSourceGUI::on_dataPort_returnPressed ( )
privateslot

Definition at line 313 of file remotesourcegui.cpp.

References applySettings(), RemoteSourceSettings::m_dataPort, m_settings, and ui.

314 {
315  bool dataOk;
316  int dataPort = ui->dataPort->text().toInt(&dataOk);
317 
318  if((!dataOk) || (dataPort < 1024) || (dataPort > 65535))
319  {
320  return;
321  }
322  else
323  {
324  m_settings.m_dataPort = dataPort;
325  }
326 
327  applySettings();
328 }
uint16_t m_dataPort
Listening data port.
void applySettings(bool force=false)
RemoteSourceSettings m_settings
Ui::RemoteSourceGUI * ui
+ Here is the call graph for this function:

◆ on_eventCountsReset_clicked

void RemoteSourceGUI::on_eventCountsReset_clicked ( bool  checked)
privateslot

Definition at line 346 of file remotesourcegui.cpp.

References displayEventCounts(), displayEventTimer(), m_countRecovered, m_countUnrecoverable, and m_time.

347 {
348  (void) checked;
350  m_countRecovered = 0;
351  m_time.start();
354 }
uint32_t m_countRecovered
uint32_t m_countUnrecoverable
+ Here is the call graph for this function:

◆ onMenuDialogCalled

void RemoteSourceGUI::onMenuDialogCalled ( const QPoint &  p)
privateslot

Definition at line 276 of file remotesourcegui.cpp.

References applySettings(), RollupWidget::ContextMenuChannelSettings, ChannelMarker::getColor(), BasicChannelSettingsDialog::getReverseAPIAddress(), BasicChannelSettingsDialog::getReverseAPIChannelIndex(), BasicChannelSettingsDialog::getReverseAPIDeviceIndex(), BasicChannelSettingsDialog::getReverseAPIPort(), ChannelMarker::getTitle(), m_channelMarker, RollupWidget::m_contextMenuType, RemoteSourceSettings::m_reverseAPIAddress, RemoteSourceSettings::m_reverseAPIChannelIndex, RemoteSourceSettings::m_reverseAPIDeviceIndex, RemoteSourceSettings::m_reverseAPIPort, RemoteSourceSettings::m_rgbColor, m_settings, RemoteSourceSettings::m_title, RemoteSourceSettings::m_useReverseAPI, RollupWidget::resetContextMenuType(), BasicChannelSettingsDialog::setReverseAPIAddress(), BasicChannelSettingsDialog::setReverseAPIChannelIndex(), BasicChannelSettingsDialog::setReverseAPIDeviceIndex(), BasicChannelSettingsDialog::setReverseAPIPort(), RollupWidget::setTitleColor(), BasicChannelSettingsDialog::setUseReverseAPI(), and BasicChannelSettingsDialog::useReverseAPI().

Referenced by RemoteSourceGUI().

277 {
279  {
281  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
282  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
283  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
284  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
285  dialog.setReverseAPIChannelIndex(m_settings.m_reverseAPIChannelIndex);
286 
287  dialog.move(p);
288  dialog.exec();
289 
292  m_settings.m_useReverseAPI = dialog.useReverseAPI();
293  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
294  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
295  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
296  m_settings.m_reverseAPIChannelIndex = dialog.getReverseAPIChannelIndex();
297 
298  setWindowTitle(m_settings.m_title);
300 
301  applySettings();
302  }
303 
305 }
void resetContextMenuType()
Definition: rollupwidget.h:50
ChannelMarker m_channelMarker
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
void applySettings(bool force=false)
RemoteSourceSettings m_settings
const QColor & getColor() const
Definition: channelmarker.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onWidgetRolled

void RemoteSourceGUI::onWidgetRolled ( QWidget *  widget,
bool  rollDown 
)
privateslot

Definition at line 270 of file remotesourcegui.cpp.

Referenced by RemoteSourceGUI().

271 {
272  (void) widget;
273  (void) rollDown;
274 }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void RemoteSourceGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 58 of file remotesourcegui.cpp.

References applySettings(), displaySettings(), m_settings, and RemoteSourceSettings::resetToDefaults().

Referenced by deserialize().

59 {
62  applySettings(true);
63 }
void applySettings(bool force=false)
RemoteSourceSettings m_settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

QByteArray RemoteSourceGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 65 of file remotesourcegui.cpp.

References m_settings, and RemoteSourceSettings::serialize().

66 {
67  return m_settings.serialize();
68 }
QByteArray serialize() const
RemoteSourceSettings m_settings
+ Here is the call graph for this function:

◆ setCenterFrequency()

void RemoteSourceGUI::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 53 of file remotesourcegui.cpp.

54 {
55  (void) centerFrequency;
56 }

◆ setName()

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

Implements PluginInstanceGUI.

Definition at line 39 of file remotesourcegui.cpp.

40 {
41  setObjectName(name);
42 }

◆ tick

void RemoteSourceGUI::tick ( )
privateslot

Definition at line 390 of file remotesourcegui.cpp.

References RemoteSource::MsgQueryStreamData::create(), displayEventTimer(), BasebandSampleSource::getInputMessageQueue(), m_remoteSrc, m_tickCount, and MessageQueue::push().

Referenced by RemoteSourceGUI().

391 {
392  if (++m_tickCount == 20) // once per second
393  {
396 
398 
399  m_tickCount = 0;
400  }
401 }
RemoteSource * m_remoteSrc
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
uint32_t m_tickCount
static MsgQueryStreamData * create()
Definition: remotesource.h:94
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelMarker

ChannelMarker RemoteSourceGUI::m_channelMarker
private

◆ m_countRecovered

uint32_t RemoteSourceGUI::m_countRecovered
private

◆ m_countUnrecoverable

uint32_t RemoteSourceGUI::m_countUnrecoverable
private

◆ m_deviceUISet

DeviceUISet* RemoteSourceGUI::m_deviceUISet
private

Definition at line 63 of file remotesourcegui.h.

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

◆ m_doApplySettings

bool RemoteSourceGUI::m_doApplySettings
private

Definition at line 66 of file remotesourcegui.h.

Referenced by applySettings(), and blockApplySettings().

◆ m_inputMessageQueue

MessageQueue RemoteSourceGUI::m_inputMessageQueue
private

Definition at line 69 of file remotesourcegui.h.

◆ m_lastCountRecovered

uint32_t RemoteSourceGUI::m_lastCountRecovered
private

Definition at line 74 of file remotesourcegui.h.

Referenced by handleMessage().

◆ m_lastCountUnrecoverable

uint32_t RemoteSourceGUI::m_lastCountUnrecoverable
private

Definition at line 73 of file remotesourcegui.h.

Referenced by handleMessage().

◆ m_lastSampleCount

uint32_t RemoteSourceGUI::m_lastSampleCount
private

Definition at line 75 of file remotesourcegui.h.

Referenced by handleMessage().

◆ m_lastTimestampUs

uint64_t RemoteSourceGUI::m_lastTimestampUs
private

Definition at line 76 of file remotesourcegui.h.

Referenced by handleMessage().

◆ m_pluginAPI

PluginAPI* RemoteSourceGUI::m_pluginAPI
private

Definition at line 62 of file remotesourcegui.h.

◆ m_remoteSrc

RemoteSource* RemoteSourceGUI::m_remoteSrc
private

Definition at line 68 of file remotesourcegui.h.

Referenced by applySettings(), RemoteSourceGUI(), tick(), and ~RemoteSourceGUI().

◆ m_resetCounts

bool RemoteSourceGUI::m_resetCounts
private

Definition at line 77 of file remotesourcegui.h.

Referenced by handleMessage().

◆ m_settings

RemoteSourceSettings RemoteSourceGUI::m_settings
private

◆ m_tickCount

uint32_t RemoteSourceGUI::m_tickCount
private

Definition at line 79 of file remotesourcegui.h.

Referenced by tick().

◆ m_time

QTime RemoteSourceGUI::m_time
private

◆ ui

Ui::RemoteSourceGUI* RemoteSourceGUI::ui
private

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