30 m_channelName(channelName),
31 m_channelSinkAPI(channelAPI),
80 if(it->m_channelSinkAPI == channelAPI)
94 if(it->m_channelSourceAPI == channelAPI)
145 ChannelAPI *rxChannel =(*channelRegistrations)[selectedChannelIndex].m_plugin->createRxChannelCS(
m_deviceAPI);
148 qDebug(
"DeviceSet::addRxChannel: %s", qPrintable(rxChannel->
getName()));
154 ChannelAPI *txChannel = (*channelRegistrations)[selectedChannelIndex].m_plugin->createTxChannelCS(
m_deviceAPI);
157 qDebug(
"DeviceSet::addTxChannel: %s", qPrintable(txChannel->
getName()));
164 qDebug(
"DeviceSet::loadChannelSettings: Loading preset [%s | %s]", qPrintable(preset->
getGroup()), qPrintable(preset->
getDescription()));
173 qDebug(
"DeviceSet::loadChannelSettings: %d channel(s) in preset", preset->
getChannelCount());
182 for (
int i = 0;
i < openChannels.count();
i++)
184 qDebug(
"DeviceSet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[
i].
m_channelName), qPrintable(channelConfig.
m_channelIdURI));
189 qDebug(
"DeviceSet::loadChannelSettings: channel [%s] found", qPrintable(openChannels[
i].m_channelName));
190 reg = openChannels.takeAt(
i);
200 for (
int i = 0;
i < channelRegistrations->count();
i++)
205 qDebug(
"DeviceSet::loadChannelSettings: creating new channel [%s] from config [%s]",
206 qPrintable((*channelRegistrations)[
i].m_channelIdURI),
218 qDebug(
"DeviceSet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.
m_channelIdURI));
224 for (
int i = 0;
i < openChannels.count();
i++)
226 qDebug(
"DeviceSet::loadChannelSettings: destroying spare channel [%s]", qPrintable(openChannels[
i].
m_channelName));
227 openChannels[
i].m_channelSinkAPI->destroy();
234 qDebug(
"DeviceSet::loadChannelSettings: Loading preset [%s | %s] not a source preset", qPrintable(preset->
getGroup()), qPrintable(preset->
getDescription()));
252 qDebug(
"DeviceSet::saveChannelSettings: not a source preset");
260 qDebug(
"DeviceSet::loadChannelSettings: Loading preset [%s | %s] not a sink preset", qPrintable(preset->
getGroup()), qPrintable(preset->
getDescription()));
264 qDebug(
"DeviceSet::loadChannelSettings: Loading preset [%s | %s]", qPrintable(preset->
getGroup()), qPrintable(preset->
getDescription()));
273 qDebug(
"DeviceSet::loadChannelSettings: %d channel(s) in preset", preset->
getChannelCount());
282 for(
int i = 0;
i < openChannels.count();
i++)
284 qDebug(
"DeviceSet::loadChannelSettings: channels compare [%s] vs [%s]", qPrintable(openChannels[
i].
m_channelName), qPrintable(channelConfig.
m_channelIdURI));
288 qDebug(
"DeviceSet::loadChannelSettings: channel [%s] found", qPrintable(openChannels[
i].m_channelName));
289 reg = openChannels.takeAt(
i);
299 for(
int i = 0;
i < channelRegistrations->count();
i++)
301 if((*channelRegistrations)[
i].m_channelIdURI == channelConfig.
m_channelIdURI)
303 qDebug(
"DeviceSet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.
m_channelIdURI));
314 qDebug(
"DeviceSet::loadChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.
m_channelIdURI));
320 for(
int i = 0;
i < openChannels.count();
i++)
322 qDebug(
"DeviceSet::loadChannelSettings: destroying spare channel [%s]", qPrintable(openChannels[
i].
m_channelName));
323 openChannels[
i].m_channelSourceAPI->destroy();
334 qDebug(
"DeviceSet::saveChannelSettings: not a sink preset");
397 if ((xChannelURI ==
"sdrangel.channel.chanalyzerng") || (xChannelURI ==
"sdrangel.channel.chanalyzer")) {
398 return registerdChannelURI ==
"sdrangel.channel.chanalyzer";
399 }
else if ((xChannelURI ==
"de.maintech.sdrangelove.channel.am") || (xChannelURI ==
"sdrangel.channel.amdemod")) {
400 return registerdChannelURI ==
"sdrangel.channel.amdemod";
401 }
else if ((xChannelURI ==
"de.maintech.sdrangelove.channel.nfm") || (xChannelURI ==
"sdrangel.channel.nfmdemod")) {
402 return registerdChannelURI ==
"sdrangel.channel.nfmdemod";
403 }
else if ((xChannelURI ==
"de.maintech.sdrangelove.channel.ssb") || (xChannelURI ==
"sdrangel.channel.ssbdemod")) {
404 return registerdChannelURI ==
"sdrangel.channel.ssbdemod";
405 }
else if ((xChannelURI ==
"de.maintech.sdrangelove.channel.wfm") || (xChannelURI ==
"sdrangel.channel.wfmdemod")) {
406 return registerdChannelURI ==
"sdrangel.channel.wfmdemod";
408 return registerdChannelURI == xChannelURI;
virtual const QString & getName() const
int getChannelCount() const
ChannelRegistrations * getTxChannelRegistrations()
void renameRxChannelInstances()
QList< ChannelRegistration > ChannelRegistrations
void loadTxChannelSettings(const Preset *preset, PluginAPI *pluginAPI)
void removeTxChannelInstance(ChannelAPI *channelAPI)
bool operator<(const ChannelInstanceRegistration &other) const
const ChannelConfig & getChannelConfig(int index) const
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
QString m_channelIdURI
Channel type ID in URI form.
DSPDeviceSourceEngine * m_deviceSourceEngine
Exposes a single source stream (output, Tx)
bool isSourcePreset() const
void removeRxChannelInstance(ChannelAPI *channelAPI)
ChannelAPI * m_channelSourceAPI
ChannelAPI * m_channelSinkAPI
void renameTxChannelInstances()
virtual qint64 getCenterFrequency() const =0
Applies to a default stream.
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
ChannelRegistrations * getRxChannelRegistrations()
void addChannel(const QString &channel, const QByteArray &config)
void loadRxChannelSettings(const Preset *preset, PluginAPI *pluginAPI)
void addRxChannel(int selectedChannelIndex, PluginAPI *pluginAPI)
void saveRxChannelSettings(Preset *preset)
bool compareRxChannelURIs(const QString ®isterdChannelURI, const QString &xChannelURI)
void registerRxChannelInstance(const QString &channelName, ChannelAPI *channelAPI)
QList< ChannelInstanceRegistration > ChannelInstanceRegistrations
void deleteRxChannel(int channelIndex)
StreamType getStreamType() const
Exposes a single sink stream (input, Rx)
void saveTxChannelSettings(Preset *preset)
DSPDeviceMIMOEngine * m_deviceMIMOEngine
ChannelInstanceRegistration()
void registerTxChannelInstance(const QString &channelName, ChannelAPI *channelAPI)
virtual bool deserialize(const QByteArray &data)=0
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
virtual QByteArray serialize() const =0
const QString & getDescription() const
DSPDeviceSinkEngine * m_deviceSinkEngine
void deleteTxChannel(int channelIndex)
const QString & getGroup() const
void addTxChannel(int selectedChannelIndex, PluginAPI *pluginAPI)