21 #include <QMessageBox> 23 #include "ui_xtrxoutputgui.h" 37 m_deviceUISet(deviceUISet),
39 m_sampleRateMode(true),
41 m_lastEngineState(
DeviceAPI::StNotStarted),
42 m_doApplySettings(true),
43 m_forceSettings(true),
45 m_deviceStatusCounter(0)
51 float minF, maxF, stepF;
63 ui->lpf->setValueRange(6, (minF/1000)+1, maxF/1000);
74 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
190 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : green; }");
192 ui->streamStatusLabel->setStyleSheet(
"QLabel { background-color : blue; }");
201 ui->streamStatusLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
209 ui->temperatureText->setText(tr(
"%1C").
arg(QString::number(report.
getTemperature(),
'f', 0)));
212 ui->gpsStatusLabel->setStyleSheet(
"QLabel { background-color : green; }");
214 ui->gpsStatusLabel->setStyleSheet(
"QLabel { background:rgb(48,48,48); }");
242 qDebug(
"XTRXOutputGUI::handleInputMessages: DSPSignalNotification: SampleRate: %d, CenterFrequency: %llu", notif->
getSampleRate(), notif->
getCenterFrequency());
249 qDebug(
"XTRXOutputGUI::handleInputMessages: MsgConfigureXTRX");
269 if (dacRate < 100000000) {
270 ui->dacRateLabel->setText(tr(
"%1k").
arg(QString::number(dacRate / 1000.0f,
'g', 5)));
272 ui->dacRateLabel->setText(tr(
"%1M").
arg(QString::number(dacRate / 1000000.0f,
'g', 5)));
285 float minF, maxF, stepF;
288 ui->sampleRate->blockSignals(
true);
292 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(60,60,60); }");
293 ui->sampleRateMode->setText(
"SR");
296 ui->sampleRate->setToolTip(
"Device to host sample rate (S/s)");
297 ui->deviceRateText->setToolTip(
"Baseband sample rate (S/s)");
299 ui->deviceRateText->setText(tr(
"%1k").
arg(QString::number(basebandSampleRate / 1000.0f,
'g', 5)));
303 ui->sampleRateMode->setStyleSheet(
"QToolButton { background:rgb(50,50,50); }");
304 ui->sampleRateMode->setText(
"BB");
307 ui->sampleRate->setToolTip(
"Baseband sample rate (S/s)");
308 ui->deviceRateText->setToolTip(
"Device to host sample rate (S/s)");
312 ui->sampleRate->blockSignals(
false);
344 ui->ncoFrequency->setValueRange(
350 ui->ncoFrequency->blockSignals(
true);
351 ui->ncoFrequency->setToolTip(QString(
"NCO frequency shift in Hz (Range: +/- %1 kHz)").
arg(ncoHalfRange/1000));
353 ui->ncoFrequency->blockSignals(
false);
359 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
365 ui->centerFrequency->blockSignals(
true);
366 ui->centerFrequency->setValue(centerFrequency < 0 ? 0 : (
uint64_t) centerFrequency/1000);
367 ui->centerFrequency->blockSignals(
false);
372 int64_t centerFrequency = kHzValue*1000;
379 ui->centerFrequency->setToolTip(QString(
"Main center frequency in kHz (LO: %1 kHz)").
arg(centerFrequency/1000));
392 qDebug() <<
"XTRXOutputGUI::updateHardware";
409 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
412 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
415 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
418 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
503 if ((index <0) || (index > 5)) {
516 if ((index <0) || (index > 6)) {
double getClockGen() const
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
uint64_t getCenterFrequency() const
void setCenterFrequencyDisplay()
static MsgGetDeviceInfo * create()
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
void getLPRange(float &minF, float &maxF, float &stepF) const
bool isBuddyLeader() const
virtual qint64 getCenterFrequency() const
void setUseReverseAPI(bool useReverseAPI)
void handleInputMessages()
bool m_extClock
True if external clock source.
uint32_t m_log2SoftInterp
uint32_t getExtClockFeq() const
uint32_t m_gain
Optimally distributed gain (dB)
int getDevSampleRate() const
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t getDevSampleRate() const
void blockApplySettings(bool block)
static MsgGetStreamInfo * create()
xtrx_antenna_t m_antennaPath
uint16_t getReverseAPIDeviceIndex() const
std::size_t getChannelIndex()
bool deserialize(const QByteArray &data)
void on_ncoEnable_toggled(bool checked)
QString errorMessage()
Last error message from the device engine.
void on_sampleRateMode_toggled(bool checked)
bool m_ncoEnable
Enable TSP NCO and mixing.
void on_pwrmode_currentIndexChanged(int index)
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
void on_sampleRate_changed(quint64 value)
void on_ncoFrequency_changed(qint64 value)
uint32_t m_log2HardInterp
XTRXOutputSettings m_settings
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
uint16_t m_reverseAPIPort
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
void openDeviceSettingsDialog(const QPoint &p)
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
QByteArray serialize() const
quint64 m_deviceCenterFrequency
Center frequency in device.
void on_extClock_clicked()
MessageQueue * getInputMessageQueue()
void on_antenna_currentIndexChanged(int index)
uint16_t m_reverseAPIDeviceIndex
XTRXOutput * m_XTRXOutput
Same object as above but gives easy access to XTRXInput methods and attributes that are used intensiv...
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
QByteArray serialize() const
bool getGPSLocked() const
DeviceUISet * m_deviceUISet
uint16_t getReverseAPIPort() const
void on_hwInterp_currentIndexChanged(int index)
void setName(const QString &name)
static bool match(const Message *message)
float getTemperature() const
virtual bool handleMessage(const Message &message)
bool m_sampleRateMode
true: device, false: base band sample rate update mode
void on_lpf_changed(quint64 value)
unsigned getLog2HardDecimInterp() const
uint32_t getFifoSize() const
QString m_reverseAPIAddress
bool deserialize(const QByteArray &data)
XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget *parent=0)
void setCenterFrequencySetting(uint64_t kHzValue)
bool getStartStop() const
void on_gain_valueChanged(int value)
int getSampleRate() const
void on_swInterp_currentIndexChanged(int index)
int m_deviceStatusCounter
void setCenterFrequency(qint64 frequency)
void setReverseAPIAddress(const QString &address)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void updateSampleRateAndFrequency()
static MsgStartStop * create(bool startStop)
void getLORange(float &minF, float &maxF, float &stepF) const
void setReverseAPIPort(uint16_t port)
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
bool useReverseAPI() const
void getSRRange(float &minF, float &maxF, float &stepF) const
void on_centerFrequency_changed(quint64 value)
virtual void setCenterFrequency(qint64 centerFrequency)
uint32_t getFifoFilledCount() const
uint64_t m_centerFrequency
MessageQueue m_inputMessageQueue
unsigned __int64 uint64_t
void on_startStop_toggled(bool checked)