23 #include <QFileDialog> 24 #include <QMessageBox> 26 #include "ui_filesinkgui.h" 42 m_deviceUISet(deviceUISet),
43 m_doApplySettings(true),
44 m_forceSettings(true),
46 m_fileName(
"./test.sdriq"),
47 m_deviceSampleSink(0),
50 m_startingTimeStamp(0),
53 m_lastEngineState(
DeviceAPI::StNotStarted)
58 ui->centerFrequency->setValueRange(7, 0, pow(10,7));
61 ui->sampleRate->setValueRange(7, 32000U, 9000000U);
137 qDebug(
"FileSinkGui::handleMessage: message: MsgConfigureFileSink");
148 qDebug(
"FileSinkGui::handleMessage: message: MsgReportFileSinkGeneration: %s",
m_generation ?
"start" :
"stop");
161 qDebug(
"FileSinkGui::handleMessage: message: MsgStartStop: %s", notif.
getStartStop() ?
"start" :
"stop");
183 qDebug(
"FileSinkGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
222 qDebug() <<
"FileSinkGui::updateHardware";
238 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
241 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
244 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
247 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
293 QString fileName = QFileDialog::getSaveFileName(
this,
294 tr(
"Save I/Q record file"),
".", tr(
"SDR I/Q Files (*.sdriq)"), 0, QFileDialog::DontUseNativeDialog);
306 qDebug() <<
"FileSinkGui::configureFileName: " <<
m_fileName.toStdString().c_str();
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);
Message * pop()
Pop message from queue.
void handleInputMessages()
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
bool deserialize(const QByteArray &data)
void on_startStop_toggled(bool checked)
bool deserialize(const QByteArray &data)
DeviceUISet * m_deviceUISet
void on_sampleRate_changed(quint64 value)
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
QString errorMessage()
Last error message from the device engine.
MessageQueue m_inputMessageQueue
virtual void setCenterFrequency(qint64 centerFrequency)
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
FileSinkSettings m_settings
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
DeviceSampleSink * m_deviceSampleSink
void updateWithStreamTime()
qint64 getCenterFrequency() const
void updateSampleRateAndFrequency()
EngineState state() const
Return the state of the device engine corresponding to the stream type.
void on_centerFrequency_changed(quint64 value)
MessageQueue * getInputMessageQueue()
static MsgStartStop * create(bool startStop)
FileSinkGui(DeviceUISet *deviceUISet, QWidget *parent=0)
static bool match(const Message *message)
void on_showFileDialog_clicked(bool checked)
void blockApplySettings(bool block)
void setName(const QString &name)
void updateWithGeneration()
QByteArray serialize() const
quint64 m_deviceCenterFrequency
Center frequency in device.
int getSampleRate() const
QByteArray serialize() const
void setCenterFrequency(qint64 frequency)
quint64 m_centerFrequency
void on_interp_currentIndexChanged(int index)
virtual bool handleMessage(const Message &message)
bool getStartStop() const
virtual qint64 getCenterFrequency() const