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
FileSinkGui Class Reference

#include <filesinkgui.h>

+ Inheritance diagram for FileSinkGui:
+ Collaboration diagram for FileSinkGui:

Public Member Functions

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

Private Slots

void handleInputMessages ()
 
void on_centerFrequency_changed (quint64 value)
 
void on_sampleRate_changed (quint64 value)
 
void on_startStop_toggled (bool checked)
 
void on_showFileDialog_clicked (bool checked)
 
void on_interp_currentIndexChanged (int index)
 
void updateHardware ()
 
void updateStatus ()
 
void tick ()
 

Private Member Functions

void blockApplySettings (bool block)
 
void displaySettings ()
 
void displayTime ()
 
void sendSettings ()
 
void configureFileName ()
 
void updateWithGeneration ()
 
void updateWithStreamTime ()
 
void updateSampleRateAndFrequency ()
 

Private Attributes

Ui::FileSinkGui * ui
 
DeviceUISetm_deviceUISet
 
bool m_doApplySettings
 
bool m_forceSettings
 
FileSinkSettings m_settings
 
QString m_fileName
 
QTimer m_updateTimer
 
QTimer m_statusTimer
 
DeviceSampleSinkm_deviceSampleSink
 
int m_sampleRate
 
quint64 m_deviceCenterFrequency
 Center frequency in device. More...
 
bool m_generation
 
std::time_t m_startingTimeStamp
 
int m_samplesCount
 
std::size_t m_tickCount
 
int m_lastEngineState
 
MessageQueue m_inputMessageQueue
 

Detailed Description

Definition at line 38 of file filesinkgui.h.

Constructor & Destructor Documentation

◆ FileSinkGui()

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

Definition at line 39 of file filesinkgui.cpp.

References displaySettings(), DeviceAPI::getMasterTimer(), DeviceAPI::getSampleSink(), ColorMapper::GrayGold, ColorMapper::GrayGreenYellow, handleInputMessages(), DeviceUISet::m_deviceAPI, m_deviceSampleSink, m_deviceUISet, m_fileName, m_inputMessageQueue, m_statusTimer, m_updateTimer, tick(), ui, updateHardware(), and updateStatus().

39  :
40  QWidget(parent),
41  ui(new Ui::FileSinkGui),
42  m_deviceUISet(deviceUISet),
43  m_doApplySettings(true),
44  m_forceSettings(true),
45  m_settings(),
46  m_fileName("./test.sdriq"),
48  m_sampleRate(0),
49  m_generation(false),
51  m_samplesCount(0),
52  m_tickCount(0),
54 {
55  ui->setupUi(this);
56 
57  ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
58  ui->centerFrequency->setValueRange(7, 0, pow(10,7));
59 
60  ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
61  ui->sampleRate->setValueRange(7, 32000U, 9000000U);
62 
63  ui->fileNameText->setText(m_fileName);
64 
65  connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
66  connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
67  connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
68  m_statusTimer.start(500);
69 
71 
73  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
74 }
void handleInputMessages()
QString m_fileName
Definition: filesinkgui.h:64
void updateStatus()
DeviceUISet * m_deviceUISet
Definition: filesinkgui.h:60
void updateHardware()
std::time_t m_startingTimeStamp
Definition: filesinkgui.h:71
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
Definition: deviceapi.h:173
bool m_generation
Definition: filesinkgui.h:70
MessageQueue m_inputMessageQueue
Definition: filesinkgui.h:75
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
Definition: deviceapi.cpp:222
FileSinkSettings m_settings
Definition: filesinkgui.h:63
engine is before initialization
Definition: deviceapi.h:53
QTimer m_statusTimer
Definition: filesinkgui.h:66
DeviceSampleSink * m_deviceSampleSink
Definition: filesinkgui.h:67
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
int m_lastEngineState
Definition: filesinkgui.h:74
void displaySettings()
std::size_t m_tickCount
Definition: filesinkgui.h:73
int m_sampleRate
Definition: filesinkgui.h:68
QTimer m_updateTimer
Definition: filesinkgui.h:65
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
int m_samplesCount
Definition: filesinkgui.h:72
bool m_doApplySettings
Definition: filesinkgui.h:61
bool m_forceSettings
Definition: filesinkgui.h:62
+ Here is the call graph for this function:

◆ ~FileSinkGui()

FileSinkGui::~FileSinkGui ( )
virtual

Definition at line 76 of file filesinkgui.cpp.

References ui.

77 {
78  delete ui;
79 }
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58

Member Function Documentation

◆ blockApplySettings()

void FileSinkGui::blockApplySettings ( bool  block)
inlineprivate

Definition at line 77 of file filesinkgui.h.

Referenced by handleMessage().

77 { m_doApplySettings = !block; }
bool m_doApplySettings
Definition: filesinkgui.h:61
+ Here is the caller graph for this function:

◆ configureFileName()

void FileSinkGui::configureFileName ( )
private

Definition at line 304 of file filesinkgui.cpp.

References FileSinkOutput::MsgConfigureFileSinkName::create(), DeviceSampleSink::getInputMessageQueue(), m_deviceSampleSink, m_fileName, and MessageQueue::push().

Referenced by on_showFileDialog_clicked().

305 {
306  qDebug() << "FileSinkGui::configureFileName: " << m_fileName.toStdString().c_str();
309 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
QString m_fileName
Definition: filesinkgui.h:64
DeviceSampleSink * m_deviceSampleSink
Definition: filesinkgui.h:67
MessageQueue * getInputMessageQueue()
static MsgConfigureFileSinkName * create(const QString &fileName)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

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

Implements PluginInstanceGUI.

Definition at line 120 of file filesinkgui.cpp.

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

121 {
122  if(m_settings.deserialize(data)) {
123  displaySettings();
124  m_forceSettings = true;
125  sendSettings();
126  return true;
127  } else {
128  resetToDefaults();
129  return false;
130  }
131 }
bool deserialize(const QByteArray &data)
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void displaySettings()
void sendSettings()
void resetToDefaults()
Definition: filesinkgui.cpp:96
bool m_forceSettings
Definition: filesinkgui.h:62
+ Here is the call graph for this function:

◆ destroy()

void FileSinkGui::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 81 of file filesinkgui.cpp.

82 {
83  delete this;
84 }

◆ displaySettings()

void FileSinkGui::displaySettings ( )
private

Definition at line 207 of file filesinkgui.cpp.

References FileSinkSettings::m_centerFrequency, FileSinkSettings::m_sampleRate, m_settings, and ui.

Referenced by deserialize(), FileSinkGui(), handleMessage(), resetToDefaults(), and setCenterFrequency().

208 {
209  ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
210  ui->sampleRate->setValue(m_settings.m_sampleRate);
211 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
+ Here is the caller graph for this function:

◆ displayTime()

void FileSinkGui::displayTime ( )
private

◆ getCenterFrequency()

qint64 FileSinkGui::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 103 of file filesinkgui.cpp.

References FileSinkSettings::m_centerFrequency, and m_settings.

104 {
106 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63

◆ getInputMessageQueue()

virtual MessageQueue* FileSinkGui::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 54 of file filesinkgui.h.

54 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: filesinkgui.h:75

◆ getName()

QString FileSinkGui::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 91 of file filesinkgui.cpp.

92 {
93  return objectName();
94 }

◆ handleInputMessages

void FileSinkGui::handleInputMessages ( )
privateslot

Definition at line 173 of file filesinkgui.cpp.

References DSPSignalNotification::getCenterFrequency(), DSPSignalNotification::getSampleRate(), handleMessage(), m_deviceCenterFrequency, m_inputMessageQueue, m_sampleRate, Message::match(), MessageQueue::pop(), and updateSampleRateAndFrequency().

Referenced by FileSinkGui().

174 {
175  Message* message;
176 
177  while ((message = m_inputMessageQueue.pop()) != 0)
178  {
179 
180  if (DSPSignalNotification::match(*message))
181  {
182  DSPSignalNotification* notif = (DSPSignalNotification*) message;
183  qDebug("FileSinkGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
184  m_sampleRate = notif->getSampleRate();
187 
188  delete message;
189  }
190  else
191  {
192  if (handleMessage(*message))
193  {
194  delete message;
195  }
196  }
197  }
198 }
Message * pop()
Pop message from queue.
MessageQueue m_inputMessageQueue
Definition: filesinkgui.h:75
qint64 getCenterFrequency() const
Definition: dspcommands.h:329
void updateSampleRateAndFrequency()
int m_sampleRate
Definition: filesinkgui.h:68
static bool match(const Message *message)
Definition: message.cpp:45
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: filesinkgui.h:69
int getSampleRate() const
Definition: dspcommands.h:328
virtual bool handleMessage(const Message &message)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool FileSinkGui::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 133 of file filesinkgui.cpp.

References blockApplySettings(), displaySettings(), FileSinkOutput::MsgConfigureFileSink::getSettings(), FileSinkOutput::MsgStartStop::getStartStop(), m_generation, m_samplesCount, m_settings, Message::match(), ui, updateWithGeneration(), and updateWithStreamTime().

Referenced by handleInputMessages().

134 {
136  {
137  qDebug("FileSinkGui::handleMessage: message: MsgConfigureFileSink");
139  m_settings = cfg.getSettings();
140  blockApplySettings(true);
141  displaySettings();
142  blockApplySettings(false);
143  return true;
144  }
146  {
147  m_generation = ((FileSinkOutput::MsgReportFileSinkGeneration&)message).getAcquisition();
148  qDebug("FileSinkGui::handleMessage: message: MsgReportFileSinkGeneration: %s", m_generation ? "start" : "stop");
150  return true;
151  }
153  {
154  m_samplesCount = ((FileSinkOutput::MsgReportFileSinkStreamTiming&)message).getSamplesCount();
156  return true;
157  }
158  else if (FileSinkOutput::MsgStartStop::match(message))
159  {
161  qDebug("FileSinkGui::handleMessage: message: MsgStartStop: %s", notif.getStartStop() ? "start" : "stop");
162  blockApplySettings(true);
163  ui->startStop->setChecked(notif.getStartStop());
164  blockApplySettings(false);
165  return true;
166  }
167  else
168  {
169  return false;
170  }
171 }
bool m_generation
Definition: filesinkgui.h:70
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void updateWithStreamTime()
void displaySettings()
static bool match(const Message *message)
Definition: message.cpp:45
const FileSinkSettings & getSettings() const
void blockApplySettings(bool block)
Definition: filesinkgui.h:77
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
void updateWithGeneration()
int m_samplesCount
Definition: filesinkgui.h:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_centerFrequency_changed

void FileSinkGui::on_centerFrequency_changed ( quint64  value)
privateslot

Definition at line 258 of file filesinkgui.cpp.

References FileSinkSettings::m_centerFrequency, m_settings, and sendSettings().

259 {
260  m_settings.m_centerFrequency = value * 1000;
261  sendSettings();
262 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void sendSettings()
+ Here is the call graph for this function:

◆ on_interp_currentIndexChanged

void FileSinkGui::on_interp_currentIndexChanged ( int  index)
privateslot

Definition at line 270 of file filesinkgui.cpp.

References FileSinkSettings::m_log2Interp, m_settings, sendSettings(), and updateSampleRateAndFrequency().

271 {
272  if (index < 0) {
273  return;
274  }
275 
276  m_settings.m_log2Interp = index;
278  sendSettings();
279 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void updateSampleRateAndFrequency()
void sendSettings()
+ Here is the call graph for this function:

◆ on_sampleRate_changed

void FileSinkGui::on_sampleRate_changed ( quint64  value)
privateslot

Definition at line 264 of file filesinkgui.cpp.

References FileSinkSettings::m_sampleRate, m_settings, and sendSettings().

265 {
266  m_settings.m_sampleRate = value;
267  sendSettings();
268 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void sendSettings()
+ Here is the call graph for this function:

◆ on_showFileDialog_clicked

void FileSinkGui::on_showFileDialog_clicked ( bool  checked)
privateslot

Definition at line 290 of file filesinkgui.cpp.

References configureFileName(), m_fileName, and ui.

291 {
292  (void) checked;
293  QString fileName = QFileDialog::getSaveFileName(this,
294  tr("Save I/Q record file"), ".", tr("SDR I/Q Files (*.sdriq)"), 0, QFileDialog::DontUseNativeDialog);
295 
296  if (fileName != "")
297  {
298  m_fileName = fileName;
299  ui->fileNameText->setText(m_fileName);
301  }
302 }
QString m_fileName
Definition: filesinkgui.h:64
void configureFileName()
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
+ Here is the call graph for this function:

◆ on_startStop_toggled

void FileSinkGui::on_startStop_toggled ( bool  checked)
privateslot

Definition at line 281 of file filesinkgui.cpp.

References FileSinkOutput::MsgStartStop::create(), DeviceSampleSink::getInputMessageQueue(), m_deviceSampleSink, m_doApplySettings, and MessageQueue::push().

282 {
283  if (m_doApplySettings)
284  {
287  }
288 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
DeviceSampleSink * m_deviceSampleSink
Definition: filesinkgui.h:67
MessageQueue * getInputMessageQueue()
static MsgStartStop * create(bool startStop)
bool m_doApplySettings
Definition: filesinkgui.h:61
+ Here is the call graph for this function:

◆ resetToDefaults()

void FileSinkGui::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 96 of file filesinkgui.cpp.

References displaySettings(), m_settings, FileSinkSettings::resetToDefaults(), and sendSettings().

Referenced by deserialize().

97 {
100  sendSettings();
101 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void displaySettings()
void sendSettings()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendSettings()

void FileSinkGui::sendSettings ( )
private

Definition at line 213 of file filesinkgui.cpp.

References m_updateTimer.

Referenced by deserialize(), on_centerFrequency_changed(), on_interp_currentIndexChanged(), on_sampleRate_changed(), resetToDefaults(), and setCenterFrequency().

214 {
215  if(!m_updateTimer.isActive())
216  m_updateTimer.start(100);
217 }
QTimer m_updateTimer
Definition: filesinkgui.h:65
+ Here is the caller graph for this function:

◆ serialize()

QByteArray FileSinkGui::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 115 of file filesinkgui.cpp.

References m_settings, and FileSinkSettings::serialize().

116 {
117  return m_settings.serialize();
118 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
QByteArray serialize() const
+ Here is the call graph for this function:

◆ setCenterFrequency()

void FileSinkGui::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 108 of file filesinkgui.cpp.

References displaySettings(), FileSinkSettings::m_centerFrequency, m_settings, and sendSettings().

109 {
110  m_settings.m_centerFrequency = centerFrequency;
111  displaySettings();
112  sendSettings();
113 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
void displaySettings()
void sendSettings()
+ Here is the call graph for this function:

◆ setName()

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

Implements PluginInstanceGUI.

Definition at line 86 of file filesinkgui.cpp.

87 {
88  setObjectName(name);
89 }

◆ tick

void FileSinkGui::tick ( )
privateslot

Definition at line 333 of file filesinkgui.cpp.

References FileSinkOutput::MsgConfigureFileSinkStreamTiming::create(), DeviceSampleSink::getInputMessageQueue(), m_deviceSampleSink, m_tickCount, and MessageQueue::push().

Referenced by FileSinkGui().

334 {
335  if ((++m_tickCount & 0xf) == 0)
336  {
339  }
340 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
DeviceSampleSink * m_deviceSampleSink
Definition: filesinkgui.h:67
static MsgConfigureFileSinkStreamTiming * create()
MessageQueue * getInputMessageQueue()
std::size_t m_tickCount
Definition: filesinkgui.h:73
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateHardware

void FileSinkGui::updateHardware ( )
privateslot

Definition at line 220 of file filesinkgui.cpp.

References FileSinkOutput::MsgConfigureFileSink::create(), DeviceSampleSink::getInputMessageQueue(), m_deviceSampleSink, m_forceSettings, m_settings, m_updateTimer, and MessageQueue::push().

Referenced by FileSinkGui().

221 {
222  qDebug() << "FileSinkGui::updateHardware";
225  m_forceSettings = false;
226  m_updateTimer.stop();
227 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
FileSinkSettings m_settings
Definition: filesinkgui.h:63
DeviceSampleSink * m_deviceSampleSink
Definition: filesinkgui.h:67
MessageQueue * getInputMessageQueue()
QTimer m_updateTimer
Definition: filesinkgui.h:65
static MsgConfigureFileSink * create(const FileSinkSettings &settings, bool force)
bool m_forceSettings
Definition: filesinkgui.h:62
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSampleRateAndFrequency()

void FileSinkGui::updateSampleRateAndFrequency ( )
private

Definition at line 200 of file filesinkgui.cpp.

References arg(), DeviceUISet::getSpectrum(), m_deviceCenterFrequency, m_deviceUISet, FileSinkSettings::m_log2Interp, m_sampleRate, m_settings, GLSpectrum::setCenterFrequency(), GLSpectrum::setSampleRate(), and ui.

Referenced by handleInputMessages(), and on_interp_currentIndexChanged().

201 {
204  ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate*(1<<m_settings.m_log2Interp)) / 1000));
205 }
void setSampleRate(qint32 sampleRate)
Definition: glspectrum.cpp:211
DeviceUISet * m_deviceUISet
Definition: filesinkgui.h:60
FileSinkSettings m_settings
Definition: filesinkgui.h:63
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
GLSpectrum * getSpectrum()
Direct spectrum getter.
Definition: deviceuiset.h:57
int m_sampleRate
Definition: filesinkgui.h:68
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: filesinkgui.h:69
void setCenterFrequency(qint64 frequency)
Definition: glspectrum.cpp:175
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStatus

void FileSinkGui::updateStatus ( )
privateslot

Definition at line 229 of file filesinkgui.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 FileSinkGui().

230 {
231  int state = m_deviceUISet->m_deviceAPI->state();
232 
233  if(m_lastEngineState != state)
234  {
235  switch(state)
236  {
238  ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
239  break;
240  case DeviceAPI::StIdle:
241  ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
242  break;
244  ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
245  break;
246  case DeviceAPI::StError:
247  ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
248  QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceAPI->errorMessage());
249  break;
250  default:
251  break;
252  }
253 
254  m_lastEngineState = state;
255  }
256 }
DeviceUISet * m_deviceUISet
Definition: filesinkgui.h:60
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
int m_lastEngineState
Definition: filesinkgui.h:74
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
engine is running
Definition: deviceapi.h:56
engine is in error
Definition: deviceapi.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateWithGeneration()

void FileSinkGui::updateWithGeneration ( )
private

Definition at line 311 of file filesinkgui.cpp.

References m_generation, and ui.

Referenced by handleMessage().

312 {
313  ui->showFileDialog->setEnabled(!m_generation);
314 }
bool m_generation
Definition: filesinkgui.h:70
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
+ Here is the caller graph for this function:

◆ updateWithStreamTime()

void FileSinkGui::updateWithStreamTime ( )
private

Definition at line 316 of file filesinkgui.cpp.

References FileSinkSettings::m_sampleRate, m_samplesCount, m_settings, and ui.

Referenced by handleMessage().

317 {
318  int t_sec = 0;
319  int t_msec = 0;
320 
321  if (m_settings.m_sampleRate > 0){
322  t_msec = ((m_samplesCount * 1000) / m_settings.m_sampleRate) % 1000;
324  }
325 
326  QTime t(0, 0, 0, 0);
327  t = t.addSecs(t_sec);
328  t = t.addMSecs(t_msec);
329  QString s_timems = t.toString("HH:mm:ss.zzz");
330  ui->relTimeText->setText(s_timems);
331 }
FileSinkSettings m_settings
Definition: filesinkgui.h:63
Ui::FileSinkGui * ui
Definition: filesinkgui.h:58
int m_samplesCount
Definition: filesinkgui.h:72
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceCenterFrequency

quint64 FileSinkGui::m_deviceCenterFrequency
private

Center frequency in device.

Definition at line 69 of file filesinkgui.h.

Referenced by handleInputMessages(), and updateSampleRateAndFrequency().

◆ m_deviceSampleSink

DeviceSampleSink* FileSinkGui::m_deviceSampleSink
private

◆ m_deviceUISet

DeviceUISet* FileSinkGui::m_deviceUISet
private

Definition at line 60 of file filesinkgui.h.

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

◆ m_doApplySettings

bool FileSinkGui::m_doApplySettings
private

Definition at line 61 of file filesinkgui.h.

Referenced by on_startStop_toggled().

◆ m_fileName

QString FileSinkGui::m_fileName
private

Definition at line 64 of file filesinkgui.h.

Referenced by configureFileName(), FileSinkGui(), and on_showFileDialog_clicked().

◆ m_forceSettings

bool FileSinkGui::m_forceSettings
private

Definition at line 62 of file filesinkgui.h.

Referenced by deserialize(), and updateHardware().

◆ m_generation

bool FileSinkGui::m_generation
private

Definition at line 70 of file filesinkgui.h.

Referenced by handleMessage(), and updateWithGeneration().

◆ m_inputMessageQueue

MessageQueue FileSinkGui::m_inputMessageQueue
private

Definition at line 75 of file filesinkgui.h.

Referenced by FileSinkGui(), and handleInputMessages().

◆ m_lastEngineState

int FileSinkGui::m_lastEngineState
private

Definition at line 74 of file filesinkgui.h.

Referenced by updateStatus().

◆ m_sampleRate

int FileSinkGui::m_sampleRate
private

Definition at line 68 of file filesinkgui.h.

Referenced by handleInputMessages(), and updateSampleRateAndFrequency().

◆ m_samplesCount

int FileSinkGui::m_samplesCount
private

Definition at line 72 of file filesinkgui.h.

Referenced by handleMessage(), and updateWithStreamTime().

◆ m_settings

FileSinkSettings FileSinkGui::m_settings
private

◆ m_startingTimeStamp

std::time_t FileSinkGui::m_startingTimeStamp
private

Definition at line 71 of file filesinkgui.h.

◆ m_statusTimer

QTimer FileSinkGui::m_statusTimer
private

Definition at line 66 of file filesinkgui.h.

Referenced by FileSinkGui().

◆ m_tickCount

std::size_t FileSinkGui::m_tickCount
private

Definition at line 73 of file filesinkgui.h.

Referenced by tick().

◆ m_updateTimer

QTimer FileSinkGui::m_updateTimer
private

Definition at line 65 of file filesinkgui.h.

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

◆ ui

Ui::FileSinkGui* FileSinkGui::ui
private

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