mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Device sink API: renamed input and output message queues getters to more meaningful names
This commit is contained in:
parent
24442c18a3
commit
87016e7485
@ -453,7 +453,7 @@ bool BladerfOutput::applySettings(const BladeRFOutputSettings& settings, bool fo
|
||||
{
|
||||
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Interp);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
qDebug() << "BladerfOutput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
|
||||
|
@ -63,7 +63,7 @@ BladerfOutputGui::BladerfOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceEngineOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
BladerfOutputGui::~BladerfOutputGui()
|
||||
@ -140,7 +140,7 @@ void BladerfOutputGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceEngineOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("BladerfOutputGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
|
@ -69,7 +69,7 @@ FileSinkGui::FileSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
connect(m_deviceSampleSink->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSinkMessages()));
|
||||
m_deviceAPI->setSink(m_deviceSampleSink);
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceEngineOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
FileSinkGui::~FileSinkGui()
|
||||
@ -152,7 +152,7 @@ void FileSinkGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceEngineOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("FileSinkGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
|
@ -234,7 +234,7 @@ void FileSinkOutput::applySettings(const FileSinkSettings& settings, bool force)
|
||||
m_settings.m_sampleRate,
|
||||
m_settings.m_log2Interp);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_settings.m_sampleRate, m_settings.m_centerFrequency);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ bool HackRFOutput::applySettings(const HackRFOutputSettings& settings, bool forc
|
||||
{
|
||||
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Interp);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -57,7 +57,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
displaySettings();
|
||||
displayBandwidths();
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceEngineOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
HackRFOutputGui::~HackRFOutputGui()
|
||||
@ -137,7 +137,7 @@ void HackRFOutputGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceEngineOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("HackRFOutputGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
|
@ -434,7 +434,7 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
status.sampleRate,
|
||||
status.linkRate,
|
||||
status.timestamp);
|
||||
m_deviceAPI->getDeviceOutputMessageQueue()->push(report);
|
||||
m_deviceAPI->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -449,7 +449,7 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
0, // status.sampleRate,
|
||||
0, // status.linkRate,
|
||||
0); // status.timestamp);
|
||||
m_deviceAPI->getDeviceOutputMessageQueue()->push(report);
|
||||
m_deviceAPI->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -469,7 +469,7 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
|
||||
// send to oneself
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
m_deviceAPI->getDeviceOutputMessageQueue()->push(report);
|
||||
m_deviceAPI->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
|
||||
// send to source buddies
|
||||
const std::vector<DeviceSourceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
|
||||
@ -488,7 +488,7 @@ bool LimeSDROutput::handleMessage(const Message& message)
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
(*itSink)->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -883,7 +883,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftInterp),
|
||||
m_settings.m_centerFrequency + ncoShift);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
// send to sink buddies
|
||||
const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
|
||||
@ -897,12 +897,12 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
m_settings.m_devSampleRate/(1<<buddyLog2SoftInterp),
|
||||
m_settings.m_centerFrequency + buddyNCOFreq); // do not change center frequency
|
||||
(*itSink)->getDeviceInputMessageQueue()->push(notif);
|
||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
MsgReportLimeSDRToGUI *report = MsgReportLimeSDRToGUI::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardInterp);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
(*itSink)->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
// send to source buddies
|
||||
@ -932,7 +932,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
|
||||
// send to self first
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency + ncoShift);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
// send to sink buddies
|
||||
const std::vector<DeviceSinkAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
|
||||
@ -944,12 +944,12 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
uint64_t buddyCenterFreq = buddySharedPtr->m_centerFrequency;
|
||||
int buddyNCOFreq = buddySharedPtr->m_ncoFrequency;
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||
(*itSink)->getDeviceInputMessageQueue()->push(notif);
|
||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
MsgReportLimeSDRToGUI *report = MsgReportLimeSDRToGUI::create(
|
||||
m_settings.m_centerFrequency,
|
||||
m_settings.m_devSampleRate,
|
||||
m_settings.m_log2HardInterp);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
(*itSink)->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
else if (forwardChangeOwnDSP)
|
||||
@ -959,7 +959,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
||||
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftInterp);
|
||||
int ncoShift = m_settings.m_ncoEnable ? m_settings.m_ncoFrequency : 0;
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_centerFrequency + ncoShift);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
qDebug() << "LimeSDROutput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
|
||||
|
@ -76,7 +76,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleMessagesToGUI()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceEngineOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleMessagesToGUI()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
LimeSDROutputGUI::~LimeSDROutputGUI()
|
||||
@ -148,7 +148,7 @@ void LimeSDROutputGUI::handleMessagesToGUI()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceEngineOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
if (DSPSignalNotification::match(*message))
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ SDRdaemonSinkGui::SDRdaemonSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
connect(m_deviceSampleSink->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSinkMessages()));
|
||||
m_deviceAPI->setSink(m_deviceSampleSink);
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
connect(m_deviceAPI->getDeviceEngineOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
|
||||
m_time.start();
|
||||
displayEventCounts();
|
||||
@ -188,7 +188,7 @@ void SDRdaemonSinkGui::handleDSPMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_deviceAPI->getDeviceOutputMessageQueue()->pop()) != 0)
|
||||
while ((message = m_deviceAPI->getDeviceEngineOutputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("SDRdaemonSinkGui::handleDSPMessages: message: %s", message->getIdentifier());
|
||||
|
||||
|
@ -263,7 +263,7 @@ void SDRdaemonSinkOutput::applySettings(const SDRdaemonSinkSettings& settings, b
|
||||
if (forwardChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_settings.m_sampleRate, m_settings.m_centerFrequency);
|
||||
m_deviceAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ bool HackRFInput::applySettings(const HackRFInputSettings& settings, bool force)
|
||||
{
|
||||
DeviceSinkAPI *buddy = m_deviceAPI->getSinkBuddies()[0];
|
||||
DeviceHackRFShared::MsgConfigureFrequencyDelta *deltaMsg = DeviceHackRFShared::MsgConfigureFrequencyDelta::create(settings.m_centerFrequency - m_settings.m_centerFrequency);
|
||||
buddy->getDeviceOutputMessageQueue()->push(deltaMsg);
|
||||
buddy->getDeviceEngineOutputMessageQueue()->push(deltaMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
for (; itSink != sinkBuddies.end(); ++itSink)
|
||||
{
|
||||
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
(*itSink)->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1080,9 +1080,9 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(
|
||||
m_settings.m_devSampleRate/(1<<buddyLog2Interp),
|
||||
buddyCenterFreq + buddyNCOFreq); // do not change center frequency
|
||||
(*itSink)->getDeviceInputMessageQueue()->push(notif);
|
||||
(*itSink)->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
DeviceLimeSDRShared::MsgCrossReportToGUI *report = DeviceLimeSDRShared::MsgCrossReportToGUI::create(m_settings.m_devSampleRate);
|
||||
(*itSink)->getDeviceOutputMessageQueue()->push(report);
|
||||
(*itSink)->getDeviceEngineOutputMessageQueue()->push(report);
|
||||
}
|
||||
}
|
||||
else if (forwardChangeRxDSP)
|
||||
|
@ -114,12 +114,12 @@ uint DeviceSinkAPI::getDeviceUID() const
|
||||
return m_deviceSinkEngine->getUID();
|
||||
}
|
||||
|
||||
MessageQueue *DeviceSinkAPI::getDeviceInputMessageQueue()
|
||||
MessageQueue *DeviceSinkAPI::getDeviceEngineInputMessageQueue()
|
||||
{
|
||||
return m_deviceSinkEngine->getInputMessageQueue();
|
||||
}
|
||||
|
||||
MessageQueue *DeviceSinkAPI::getDeviceOutputMessageQueue()
|
||||
MessageQueue *DeviceSinkAPI::getDeviceEngineOutputMessageQueue()
|
||||
{
|
||||
return m_deviceSinkEngine->getOutputMessageQueue();
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ public:
|
||||
DSPDeviceSinkEngine::State state() const; //!< device engine state
|
||||
QString errorMessage(); //!< Return the current device engine error message
|
||||
uint getDeviceUID() const; //!< Return the current device engine unique ID
|
||||
MessageQueue *getDeviceInputMessageQueue();
|
||||
MessageQueue *getDeviceOutputMessageQueue();
|
||||
MessageQueue *getDeviceEngineInputMessageQueue();
|
||||
MessageQueue *getDeviceEngineOutputMessageQueue();
|
||||
// device related stuff
|
||||
GLSpectrum *getSpectrum(); //!< Direct spectrum getter
|
||||
void addChannelMarker(ChannelMarker* channelMarker); //!< Add channel marker to spectrum
|
||||
|
Loading…
Reference in New Issue
Block a user