mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-21 11:48:54 -04:00
Add label to SampleSinkFifo to mention controlling component in error messages
This commit is contained in:
parent
188186046e
commit
053e4a31cd
@ -48,6 +48,11 @@ ChannelAnalyzer::ChannelAnalyzer(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
getChannelSampleRate();
|
||||
m_basebandSink = new ChannelAnalyzerBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
Real getPllFrequency() const { return m_sink.getPllFrequency(); }
|
||||
Real getPllDeltaPhase() const { return m_sink.getPllDeltaPhase(); }
|
||||
Real getPllPhase() const { return m_sink.getPllPhase(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -65,6 +65,11 @@ ADSBDemod::ADSBDemod(DeviceAPI *devieAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new ADSBDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
m_worker = new ADSBDemodWorker();
|
||||
|
@ -69,6 +69,7 @@ public:
|
||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); }
|
||||
void setMessageQueueToWorker(MessageQueue *messageQueue) { m_sink.setMessageQueueToWorker(messageQueue); }
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -53,6 +53,11 @@ AISDemod::AISDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new AISDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/devicesamplesource.h"
|
||||
#include "device/deviceapi.h"
|
||||
#include "feature/feature.h"
|
||||
#include "settings/serializable.h"
|
||||
@ -49,11 +50,17 @@ const int AMDemod::m_udpBlockSize = 512;
|
||||
AMDemod::AMDemod(DeviceAPI *deviceAPI) :
|
||||
ChannelAPI(m_channelIdURI, ChannelAPI::StreamSingleSink),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_basebandSampleRate(0)
|
||||
m_basebandSampleRate(0),
|
||||
m_lastTs(0)
|
||||
{
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new AMDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
@ -65,11 +72,25 @@ AMDemod::AMDemod(DeviceAPI *deviceAPI) :
|
||||
m_networkManager = new QNetworkAccessManager();
|
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
|
||||
// Experimental:
|
||||
// QObject::connect(
|
||||
// m_deviceAPI->getSampleSource()->getSampleFifo(),
|
||||
// &SampleSinkFifo::written,
|
||||
// this,
|
||||
// &AMDemod::handleWrittenToFifo
|
||||
// );
|
||||
}
|
||||
|
||||
AMDemod::~AMDemod()
|
||||
{
|
||||
qDebug("AMDemod::~AMDemod");
|
||||
// Experimental:
|
||||
// QObject::disconnect(
|
||||
// m_deviceAPI->getSampleSource()->getSampleFifo(),
|
||||
// &SampleSinkFifo::written,
|
||||
// this,
|
||||
// &AMDemod::handleWrittenToFifo
|
||||
// );
|
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
delete m_networkManager;
|
||||
m_deviceAPI->removeChannelSinkAPI(this);
|
||||
@ -645,3 +666,15 @@ void AMDemod::handleChannelMessages()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AMDemod::handleWrittenToFifo(int nsamples, qint64 timestamp)
|
||||
{
|
||||
QDateTime dt;
|
||||
dt.setMSecsSinceEpoch(MainCore::instance()->getStartMsecsSinceEpoch() + timestamp/1000000);
|
||||
qDebug("AMDemod::handleWrittenToFifo: %s: nsamples: %d, dts: %lld sr: %f",
|
||||
qPrintable(dt.toString("yyyy.MM.dd hh:mm:ss.zzz")),
|
||||
nsamples,
|
||||
timestamp - m_lastTs, nsamples*1e9 / (timestamp - m_lastTs)
|
||||
);
|
||||
m_lastTs = timestamp;
|
||||
}
|
||||
|
@ -140,6 +140,7 @@ private:
|
||||
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkRequest m_networkRequest;
|
||||
qint64 m_lastTs;
|
||||
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
void applySettings(const AMDemodSettings& settings, bool force = false);
|
||||
@ -162,6 +163,7 @@ private:
|
||||
private slots:
|
||||
void networkManagerFinished(QNetworkReply *reply);
|
||||
void handleChannelMessages();
|
||||
void handleWrittenToFifo(int nsamples, qint64 timestamp);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_AMDEMOD_H
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
Real getPllFrequency() const { return m_sink.getPllFrequency(); }
|
||||
void setChannel(ChannelAPI *channel);
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -61,6 +61,11 @@ APTDemod::APTDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new APTDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
m_imageWorker = new APTDemodImageWorker(this);
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -42,6 +42,11 @@ ATVDemod::ATVDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new ATVDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
void setVideoTabIndex(int videoTabIndex) { m_sink.setVideoTabIndex(videoTabIndex); }
|
||||
void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -57,6 +57,11 @@ BFMDemod::BFMDemod(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new BFMDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
Real getDemodFclk() const { return m_sink.getDemodFclk(); }
|
||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_sink.getMagSqLevels(avg, peak, nbSamples); }
|
||||
RDSParser& getRDSParser() { return m_sink.getRDSParser(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -72,6 +72,11 @@ ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new ChirpChatDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->setDecoderMessageQueue(getInputMessageQueue()); // Decoder held on the main thread
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
void setDecoderMessageQueue(MessageQueue *messageQueue) { m_sink.setDecoderMessageQueue(messageQueue); }
|
||||
void setSpectrumSink(BasebandSampleSink* spectrumSink) { m_sink.setSpectrumSink(spectrumSink); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -64,6 +64,11 @@ DABDemod::DABDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new DABDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
int getAudioSampleRate() const { return m_sink.getAudioSampleRate(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -44,8 +44,13 @@ DATVDemod::DATVDemod(DeviceAPI *deviceAPI) :
|
||||
m_basebandSampleRate(0)
|
||||
{
|
||||
qDebug("DATVDemod::DATVDemod");
|
||||
setObjectName("DATVDemod");
|
||||
setObjectName(m_channelId);
|
||||
m_basebandSink = new DATVDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
int getModcodCodeRate() const { return m_sink.getModcodCodeRate(); }
|
||||
bool isCstlnSetByModcod() const { return m_sink.isCstlnSetByModcod(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -60,6 +60,11 @@ DSDDemod::DSDDemod(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new DSDDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
const DSDDecoder& getDecoder() const { return m_sink.getDecoder(); }
|
||||
const char *updateAndGetStatusText() { return m_sink.updateAndGetStatusText(); }
|
||||
void setChannel(ChannelAPI *channel);
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -51,6 +51,11 @@ FreeDVDemod::FreeDVDemod(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new FreeDVDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
int getBER() const { return m_sink.getBER(); }
|
||||
float getFrequencyOffset() const { return m_sink.getFrequencyOffset(); }
|
||||
bool isSync() const { return m_sink.isSync(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
signals:
|
||||
/**
|
||||
@ -117,4 +118,4 @@ private slots:
|
||||
void handleData(); //!< Handle data when samples have to be processed
|
||||
};
|
||||
|
||||
#endif // INCLUDE_DSDDEMODBASEBAND_H
|
||||
#endif // INCLUDE_DSDDEMODBASEBAND_H
|
||||
|
@ -59,6 +59,11 @@ NFMDemod::NFMDemod(DeviceAPI *devieAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new NFMDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
int getAudioSampleRate() const { return m_sink.getAudioSampleRate(); }
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
void setChannel(ChannelAPI *channel);
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -55,6 +55,11 @@ PacketDemod::PacketDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new PacketDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -48,6 +48,11 @@ PagerDemod::PagerDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new PagerDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -52,6 +52,11 @@ RadiosondeDemod::RadiosondeDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new RadiosondeDemodBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -57,6 +57,11 @@ SSBDemod::SSBDemod(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new SSBDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_messageQueueToGUI = messageQueue; }
|
||||
void setChannel(ChannelAPI *channel);
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -54,6 +54,11 @@ VORDemod::VORDemod(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new VORDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -110,6 +110,7 @@ public:
|
||||
return 0.0;
|
||||
}
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -55,6 +55,11 @@ VORDemodSC::VORDemodSC(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new VORDemodSCBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
int getAudioSampleRate() const { return m_sink.getAudioSampleRate(); }
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -60,6 +60,11 @@ WFMDemod::WFMDemod(DeviceAPI* deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new WFMDemodBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
int getSquelchState() const { return m_sink.getSquelchState(); }
|
||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_sink.getMagSqLevels(avg, peak, nbSamples); }
|
||||
void setChannel(ChannelAPI *channel);
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -59,6 +59,11 @@ FileSink::FileSink(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new FileSinkBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
bool isRecording() const { return m_sink.isRecording(); }
|
||||
float getSpecMax() const { return m_specMax; }
|
||||
int getSinkSampleRate() const { return m_sink.getSampleRate(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -61,6 +61,11 @@ FreqTracker::FreqTracker(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new FreqTrackerBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
propagateMessageQueue(getInputMessageQueue());
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
bool getPllLocked() const { return m_sink.getPllLocked(); }
|
||||
Real getFrequency() const { return m_sink.getFrequency(); };
|
||||
Real getAvgDeltaFreq() const { return m_sink.getAvgDeltaFreq(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -57,6 +57,11 @@ LocalSink::LocalSink(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new LocalSinkBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
int getChannelSampleRate() const;
|
||||
void startSource() { m_sink.start(m_localSampleSource); }
|
||||
void stopSource() { m_sink.stop(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -66,6 +66,11 @@ NoiseFigure::NoiseFigure(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new NoiseFigureBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void startMeasurement() { m_sink.startMeasurement(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -71,6 +71,11 @@ RadioAstronomy::RadioAstronomy(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new RadioAstronomyBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -55,6 +55,11 @@ RadioClock::RadioClock(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new RadioClockBaseband(this);
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setMessageQueueToChannel(getInputMessageQueue());
|
||||
m_basebandSink->setChannel(this);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
void setChannel(ChannelAPI *channel);
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
bool isRunning() const { return m_running; }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -58,6 +58,11 @@ RemoteSink::RemoteSink(DeviceAPI *deviceAPI) :
|
||||
updateWithDeviceData();
|
||||
|
||||
m_basebandSink = new RemoteSinkBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
void setBasebandSampleRate(int sampleRate);
|
||||
void setDeviceIndex(uint32_t deviceIndex) { m_sink.setDeviceIndex(deviceIndex); }
|
||||
void setChannelIndex(uint32_t channelIndex) { m_sink.setChannelIndex(channelIndex); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
bool m_running;
|
||||
|
@ -59,6 +59,11 @@ SigMFFileSink::SigMFFileSink(DeviceAPI *deviceAPI) :
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_basebandSink = new SigMFFileSinkBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrumSink(&m_spectrumVis);
|
||||
m_basebandSink->moveToThread(&m_thread);
|
||||
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
bool isRecording() const { return m_sink.isRecording(); }
|
||||
float getSpecMax() const { return m_specMax; }
|
||||
int getSinkSampleRate() const { return m_sink.getSampleRate(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -54,6 +54,11 @@ UDPSink::UDPSink(DeviceAPI *deviceAPI) :
|
||||
|
||||
m_thread = new QThread(this);
|
||||
m_basebandSink = new UDPSinkBaseband();
|
||||
m_basebandSink->setFifoLabel(QString("%1 [%2:%3]")
|
||||
.arg(m_channelId)
|
||||
.arg(m_deviceAPI->getDeviceSetIndex())
|
||||
.arg(getIndexInDeviceSet())
|
||||
);
|
||||
m_basebandSink->setSpectrum(&m_spectrumVis);
|
||||
m_basebandSink->moveToThread(m_thread);
|
||||
|
||||
|
@ -88,6 +88,7 @@ public:
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
double getInMagSq() const { return m_sink.getInMagSq(); }
|
||||
bool getSquelchOpen() const { return m_sink.getSquelchOpen(); }
|
||||
void setFifoLabel(const QString& label) { m_sampleFifo.setLabel(label); }
|
||||
|
||||
private:
|
||||
SampleSinkFifo m_sampleFifo;
|
||||
|
@ -51,6 +51,7 @@ AirspyInput::AirspyInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription("Airspy"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
||||
|
@ -53,6 +53,7 @@ AirspyHFInput::AirspyHFInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription("AirspyHF"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
m_networkManager = new QNetworkAccessManager();
|
||||
|
@ -44,6 +44,7 @@ AudioInput::AudioInput(DeviceAPI *deviceAPI) :
|
||||
m_running(false),
|
||||
m_centerFrequency(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_fifo.setSize(20*AudioInputWorker::m_convBufSamples);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -46,6 +46,7 @@ Bladerf1Input::Bladerf1Input(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription("BladeRFInput"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
m_deviceAPI->setBuddySharedPtr(&m_sharedParams);
|
||||
|
@ -48,6 +48,7 @@ BladeRF2Input::BladeRF2Input(DeviceAPI *deviceAPI) :
|
||||
m_running(false),
|
||||
m_thread(nullptr)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
|
||||
if (m_deviceShared.m_dev)
|
||||
|
@ -45,6 +45,7 @@ FCDProInput::FCDProInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription(fcd_traits<Pro>::displayedName),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_fcdFIFO.setSize(20*fcd_traits<Pro>::convBufSize);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -45,6 +45,7 @@ FCDProPlusInput::FCDProPlusInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription(fcd_traits<ProPlus>::displayedName),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_fcdFIFO.setSize(20*fcd_traits<ProPlus>::convBufSize);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -54,13 +54,14 @@ FileInput::FileInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_fileInputWorker(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("FileInput"),
|
||||
m_sampleRate(48000),
|
||||
m_sampleSize(0),
|
||||
m_centerFrequency(435000000),
|
||||
m_recordLengthMuSec(0),
|
||||
m_startingTimeStamp(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
qDebug("FileInput::FileInput: device source engine: %p", m_deviceAPI->getDeviceSourceEngine());
|
||||
qDebug("FileInput::FileInput: device source engine message queue: %p", m_deviceAPI->getDeviceEngineInputMessageQueue());
|
||||
|
@ -47,6 +47,7 @@ HackRFInput::HackRFInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription("HackRF"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -44,10 +44,11 @@ KiwiSDRInput::KiwiSDRInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_kiwiSDRWorker(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("KiwiSDR"),
|
||||
m_running(false),
|
||||
m_masterTimer(deviceAPI->getMasterTimer())
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_kiwiSDRWorkerThread.start();
|
||||
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -54,6 +54,7 @@ LimeSDRInput::LimeSDRInput(DeviceAPI *deviceAPI) :
|
||||
m_running(false),
|
||||
m_channelAcquired(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_streamId.handle = 0;
|
||||
suspendRxBuddies();
|
||||
suspendTxBuddies();
|
||||
|
@ -44,6 +44,7 @@ LocalInput::LocalInput(DeviceAPI *deviceAPI) :
|
||||
m_centerFrequency(0),
|
||||
m_deviceDescription("LocalInput")
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_sampleFifo.setSize(96000 * 4);
|
||||
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -42,6 +42,7 @@ PerseusInput::PerseusInput(DeviceAPI *deviceAPI) :
|
||||
m_perseusWorker(nullptr),
|
||||
m_perseusDescriptor(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
||||
|
@ -45,6 +45,7 @@ PlutoSDRInput::PlutoSDRInput(DeviceAPI *deviceAPI) :
|
||||
m_plutoRxBuffer(0),
|
||||
m_plutoSDRInputThread(nullptr)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_deviceSampleRates.m_addaConnvRate = 0;
|
||||
m_deviceSampleRates.m_bbRateHz = 0;
|
||||
m_deviceSampleRates.m_firRate = 0;
|
||||
|
@ -54,9 +54,10 @@ RemoteInput::RemoteInput(DeviceAPI *deviceAPI) :
|
||||
m_mutex(QMutex::Recursive),
|
||||
m_settings(),
|
||||
m_remoteInputUDPHandler(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("RemoteInput"),
|
||||
m_startingTimeStamp(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_sampleFifo.setSize(m_sampleRate * 8);
|
||||
m_remoteInputUDPHandler = new RemoteInputUDPHandler(&m_sampleFifo, m_deviceAPI);
|
||||
m_remoteInputUDPHandler->setMessageQueueToInput(&m_inputMessageQueue);
|
||||
|
@ -53,9 +53,10 @@ RTLSDRInput::RTLSDRInput(DeviceAPI *deviceAPI) :
|
||||
m_settings(),
|
||||
m_dev(0),
|
||||
m_rtlSDRThread(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("RTLSDR"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -50,6 +50,7 @@ SDRPlayInput::SDRPlayInput(DeviceAPI *deviceAPI) :
|
||||
m_devNumber(0),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
||||
|
@ -50,6 +50,7 @@ SDRPlayV3Input::SDRPlayV3Input(DeviceAPI *deviceAPI) :
|
||||
m_devNumber(0),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
||||
|
@ -70,13 +70,14 @@ SigMFFileInput::SigMFFileInput(DeviceAPI *deviceAPI) :
|
||||
m_crcOK(false),
|
||||
m_recordLengthOK(false),
|
||||
m_fileInputWorker(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("SigMFFileInput"),
|
||||
m_sampleRate(48000),
|
||||
m_sampleBytes(1),
|
||||
m_centerFrequency(0),
|
||||
m_recordLength(0),
|
||||
m_startingTimeStamp(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
qDebug("SigMFFileInput::SigMFFileInput: device source engine: %p", m_deviceAPI->getDeviceSourceEngine());
|
||||
qDebug("SigMFFileInput::SigMFFileInput: device source engine message queue: %p", m_deviceAPI->getDeviceEngineInputMessageQueue());
|
||||
|
@ -46,6 +46,7 @@ SoapySDRInput::SoapySDRInput(DeviceAPI *deviceAPI) :
|
||||
m_running(false),
|
||||
m_thread(nullptr)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
initGainSettings(m_settings);
|
||||
initTunableElementsSettings(m_settings);
|
||||
|
@ -40,10 +40,11 @@ TestSourceInput::TestSourceInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_testSourceWorker(nullptr),
|
||||
m_deviceDescription(),
|
||||
m_deviceDescription("TestSourceInput"),
|
||||
m_running(false),
|
||||
m_masterTimer(deviceAPI->getMasterTimer())
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
||||
if (!m_sampleFifo.setSize(96000 * 4)) {
|
||||
|
@ -57,6 +57,7 @@ USRPInput::USRPInput(DeviceAPI *deviceAPI) :
|
||||
m_channelAcquired(false),
|
||||
m_bufSamples(0)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
m_streamId = nullptr;
|
||||
suspendRxBuddies();
|
||||
suspendTxBuddies();
|
||||
|
@ -52,6 +52,7 @@ XTRXInput::XTRXInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceDescription("XTRXInput"),
|
||||
m_running(false)
|
||||
{
|
||||
m_sampleFifo.setLabel(m_deviceDescription);
|
||||
openDevice();
|
||||
|
||||
m_deviceAPI->setNbSourceStreams(1);
|
||||
|
@ -123,15 +123,17 @@ unsigned int SampleSinkFifo::write(const quint8* data, unsigned int count)
|
||||
{
|
||||
m_suppressed = 0;
|
||||
m_msgRateTimer.start();
|
||||
qCritical("SampleSinkFifo::write: overflow - dropping %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::write: (%s) overflow - dropping %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit overflow(count - total);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_msgRateTimer.elapsed() > 2500)
|
||||
{
|
||||
qCritical("SampleSinkFifo::write: %u messages dropped", m_suppressed);
|
||||
qCritical("SampleSinkFifo::write: overflow - dropping %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::write: (%s) %u messages dropped", qPrintable(m_label), m_suppressed);
|
||||
qCritical("SampleSinkFifo::write: (%s) overflow - dropping %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit overflow(count - total);
|
||||
m_suppressed = -1;
|
||||
}
|
||||
@ -192,15 +194,17 @@ unsigned int SampleSinkFifo::write(SampleVector::const_iterator begin, SampleVec
|
||||
{
|
||||
m_suppressed = 0;
|
||||
m_msgRateTimer.start();
|
||||
qCritical("SampleSinkFifo::write: overflow - dropping %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::write: (%s) overflow - dropping %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit overflow(count - total);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_msgRateTimer.elapsed() > 2500)
|
||||
{
|
||||
qCritical("SampleSinkFifo::write: %u messages dropped", m_suppressed);
|
||||
qCritical("SampleSinkFifo::write: overflow - dropping %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::write: (%s) %u messages dropped", qPrintable(m_label), m_suppressed);
|
||||
qCritical("SampleSinkFifo::write: (%s) overflow - dropping %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit overflow(count - total);
|
||||
m_suppressed = -1;
|
||||
}
|
||||
@ -257,7 +261,8 @@ unsigned int SampleSinkFifo::read(SampleVector::iterator begin, SampleVector::it
|
||||
|
||||
if (total < count)
|
||||
{
|
||||
qCritical("SampleSinkFifo::read: underflow - missing %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::read: (%s) underflow - missing %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit underflow(count - total);
|
||||
}
|
||||
|
||||
@ -296,7 +301,8 @@ unsigned int SampleSinkFifo::readBegin(unsigned int count,
|
||||
|
||||
if (total < count)
|
||||
{
|
||||
qCritical("SampleSinkFifo::readBegin: underflow - missing %u samples", count - total);
|
||||
qCritical("SampleSinkFifo::readBegin: (%s) underflow - missing %u samples",
|
||||
qPrintable(m_label), count - total);
|
||||
emit underflow(count - total);
|
||||
}
|
||||
|
||||
@ -342,7 +348,7 @@ unsigned int SampleSinkFifo::readCommit(unsigned int count)
|
||||
|
||||
if (count > m_fill)
|
||||
{
|
||||
qCritical("SampleSinkFifo::readCommit: cannot commit more than available samples");
|
||||
qCritical("SampleSinkFifo::readCommit: (%s) cannot commit more than available samples", qPrintable(m_label));
|
||||
count = m_fill;
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ private:
|
||||
unsigned int m_fill;
|
||||
unsigned int m_head;
|
||||
unsigned int m_tail;
|
||||
QString m_label;
|
||||
|
||||
void create(unsigned int s);
|
||||
|
||||
@ -65,6 +66,7 @@ public:
|
||||
SampleVector::iterator* part1Begin, SampleVector::iterator* part1End,
|
||||
SampleVector::iterator* part2Begin, SampleVector::iterator* part2End);
|
||||
unsigned int readCommit(unsigned int count);
|
||||
void setLabel(const QString& label) { m_label = label; }
|
||||
static unsigned int getSizePolicy(unsigned int sampleRate);
|
||||
|
||||
signals:
|
||||
|
Loading…
Reference in New Issue
Block a user