1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00

Frequency Scanner: allow scanning channels of a MIMO device

This commit is contained in:
f4exb 2023-12-13 19:24:26 +01:00
parent 5ab23dac45
commit 5ed6f060a0
63 changed files with 146 additions and 25 deletions

View File

@ -113,6 +113,7 @@ public:
virtual int getNbSinkStreams() const { return 0; } virtual int getNbSinkStreams() const { return 0; }
virtual int getNbSourceStreams() const { return 2; } virtual int getNbSourceStreams() const { return 2; }
virtual int getStreamIndex() const { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -113,6 +113,7 @@ public:
virtual int getNbSinkStreams() const { return 2; } virtual int getNbSinkStreams() const { return 2; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -113,6 +113,7 @@ public:
virtual int getNbSinkStreams() const { return 2; } virtual int getNbSinkStreams() const { return 2; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -100,6 +100,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
uint32_t getNumberOfDeviceStreams() const; uint32_t getNumberOfDeviceStreams() const;
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const

View File

@ -115,6 +115,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -125,6 +125,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -88,6 +88,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -220,6 +220,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -86,6 +86,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -96,6 +96,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -228,6 +228,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -355,6 +355,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -67,6 +67,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
uint32_t getNumberOfDeviceStreams() const; uint32_t getNumberOfDeviceStreams() const;
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const

View File

@ -122,6 +122,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -121,6 +121,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -103,6 +103,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -92,6 +92,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -134,6 +134,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -177,6 +177,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -141,6 +141,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -88,6 +88,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -93,6 +93,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -148,6 +148,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -128,6 +128,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -135,6 +135,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -92,6 +92,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -178,7 +178,7 @@ void SSBDemodSink::processOneSample(Complex &ci)
// Only if AGC is active // Only if AGC is active
if (m_agcActive && m_agcClamping && agcVal > 100.0) if (m_agcActive && m_agcClamping && agcVal > 100.0)
{ {
qDebug("SSBDemodSink::processOneSample: %f", agcVal); // qDebug("SSBDemodSink::processOneSample: %f", agcVal);
m_agc.reset(m_agcTarget*m_agcTarget); m_agc.reset(m_agcTarget*m_agcTarget);
m_squelchDelayLine.write(fftfilt::cmplx{0.0, 0.0}); m_squelchDelayLine.write(fftfilt::cmplx{0.0, 0.0});
} }

View File

@ -90,6 +90,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -88,6 +88,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -107,6 +107,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -302,9 +302,9 @@ void FreqScanner::setDeviceCenterFrequency(qint64 frequency)
void FreqScanner::initScan() void FreqScanner::initScan()
{ {
if (m_scanChannelIndex < 0) { // if (m_scanChannelIndex < 0) { // Always false
applyChannelSetting(m_settings.m_channel); // applyChannelSetting(m_settings.m_channel);
} // }
ChannelWebAPIUtils::setAudioMute(m_scanDeviceSetIndex, m_scanChannelIndex, true); ChannelWebAPIUtils::setAudioMute(m_scanDeviceSetIndex, m_scanChannelIndex, true);
if (m_centerFrequency != m_stepStartFrequency) { if (m_centerFrequency != m_stepStartFrequency) {
@ -700,6 +700,7 @@ void FreqScanner::applySettings(const FreqScannerSettings& settings, const QStri
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this); m_deviceAPI->addChannelSinkAPI(this);
scanAvailableChannels(); // re-scan
} }
} }
@ -1108,22 +1109,53 @@ void FreqScanner::handleIndexInDeviceSetChanged(int index)
void FreqScanner::scanAvailableChannels() void FreqScanner::scanAvailableChannels()
{ {
MainCore* mainCore = MainCore::instance();
std::vector<DeviceSet*>& deviceSets = mainCore->getDeviceSets();
m_availableChannels.clear(); m_availableChannels.clear();
for (const auto& deviceSet : deviceSets) DSPDeviceSourceEngine* deviceSourceEngine = getDeviceAPI()->getDeviceSourceEngine();
if (deviceSourceEngine)
{ {
DSPDeviceSourceEngine* deviceSourceEngine = deviceSet->m_deviceSourceEngine; for (int chi = 0; chi < getDeviceAPI()->getNbSinkChannels(); chi++) // Rx channels
if (deviceSourceEngine)
{ {
for (int chi = 0; chi < deviceSet->getNumberOfChannels(); chi++) ChannelAPI* channel = getDeviceAPI()->getChanelSinkAPIAt(chi);
{
ChannelAPI* channel = deviceSet->getChannelAt(chi);
if (channel->getIndexInDeviceSet() == getIndexInDeviceSet()) { // Exclude oneself
continue;
}
FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{
channel->getDeviceSetIndex(),
channel->getIndexInDeviceSet(),
-1
};
m_availableChannels[channel] = availableChannel;
}
}
DSPDeviceMIMOEngine *deviceMIMOEngine = getDeviceAPI()->getDeviceMIMOEngine();
if (deviceMIMOEngine)
{
for (int chi = 0; chi < getDeviceAPI()->getNbSinkChannels(); chi++) // Rx channels
{
ChannelAPI* channel = getDeviceAPI()->getChanelSinkAPIAt(chi);
if (channel->getIndexInDeviceSet() == getIndexInDeviceSet()) { // Exclude oneself
continue;
}
// Single Rx on the same I/Q stream
if ((channel->getNbSinkStreams() == 1)
&& (channel->getNbSourceStreams() == 0)
&& (channel->getStreamIndex() == m_settings.m_streamIndex))
{
FreqScannerSettings::AvailableChannel availableChannel = FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{ channel->getDeviceSetIndex(), channel->getIndexInDeviceSet()}; FreqScannerSettings::AvailableChannel{
channel->getDeviceSetIndex(),
channel->getIndexInDeviceSet(),
channel->getStreamIndex()
};
m_availableChannels[channel] = availableChannel; m_availableChannels[channel] = availableChannel;
} }
} }
@ -1134,16 +1166,34 @@ void FreqScanner::scanAvailableChannels()
void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel) void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel)
{ {
if (deviceSetIndex != getDeviceSetIndex()) { // Can control channels only in the same device set
return;
}
qDebug("FreqScanner::handleChannelAdded: deviceSetIndex: %d:%d channel: %s (%p)", qDebug("FreqScanner::handleChannelAdded: deviceSetIndex: %d:%d channel: %s (%p)",
deviceSetIndex, channel->getIndexInDeviceSet(), qPrintable(channel->getURI()), channel); deviceSetIndex, channel->getIndexInDeviceSet(), qPrintable(channel->getURI()), channel);
std::vector<DeviceSet*>& deviceSets = MainCore::instance()->getDeviceSets(); DSPDeviceSourceEngine* deviceSourceEngine = getDeviceAPI()->getDeviceSourceEngine();
DeviceSet* deviceSet = deviceSets[deviceSetIndex];
DSPDeviceSourceEngine* deviceSourceEngine = deviceSet->m_deviceSourceEngine;
if (deviceSourceEngine) if (deviceSourceEngine)
{ {
FreqScannerSettings::AvailableChannel availableChannel = FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{ deviceSetIndex, channel->getIndexInDeviceSet()}; FreqScannerSettings::AvailableChannel{ deviceSetIndex, channel->getIndexInDeviceSet(), -1};
m_availableChannels[channel] = availableChannel;
}
DSPDeviceMIMOEngine *deviceMIMOEngine = getDeviceAPI()->getDeviceMIMOEngine();
if (deviceMIMOEngine
&& (channel->getNbSinkStreams() == 1)
&& (channel->getNbSourceStreams() == 0)
&& (channel->getStreamIndex() == m_settings.m_streamIndex))
{
FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{
deviceSetIndex,
channel->getIndexInDeviceSet(),
channel->getStreamIndex()
};
m_availableChannels[channel] = availableChannel; m_availableChannels[channel] = availableChannel;
} }
@ -1152,13 +1202,16 @@ void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel)
void FreqScanner::handleChannelRemoved(int deviceSetIndex, ChannelAPI* channel) void FreqScanner::handleChannelRemoved(int deviceSetIndex, ChannelAPI* channel)
{ {
if (deviceSetIndex != getDeviceSetIndex()) { // Can control channels only in the same device set
return;
}
qDebug("FreqScanner::handleChannelRemoved: deviceSetIndex: %d:%d channel: %s (%p)", qDebug("FreqScanner::handleChannelRemoved: deviceSetIndex: %d:%d channel: %s (%p)",
deviceSetIndex, channel->getIndexInDeviceSet(), qPrintable(channel->getURI()), channel); deviceSetIndex, channel->getIndexInDeviceSet(), qPrintable(channel->getURI()), channel);
std::vector<DeviceSet*>& deviceSets = MainCore::instance()->getDeviceSets(); DSPDeviceSourceEngine* deviceSourceEngine = getDeviceAPI()->getDeviceSourceEngine();
DeviceSet* deviceSet = deviceSets[deviceSetIndex]; DSPDeviceMIMOEngine *deviceMIMOEngine = getDeviceAPI()->getDeviceMIMOEngine();
DSPDeviceSourceEngine* deviceSourceEngine = deviceSet->m_deviceSourceEngine;
if (deviceSourceEngine) { if (deviceSourceEngine || deviceMIMOEngine) {
m_availableChannels.remove(channel); m_availableChannels.remove(channel);
} }
@ -1178,8 +1231,9 @@ void FreqScanner::notifyUpdateChannels()
FreqScannerSettings::AvailableChannel msgChannel = FreqScannerSettings::AvailableChannel msgChannel =
FreqScannerSettings::AvailableChannel{ FreqScannerSettings::AvailableChannel{
it->m_deviceSetIndex, it->m_deviceSetIndex,
it->m_channelIndex it->m_channelIndex,
}; it->m_streamIndex
};
msgChannels.push_back(msgChannel); msgChannels.push_back(msgChannel);
} }

View File

@ -307,6 +307,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -225,7 +225,14 @@ void FreqScannerGUI::updateChannelsCombo(QComboBox *combo, const QList<FreqScann
// Add channels in this device set, other than ourself (Don't use ChannelGUI::getDeviceSetIndex()/getIndex() as not valid when this is first called) // Add channels in this device set, other than ourself (Don't use ChannelGUI::getDeviceSetIndex()/getIndex() as not valid when this is first called)
if ((channel.m_deviceSetIndex == m_freqScanner->getDeviceSetIndex()) && (channel.m_channelIndex != m_freqScanner->getIndexInDeviceSet())) if ((channel.m_deviceSetIndex == m_freqScanner->getDeviceSetIndex()) && (channel.m_channelIndex != m_freqScanner->getIndexInDeviceSet()))
{ {
QString name = QString("R%1:%2").arg(channel.m_deviceSetIndex).arg(channel.m_channelIndex); QString name;
if (channel.m_streamIndex < 0) { // Rx
name = QString("R%1:%2").arg(channel.m_deviceSetIndex).arg(channel.m_channelIndex);
} else { // MIMO
name = QString("M%1:%2.%3").arg(channel.m_deviceSetIndex).arg(channel.m_channelIndex).arg(channel.m_streamIndex);
}
combo->addItem(name); combo->addItem(name);
} }
} }

View File

@ -35,6 +35,7 @@ struct FreqScannerSettings
{ {
int m_deviceSetIndex; int m_deviceSetIndex;
int m_channelIndex; int m_channelIndex;
int m_streamIndex;
AvailableChannel() = default; AvailableChannel() = default;
AvailableChannel(const AvailableChannel&) = default; AvailableChannel(const AvailableChannel&) = default;

View File

@ -88,6 +88,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -95,6 +95,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -108,6 +108,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -198,6 +198,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -386,6 +386,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -138,6 +138,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -87,6 +87,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -129,6 +129,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -107,6 +107,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -94,6 +94,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -169,6 +169,7 @@ public:
virtual int getNbSinkStreams() const { return 0; } virtual int getNbSinkStreams() const { return 0; }
virtual int getNbSourceStreams() const { return 1; } virtual int getNbSourceStreams() const { return 1; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -84,6 +84,7 @@ public:
virtual int getNbSinkStreams() const { return 0; } virtual int getNbSinkStreams() const { return 0; }
virtual int getNbSourceStreams() const { return 1; } virtual int getNbSourceStreams() const { return 1; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -113,6 +113,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -174,6 +174,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -196,6 +196,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -267,6 +267,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -112,6 +112,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -222,6 +222,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -200,6 +200,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -200,6 +200,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -196,6 +196,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -164,6 +164,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -148,6 +148,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -148,6 +148,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -198,6 +198,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -196,6 +196,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -178,6 +178,7 @@ public:
virtual int getNbSinkStreams() const { return 0; } virtual int getNbSinkStreams() const { return 0; }
virtual int getNbSourceStreams() const { return 1; } virtual int getNbSourceStreams() const { return 1; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -117,6 +117,7 @@ public:
virtual int getNbSinkStreams() const { return 1; } virtual int getNbSinkStreams() const { return 1; }
virtual int getNbSourceStreams() const { return 0; } virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
{ {

View File

@ -153,6 +153,7 @@ public:
StreamType getStreamType() const { return m_streamType; } StreamType getStreamType() const { return m_streamType; }
virtual int getNbSinkStreams() const = 0; virtual int getNbSinkStreams() const = 0;
virtual int getNbSourceStreams() const = 0; virtual int getNbSourceStreams() const = 0;
virtual int getStreamIndex() const = 0;
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const = 0; virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const = 0;
void handlePipeMessageQueue(MessageQueue* messageQueue) void handlePipeMessageQueue(MessageQueue* messageQueue)