SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
DeviceUISet Class Reference

#include <deviceuiset.h>

+ Collaboration diagram for DeviceUISet:

Classes

struct  ChannelInstanceRegistration
 

Public Member Functions

 DeviceUISet (int tabIndex, int deviceType, QTimer &timer)
 
 ~DeviceUISet ()
 
GLSpectrumgetSpectrum ()
 Direct spectrum getter. More...
 
void addChannelMarker (ChannelMarker *channelMarker)
 Add channel marker to spectrum. More...
 
void addRollupWidget (QWidget *widget)
 Add rollup widget to channel window. More...
 
int getNumberOfRxChannels () const
 
int getNumberOfTxChannels () const
 
void registerRxChannelInstance (const QString &channelName, PluginInstanceGUI *pluginGUI)
 
void registerTxChannelInstance (const QString &channelName, PluginInstanceGUI *pluginGUI)
 
void removeRxChannelInstance (PluginInstanceGUI *pluginGUI)
 
void removeTxChannelInstance (PluginInstanceGUI *pluginGUI)
 
void freeRxChannels ()
 
void freeTxChannels ()
 
void deleteRxChannel (int channelIndex)
 
void deleteTxChannel (int channelIndex)
 
void loadRxChannelSettings (const Preset *preset, PluginAPI *pluginAPI)
 
void saveRxChannelSettings (Preset *preset)
 
void loadTxChannelSettings (const Preset *preset, PluginAPI *pluginAPI)
 
void saveTxChannelSettings (Preset *preset)
 
void setNumberOfAvailableRxChannels (int number)
 
void setNumberOfAvailableTxChannels (int number)
 
void setNumberOfAvailableMIMOChannels (int number)
 
int getNumberOfAvailableRxChannels () const
 
int getNumberOfAvailableTxChannels () const
 
int getNumberOfAvailableMIMOChannels () const
 

Public Attributes

SpectrumVism_spectrumVis
 
GLSpectrumm_spectrum
 
GLSpectrumGUIm_spectrumGUI
 
ChannelWindowm_channelWindow
 
SamplingDeviceControlm_samplingDeviceControl
 
DeviceAPIm_deviceAPI
 
DSPDeviceSourceEnginem_deviceSourceEngine
 
DSPDeviceSinkEnginem_deviceSinkEngine
 
DSPDeviceMIMOEnginem_deviceMIMOEngine
 
QByteArray m_mainWindowState
 

Private Types

typedef QList< ChannelInstanceRegistrationChannelInstanceRegistrations
 

Private Member Functions

void renameRxChannelInstances ()
 
void renameTxChannelInstances ()
 
bool compareRxChannelURIs (const QString &registerdChannelURI, const QString &xChannelURI)
 

Private Attributes

ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
 
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
 
int m_deviceTabIndex
 
int m_nbAvailableRxChannels
 Number of Rx channels available for selection. More...
 
int m_nbAvailableTxChannels
 Number of Tx channels available for selection. More...
 
int m_nbAvailableMIMOChannels
 Number of MIMO channels available for selection. More...
 

Detailed Description

Definition at line 40 of file deviceuiset.h.

Member Typedef Documentation

◆ ChannelInstanceRegistrations

Definition at line 103 of file deviceuiset.h.

Constructor & Destructor Documentation

◆ DeviceUISet()

DeviceUISet::DeviceUISet ( int  tabIndex,
int  deviceType,
QTimer &  timer 
)

Definition at line 34 of file deviceuiset.cpp.

References GLSpectrum::connectTimer(), BasebandSampleSink::getInputMessageQueue(), m_channelWindow, m_deviceAPI, m_deviceMIMOEngine, m_deviceSinkEngine, m_deviceSourceEngine, m_deviceTabIndex, m_nbAvailableMIMOChannels, m_nbAvailableRxChannels, m_nbAvailableTxChannels, m_samplingDeviceControl, m_spectrum, m_spectrumGUI, m_spectrumVis, SDR_RX_SCALEF, SDR_TX_SCALEF, and GLSpectrumGUI::setBuddies().

35 {
36  m_spectrum = new GLSpectrum;
37  if ((deviceType == 0) || (deviceType == 2)) { // Single Rx or MIMO
39  } else if (deviceType == 1) { // Single Tx
41  }
42  m_spectrum->connectTimer(timer);
46  m_samplingDeviceControl = new SamplingDeviceControl(tabIndex, deviceType);
47  m_deviceAPI = nullptr;
48  m_deviceSourceEngine = nullptr;
49  m_deviceSinkEngine = nullptr;
50  m_deviceMIMOEngine = nullptr;
51  m_deviceTabIndex = tabIndex;
52  m_nbAvailableRxChannels = 0; // updated at enumeration for UI selector
53  m_nbAvailableTxChannels = 0; // updated at enumeration for UI selector
54  m_nbAvailableMIMOChannels = 0; // updated at enumeration for UI selector
55 
56  // m_spectrum needs to have its font to be set since it cannot be inherited from the main window
57  QFont font;
58  font.setFamily(QStringLiteral("Liberation Sans"));
59  font.setPointSize(9);
60  m_spectrum->setFont(font);
61 }
int m_nbAvailableRxChannels
Number of Rx channels available for selection.
Definition: deviceuiset.h:108
GLSpectrumGUI * m_spectrumGUI
Definition: deviceuiset.h:45
void connectTimer(const QTimer &timer)
GLSpectrum * m_spectrum
Definition: deviceuiset.h:44
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setBuddies(MessageQueue *messageQueue, SpectrumVis *spectrumVis, GLSpectrum *glSpectrum)
int m_deviceTabIndex
Definition: deviceuiset.h:107
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceuiset.h:49
#define SDR_RX_SCALEF
Definition: dsptypes.h:33
#define SDR_TX_SCALEF
Definition: dsptypes.h:39
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
SamplingDeviceControl * m_samplingDeviceControl
Definition: deviceuiset.h:47
ChannelWindow * m_channelWindow
Definition: deviceuiset.h:46
int m_nbAvailableTxChannels
Number of Tx channels available for selection.
Definition: deviceuiset.h:109
int m_nbAvailableMIMOChannels
Number of MIMO channels available for selection.
Definition: deviceuiset.h:110
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceuiset.h:50
SpectrumVis * m_spectrumVis
Definition: deviceuiset.h:43
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceuiset.h:51
+ Here is the call graph for this function:

◆ ~DeviceUISet()

DeviceUISet::~DeviceUISet ( )

Definition at line 63 of file deviceuiset.cpp.

References m_channelWindow, m_samplingDeviceControl, m_spectrum, m_spectrumGUI, and m_spectrumVis.

64 {
66  delete m_channelWindow;
67  delete m_spectrumGUI;
68  delete m_spectrumVis;
69  delete m_spectrum;
70 }
GLSpectrumGUI * m_spectrumGUI
Definition: deviceuiset.h:45
GLSpectrum * m_spectrum
Definition: deviceuiset.h:44
SamplingDeviceControl * m_samplingDeviceControl
Definition: deviceuiset.h:47
ChannelWindow * m_channelWindow
Definition: deviceuiset.h:46
SpectrumVis * m_spectrumVis
Definition: deviceuiset.h:43

Member Function Documentation

◆ addChannelMarker()

void DeviceUISet::addChannelMarker ( ChannelMarker channelMarker)

◆ addRollupWidget()

void DeviceUISet::addRollupWidget ( QWidget *  widget)

◆ compareRxChannelURIs()

bool DeviceUISet::compareRxChannelURIs ( const QString &  registerdChannelURI,
const QString &  xChannelURI 
)
private

Use this function to support possible older identifiers in presets

Definition at line 357 of file deviceuiset.cpp.

Referenced by loadRxChannelSettings().

358 {
359  if ((xChannelURI == "sdrangel.channel.chanalyzerng") || (xChannelURI == "sdrangel.channel.chanalyzer")) { // renamed ChanalyzerNG to Chanalyzer in 4.0.0
360  return registerdChannelURI == "sdrangel.channel.chanalyzer";
361  } else if ((xChannelURI == "de.maintech.sdrangelove.channel.am") || (xChannelURI == "sdrangel.channel.amdemod")) {
362  return registerdChannelURI == "sdrangel.channel.amdemod";
363  } else if ((xChannelURI == "de.maintech.sdrangelove.channel.nfm") || (xChannelURI == "sdrangel.channel.nfmdemod")) {
364  return registerdChannelURI == "sdrangel.channel.nfmdemod";
365  } else if ((xChannelURI == "de.maintech.sdrangelove.channel.ssb") || (xChannelURI == "sdrangel.channel.ssbdemod")) {
366  return registerdChannelURI == "sdrangel.channel.ssbdemod";
367  } else if ((xChannelURI == "de.maintech.sdrangelove.channel.wfm") || (xChannelURI == "sdrangel.channel.wfmdemod")) {
368  return registerdChannelURI == "sdrangel.channel.wfmdemod";
369  } else {
370  return registerdChannelURI == xChannelURI;
371  }
372 }
+ Here is the caller graph for this function:

◆ deleteRxChannel()

void DeviceUISet::deleteRxChannel ( int  channelIndex)

Definition at line 140 of file deviceuiset.cpp.

References m_rxChannelInstanceRegistrations, and renameRxChannelInstances().

Referenced by MainWindow::deleteChannel().

141 {
142  if ((channelIndex >= 0) && (channelIndex < m_rxChannelInstanceRegistrations.count()))
143  {
144  qDebug("DeviceUISet::deleteRxChennel: delete channel [%s] at %d",
145  qPrintable(m_rxChannelInstanceRegistrations[channelIndex].m_channelName),
146  channelIndex);
147  m_rxChannelInstanceRegistrations[channelIndex].m_gui->destroy();
148  m_rxChannelInstanceRegistrations.removeAt(channelIndex);
150  }
151 }
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105
void renameRxChannelInstances()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteTxChannel()

void DeviceUISet::deleteTxChannel ( int  channelIndex)

Definition at line 153 of file deviceuiset.cpp.

References m_txChannelInstanceRegistrations, and renameTxChannelInstances().

Referenced by MainWindow::deleteChannel().

154 {
155  if ((channelIndex >= 0) && (channelIndex < m_txChannelInstanceRegistrations.count()))
156  {
157  qDebug("DeviceUISet::deleteTxChennel: delete channel [%s] at %d",
158  qPrintable(m_txChannelInstanceRegistrations[channelIndex].m_channelName),
159  channelIndex);
160  m_txChannelInstanceRegistrations[channelIndex].m_gui->destroy();
161  m_txChannelInstanceRegistrations.removeAt(channelIndex);
163  }
164 }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
void renameTxChannelInstances()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ freeRxChannels()

void DeviceUISet::freeRxChannels ( )

Definition at line 122 of file deviceuiset.cpp.

References i, and m_rxChannelInstanceRegistrations.

123 {
124  for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
125  {
126  qDebug("DeviceUISet::freeAll: destroying channel [%s]", qPrintable(m_rxChannelInstanceRegistrations[i].m_channelName));
127  m_rxChannelInstanceRegistrations[i].m_gui->destroy();
128  }
129 }
int32_t i
Definition: decimators.h:244
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105

◆ freeTxChannels()

void DeviceUISet::freeTxChannels ( )

Definition at line 131 of file deviceuiset.cpp.

References i, and m_txChannelInstanceRegistrations.

132 {
133  for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
134  {
135  qDebug("DeviceUISet::freeAll: destroying channel [%s]", qPrintable(m_txChannelInstanceRegistrations[i].m_channelName));
136  m_txChannelInstanceRegistrations[i].m_gui->destroy();
137  }
138 }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
int32_t i
Definition: decimators.h:244

◆ getNumberOfAvailableMIMOChannels()

int DeviceUISet::getNumberOfAvailableMIMOChannels ( ) const
inline

Definition at line 82 of file deviceuiset.h.

82 { return m_nbAvailableMIMOChannels; }
int m_nbAvailableMIMOChannels
Number of MIMO channels available for selection.
Definition: deviceuiset.h:110

◆ getNumberOfAvailableRxChannels()

int DeviceUISet::getNumberOfAvailableRxChannels ( ) const
inline

Definition at line 80 of file deviceuiset.h.

Referenced by MainWindow::channelAddClicked().

80 { return m_nbAvailableRxChannels; }
int m_nbAvailableRxChannels
Number of Rx channels available for selection.
Definition: deviceuiset.h:108
+ Here is the caller graph for this function:

◆ getNumberOfAvailableTxChannels()

int DeviceUISet::getNumberOfAvailableTxChannels ( ) const
inline

Definition at line 81 of file deviceuiset.h.

Referenced by MainWindow::channelAddClicked().

81 { return m_nbAvailableTxChannels; }
int m_nbAvailableTxChannels
Number of Tx channels available for selection.
Definition: deviceuiset.h:109
+ Here is the caller graph for this function:

◆ getNumberOfRxChannels()

int DeviceUISet::getNumberOfRxChannels ( ) const
inline

Definition at line 61 of file deviceuiset.h.

61 { return m_rxChannelInstanceRegistrations.size(); }
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105

◆ getNumberOfTxChannels()

int DeviceUISet::getNumberOfTxChannels ( ) const
inline

Definition at line 62 of file deviceuiset.h.

62 { return m_txChannelInstanceRegistrations.size(); }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106

◆ getSpectrum()

GLSpectrum* DeviceUISet::getSpectrum ( )
inline

Direct spectrum getter.

Definition at line 57 of file deviceuiset.h.

Referenced by RemoteOutputSinkGui::analyzeApiReply(), RemoteOutputSinkGui::RemoteOutputSinkGui(), RemoteOutputSinkGui::updateSampleRate(), FCDProPlusGui::updateSampleRateAndFrequency(), FCDProGui::updateSampleRateAndFrequency(), SDRPlayGui::updateSampleRateAndFrequency(), TestSourceGui::updateSampleRateAndFrequency(), BladeRF2InputGui::updateSampleRateAndFrequency(), BladeRF2OutputGui::updateSampleRateAndFrequency(), Bladerf1OutputGui::updateSampleRateAndFrequency(), Bladerf1InputGui::updateSampleRateAndFrequency(), PlutoSDROutputGUI::updateSampleRateAndFrequency(), AirspyGui::updateSampleRateAndFrequency(), TestMIGui::updateSampleRateAndFrequency(), RTLSDRGui::updateSampleRateAndFrequency(), KiwiSDRGui::updateSampleRateAndFrequency(), PerseusGui::updateSampleRateAndFrequency(), PlutoSDRInputGui::updateSampleRateAndFrequency(), AirspyHFGui::updateSampleRateAndFrequency(), LimeSDRInputGUI::updateSampleRateAndFrequency(), XTRXOutputGUI::updateSampleRateAndFrequency(), LimeSDROutputGUI::updateSampleRateAndFrequency(), XTRXInputGUI::updateSampleRateAndFrequency(), FileInputGUI::updateSampleRateAndFrequency(), FileSinkGui::updateSampleRateAndFrequency(), HackRFInputGui::updateSampleRateAndFrequency(), HackRFOutputGui::updateSampleRateAndFrequency(), LocalOutputGui::updateSampleRateAndFrequency(), SoapySDRInputGui::updateSampleRateAndFrequency(), SoapySDROutputGui::updateSampleRateAndFrequency(), LocalInputGui::updateSampleRateAndFrequency(), and RemoteInputGui::updateSampleRateAndFrequency().

+ Here is the caller graph for this function:

◆ loadRxChannelSettings()

void DeviceUISet::loadRxChannelSettings ( const Preset preset,
PluginAPI pluginAPI 
)

Definition at line 166 of file deviceuiset.cpp.

References compareRxChannelURIs(), PluginInstanceGUI::deserialize(), Preset::getChannelConfig(), Preset::getChannelCount(), Preset::getDescription(), Preset::getGroup(), PluginAPI::getRxChannelRegistrations(), i, Preset::isSourcePreset(), Preset::ChannelConfig::m_channelIdURI, Preset::ChannelConfig::m_config, m_deviceAPI, DeviceUISet::ChannelInstanceRegistration::m_gui, m_rxChannelInstanceRegistrations, and renameRxChannelInstances().

Referenced by MainWindow::loadPresetSettings().

167 {
168  if (preset->isSourcePreset())
169  {
170  qDebug("DeviceUISet::loadRxChannelSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
171 
172  // Available channel plugins
173  PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getRxChannelRegistrations();
174 
175  // copy currently open channels and clear list
178 
179  for(int i = 0; i < openChannels.count(); i++)
180  {
181  qDebug("DeviceUISet::loadRxChannelSettings: destroying old channel [%s]", qPrintable(openChannels[i].m_channelName));
182  openChannels[i].m_gui->destroy(); // FIXME: stop channel before
183  }
184 
185  qDebug("DeviceUISet::loadRxChannelSettings: %d channel(s) in preset", preset->getChannelCount());
186 
187  for (int i = 0; i < preset->getChannelCount(); i++)
188  {
189  const Preset::ChannelConfig& channelConfig = preset->getChannelConfig(i);
190  ChannelInstanceRegistration reg;
191 
192  // create channel instance
193 
194  for(int i = 0; i < channelRegistrations->count(); i++)
195  {
196  //if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
197  if (compareRxChannelURIs((*channelRegistrations)[i].m_channelIdURI, channelConfig.m_channelIdURI))
198  {
199  qDebug("DeviceUISet::loadRxChannelSettings: creating new channel [%s] from config [%s]",
200  qPrintable((*channelRegistrations)[i].m_channelIdURI),
201  qPrintable(channelConfig.m_channelIdURI));
202  BasebandSampleSink *rxChannel =
203  (*channelRegistrations)[i].m_plugin->createRxChannelBS(m_deviceAPI);
204  PluginInstanceGUI *rxChannelGUI =
205  (*channelRegistrations)[i].m_plugin->createRxChannelGUI(this, rxChannel);
206  reg = ChannelInstanceRegistration(channelConfig.m_channelIdURI, rxChannelGUI);
207  break;
208  }
209  }
210 
211  if (reg.m_gui != 0)
212  {
213  qDebug("DeviceUISet::loadRxChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI));
214  reg.m_gui->deserialize(channelConfig.m_config);
215  }
216  }
217 
219  }
220  else
221  {
222  qDebug("DeviceUISet::loadRxChannelSettings: Loading preset [%s | %s] not a source preset", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
223  }
224 }
int getChannelCount() const
Definition: preset.h:86
bool compareRxChannelURIs(const QString &registerdChannelURI, const QString &xChannelURI)
QList< ChannelRegistration > ChannelRegistrations
Definition: pluginapi.h:44
const ChannelConfig & getChannelConfig(int index) const
Definition: preset.h:87
QList< ChannelInstanceRegistration > ChannelInstanceRegistrations
Definition: deviceuiset.h:103
QString m_channelIdURI
Channel type ID in URI form.
Definition: preset.h:31
bool isSourcePreset() const
Definition: preset.h:66
ChannelRegistrations * getRxChannelRegistrations()
Definition: pluginapi.cpp:14
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
int32_t i
Definition: decimators.h:244
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105
void renameRxChannelInstances()
QByteArray m_config
Definition: preset.h:33
const QString & getDescription() const
Definition: preset.h:74
const QString & getGroup() const
Definition: preset.h:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadTxChannelSettings()

void DeviceUISet::loadTxChannelSettings ( const Preset preset,
PluginAPI pluginAPI 
)

Definition at line 244 of file deviceuiset.cpp.

References PluginInstanceGUI::deserialize(), Preset::getChannelConfig(), Preset::getChannelCount(), Preset::getDescription(), Preset::getGroup(), PluginAPI::getTxChannelRegistrations(), i, Preset::isSourcePreset(), Preset::ChannelConfig::m_channelIdURI, Preset::ChannelConfig::m_config, m_deviceAPI, DeviceUISet::ChannelInstanceRegistration::m_gui, m_txChannelInstanceRegistrations, and renameTxChannelInstances().

Referenced by MainWindow::loadPresetSettings().

245 {
246  if (preset->isSourcePreset())
247  {
248  qDebug("DeviceUISet::loadTxChannelSettings: Loading preset [%s | %s] not a sink preset", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
249  }
250  else
251  {
252  qDebug("DeviceUISet::loadTxChannelSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
253 
254  // Available channel plugins
255  PluginAPI::ChannelRegistrations *channelRegistrations = pluginAPI->getTxChannelRegistrations();
256 
257  // copy currently open channels and clear list
260 
261  for(int i = 0; i < openChannels.count(); i++)
262  {
263  qDebug("DeviceUISet::loadTxChannelSettings: destroying old channel [%s]", qPrintable(openChannels[i].m_channelName));
264  openChannels[i].m_gui->destroy();
265  }
266 
267  qDebug("DeviceUISet::loadTxChannelSettings: %d channel(s) in preset", preset->getChannelCount());
268 
269  for(int i = 0; i < preset->getChannelCount(); i++)
270  {
271  const Preset::ChannelConfig& channelConfig = preset->getChannelConfig(i);
272  ChannelInstanceRegistration reg;
273 
274  // create channel instance
275 
276  for(int i = 0; i < channelRegistrations->count(); i++)
277  {
278  if ((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
279  {
280  qDebug("DeviceUISet::loadTxChannelSettings: creating new channel [%s] from config [%s]",
281  qPrintable((*channelRegistrations)[i].m_channelIdURI),
282  qPrintable(channelConfig.m_channelIdURI));
283  BasebandSampleSource *txChannel =
284  (*channelRegistrations)[i].m_plugin->createTxChannelBS(m_deviceAPI);
285  PluginInstanceGUI *txChannelGUI =
286  (*channelRegistrations)[i].m_plugin->createTxChannelGUI(this, txChannel);
287  reg = ChannelInstanceRegistration(channelConfig.m_channelIdURI, txChannelGUI);
288  break;
289  }
290  }
291 
292  if(reg.m_gui != 0)
293  {
294  qDebug("DeviceUISet::loadTxChannelSettings: deserializing channel [%s]", qPrintable(channelConfig.m_channelIdURI));
295  reg.m_gui->deserialize(channelConfig.m_config);
296  }
297  }
298 
300  }
301 }
int getChannelCount() const
Definition: preset.h:86
ChannelRegistrations * getTxChannelRegistrations()
Definition: pluginapi.cpp:34
QList< ChannelRegistration > ChannelRegistrations
Definition: pluginapi.h:44
const ChannelConfig & getChannelConfig(int index) const
Definition: preset.h:87
QList< ChannelInstanceRegistration > ChannelInstanceRegistrations
Definition: deviceuiset.h:103
QString m_channelIdURI
Channel type ID in URI form.
Definition: preset.h:31
bool isSourcePreset() const
Definition: preset.h:66
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
int32_t i
Definition: decimators.h:244
QByteArray m_config
Definition: preset.h:33
void renameTxChannelInstances()
const QString & getDescription() const
Definition: preset.h:74
const QString & getGroup() const
Definition: preset.h:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerRxChannelInstance()

void DeviceUISet::registerRxChannelInstance ( const QString &  channelName,
PluginInstanceGUI pluginGUI 
)

◆ registerTxChannelInstance()

void DeviceUISet::registerTxChannelInstance ( const QString &  channelName,
PluginInstanceGUI pluginGUI 
)

Definition at line 88 of file deviceuiset.cpp.

References m_txChannelInstanceRegistrations, and renameTxChannelInstances().

Referenced by AMModGUI::AMModGUI(), ATVModGUI::ATVModGUI(), FileSourceGUI::FileSourceGUI(), FreeDVModGUI::FreeDVModGUI(), LocalSourceGUI::LocalSourceGUI(), NFMModGUI::NFMModGUI(), RemoteSourceGUI::RemoteSourceGUI(), SSBModGUI::SSBModGUI(), UDPSourceGUI::UDPSourceGUI(), and WFMModGUI::WFMModGUI().

89 {
90  m_txChannelInstanceRegistrations.append(ChannelInstanceRegistration(channelName, pluginGUI));
92 }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
void renameTxChannelInstances()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeRxChannelInstance()

void DeviceUISet::removeRxChannelInstance ( PluginInstanceGUI pluginGUI)

Definition at line 94 of file deviceuiset.cpp.

References m_rxChannelInstanceRegistrations, and renameRxChannelInstances().

Referenced by AMDemodGUI::~AMDemodGUI(), ATVDemodGUI::~ATVDemodGUI(), BFMDemodGUI::~BFMDemodGUI(), ChannelAnalyzerGUI::~ChannelAnalyzerGUI(), DATVDemodGUI::~DATVDemodGUI(), DSDDemodGUI::~DSDDemodGUI(), FreeDVDemodGUI::~FreeDVDemodGUI(), FreqTrackerGUI::~FreqTrackerGUI(), LocalSinkGUI::~LocalSinkGUI(), LoRaDemodGUI::~LoRaDemodGUI(), NFMDemodGUI::~NFMDemodGUI(), RemoteSinkGUI::~RemoteSinkGUI(), SSBDemodGUI::~SSBDemodGUI(), UDPSinkGUI::~UDPSinkGUI(), and WFMDemodGUI::~WFMDemodGUI().

95 {
96  for(ChannelInstanceRegistrations::iterator it = m_rxChannelInstanceRegistrations.begin(); it != m_rxChannelInstanceRegistrations.end(); ++it)
97  {
98  if(it->m_gui == pluginGUI)
99  {
101  break;
102  }
103  }
104 
106 }
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105
void renameRxChannelInstances()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeTxChannelInstance()

void DeviceUISet::removeTxChannelInstance ( PluginInstanceGUI pluginGUI)

Definition at line 108 of file deviceuiset.cpp.

References m_txChannelInstanceRegistrations, and renameTxChannelInstances().

Referenced by AMModGUI::~AMModGUI(), ATVModGUI::~ATVModGUI(), FileSourceGUI::~FileSourceGUI(), FreeDVModGUI::~FreeDVModGUI(), LocalSourceGUI::~LocalSourceGUI(), NFMModGUI::~NFMModGUI(), RemoteSourceGUI::~RemoteSourceGUI(), SSBModGUI::~SSBModGUI(), UDPSourceGUI::~UDPSourceGUI(), and WFMModGUI::~WFMModGUI().

109 {
110  for(ChannelInstanceRegistrations::iterator it = m_txChannelInstanceRegistrations.begin(); it != m_txChannelInstanceRegistrations.end(); ++it)
111  {
112  if(it->m_gui == pluginGUI)
113  {
115  break;
116  }
117  }
118 
120 }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
void renameTxChannelInstances()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renameRxChannelInstances()

void DeviceUISet::renameRxChannelInstances ( )
private

Definition at line 321 of file deviceuiset.cpp.

References arg(), i, and m_rxChannelInstanceRegistrations.

Referenced by deleteRxChannel(), loadRxChannelSettings(), registerRxChannelInstance(), and removeRxChannelInstance().

322 {
323  for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
324  {
325  m_rxChannelInstanceRegistrations[i].m_gui->setName(QString("%1:%2").arg(m_rxChannelInstanceRegistrations[i].m_channelName).arg(i));
326  }
327 }
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
int32_t i
Definition: decimators.h:244
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renameTxChannelInstances()

void DeviceUISet::renameTxChannelInstances ( )
private

Definition at line 329 of file deviceuiset.cpp.

References arg(), i, and m_txChannelInstanceRegistrations.

Referenced by deleteTxChannel(), loadTxChannelSettings(), registerTxChannelInstance(), and removeTxChannelInstance().

330 {
331  for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
332  {
333  m_txChannelInstanceRegistrations[i].m_gui->setName(QString("%1:%2").arg(m_txChannelInstanceRegistrations[i].m_channelName).arg(i));
334  }
335 }
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
int32_t i
Definition: decimators.h:244
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveRxChannelSettings()

void DeviceUISet::saveRxChannelSettings ( Preset preset)

Definition at line 226 of file deviceuiset.cpp.

References Preset::addChannel(), i, Preset::isSourcePreset(), and m_rxChannelInstanceRegistrations.

Referenced by MainWindow::savePresetSettings().

227 {
228  if (preset->isSourcePreset())
229  {
230  qSort(m_rxChannelInstanceRegistrations.begin(), m_rxChannelInstanceRegistrations.end()); // sort by increasing delta frequency and type
231 
232  for(int i = 0; i < m_rxChannelInstanceRegistrations.count(); i++)
233  {
234  qDebug("DeviceUISet::saveRxChannelSettings: channel [%s] saved", qPrintable(m_rxChannelInstanceRegistrations[i].m_channelName));
235  preset->addChannel(m_rxChannelInstanceRegistrations[i].m_channelName, m_rxChannelInstanceRegistrations[i].m_gui->serialize());
236  }
237  }
238  else
239  {
240  qDebug("DeviceUISet::saveRxChannelSettings: not a source preset");
241  }
242 }
bool isSourcePreset() const
Definition: preset.h:66
void addChannel(const QString &channel, const QByteArray &config)
Definition: preset.h:85
int32_t i
Definition: decimators.h:244
ChannelInstanceRegistrations m_rxChannelInstanceRegistrations
Definition: deviceuiset.h:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTxChannelSettings()

void DeviceUISet::saveTxChannelSettings ( Preset preset)

Definition at line 303 of file deviceuiset.cpp.

References Preset::addChannel(), i, Preset::isSourcePreset(), and m_txChannelInstanceRegistrations.

Referenced by MainWindow::savePresetSettings().

304 {
305  if (preset->isSourcePreset())
306  {
307  qDebug("DeviceUISet::saveTxChannelSettings: not a sink preset");
308  }
309  else
310  {
311  qSort(m_txChannelInstanceRegistrations.begin(), m_txChannelInstanceRegistrations.end()); // sort by increasing delta frequency and type
312 
313  for(int i = 0; i < m_txChannelInstanceRegistrations.count(); i++)
314  {
315  qDebug("DeviceUISet::saveTxChannelSettings: channel [%s] saved", qPrintable(m_txChannelInstanceRegistrations[i].m_channelName));
316  preset->addChannel(m_txChannelInstanceRegistrations[i].m_channelName, m_txChannelInstanceRegistrations[i].m_gui->serialize());
317  }
318  }
319 }
bool isSourcePreset() const
Definition: preset.h:66
ChannelInstanceRegistrations m_txChannelInstanceRegistrations
Definition: deviceuiset.h:106
void addChannel(const QString &channel, const QByteArray &config)
Definition: preset.h:85
int32_t i
Definition: decimators.h:244
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNumberOfAvailableMIMOChannels()

void DeviceUISet::setNumberOfAvailableMIMOChannels ( int  number)
inline

Definition at line 79 of file deviceuiset.h.

79 { m_nbAvailableMIMOChannels = number; }
int m_nbAvailableMIMOChannels
Number of MIMO channels available for selection.
Definition: deviceuiset.h:110

◆ setNumberOfAvailableRxChannels()

void DeviceUISet::setNumberOfAvailableRxChannels ( int  number)
inline

Definition at line 77 of file deviceuiset.h.

77 { m_nbAvailableRxChannels = number; }
int m_nbAvailableRxChannels
Number of Rx channels available for selection.
Definition: deviceuiset.h:108

◆ setNumberOfAvailableTxChannels()

void DeviceUISet::setNumberOfAvailableTxChannels ( int  number)
inline

Definition at line 78 of file deviceuiset.h.

78 { m_nbAvailableTxChannels = number; }
int m_nbAvailableTxChannels
Number of Tx channels available for selection.
Definition: deviceuiset.h:109

Member Data Documentation

◆ m_channelWindow

ChannelWindow* DeviceUISet::m_channelWindow

◆ m_deviceAPI

DeviceAPI* DeviceUISet::m_deviceAPI

Definition at line 48 of file deviceuiset.h.

Referenced by AirspyGui::AirspyGui(), AirspyHFGui::AirspyHFGui(), Bladerf1InputGui::Bladerf1InputGui(), Bladerf1OutputGui::Bladerf1OutputGui(), BladeRF2InputGui::BladeRF2InputGui(), BladeRF2OutputGui::BladeRF2OutputGui(), MainWindow::channelAddClicked(), WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterGUI::devicesetChannelSettingsGet(), WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), WebAPIAdapterGUI::devicesetDeviceReportGet(), WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunGet(), WebAPIAdapterGUI::devicesetDeviceRunPost(), WebAPIAdapterGUI::devicesetDeviceSettingsGet(), WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), DeviceUISet(), FCDProGui::FCDProGui(), FCDProPlusGui::FCDProPlusGui(), FileInputGUI::FileInputGUI(), FileSinkGui::FileSinkGui(), FileSourceGUI::FileSourceGUI(), WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), HackRFInputGui::HackRFInputGui(), HackRFOutputGui::HackRFOutputGui(), KiwiSDRGui::KiwiSDRGui(), LimeSDRInputGUI::LimeSDRInputGUI(), LimeSDROutputGUI::LimeSDROutputGUI(), MainWindow::loadPresetSettings(), loadRxChannelSettings(), loadTxChannelSettings(), LocalInputGui::LocalInputGui(), LocalOutputGui::LocalOutputGui(), TestMIGui::on_spectrumSource_currentIndexChanged(), TestMIGui::on_streamIndex_currentIndexChanged(), PerseusGui::PerseusGui(), PlutoSDRInputGui::PlutoSDRInputGui(), PlutoSDROutputGUI::PlutoSDROutputGUI(), RemoteInputGui::RemoteInputGui(), RemoteOutputSinkGui::RemoteOutputSinkGui(), RemoteSourceGUI::RemoteSourceGUI(), RTLSDRGui::RTLSDRGui(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), MainWindow::sampleSourceChanged(), MainWindow::savePresetSettings(), SDRPlayGui::SDRPlayGui(), SoapySDRInputGui::SoapySDRInputGui(), SoapySDROutputGui::SoapySDROutputGui(), TestMIGui::TestMIGui(), TestSourceGui::TestSourceGui(), SDRPlayGui::updateStatus(), Bladerf1OutputGui::updateStatus(), KiwiSDRGui::updateStatus(), BladeRF2OutputGui::updateStatus(), LocalOutputGui::updateStatus(), PerseusGui::updateStatus(), FileSinkGui::updateStatus(), FCDProPlusGui::updateStatus(), Bladerf1InputGui::updateStatus(), AirspyGui::updateStatus(), PlutoSDROutputGUI::updateStatus(), BladeRF2InputGui::updateStatus(), AirspyHFGui::updateStatus(), XTRXOutputGUI::updateStatus(), FileInputGUI::updateStatus(), RTLSDRGui::updateStatus(), TestSourceGui::updateStatus(), HackRFOutputGui::updateStatus(), LimeSDROutputGUI::updateStatus(), PlutoSDRInputGui::updateStatus(), HackRFInputGui::updateStatus(), FCDProGui::updateStatus(), XTRXInputGUI::updateStatus(), TestMIGui::updateStatus(), LimeSDRInputGUI::updateStatus(), LocalInputGui::updateStatus(), RemoteInputGui::updateStatus(), SoapySDROutputGui::updateStatus(), SoapySDRInputGui::updateStatus(), RemoteOutputSinkGui::updateStatus(), XTRXInputGUI::XTRXInputGUI(), and XTRXOutputGUI::XTRXOutputGUI().

◆ m_deviceMIMOEngine

DSPDeviceMIMOEngine* DeviceUISet::m_deviceMIMOEngine

◆ m_deviceSinkEngine

DSPDeviceSinkEngine* DeviceUISet::m_deviceSinkEngine

◆ m_deviceSourceEngine

DSPDeviceSourceEngine* DeviceUISet::m_deviceSourceEngine

◆ m_deviceTabIndex

int DeviceUISet::m_deviceTabIndex
private

Definition at line 107 of file deviceuiset.h.

Referenced by DeviceUISet().

◆ m_mainWindowState

QByteArray DeviceUISet::m_mainWindowState

Definition at line 52 of file deviceuiset.h.

Referenced by MainWindow::tabInputViewIndexChanged().

◆ m_nbAvailableMIMOChannels

int DeviceUISet::m_nbAvailableMIMOChannels
private

Number of MIMO channels available for selection.

Definition at line 110 of file deviceuiset.h.

Referenced by DeviceUISet().

◆ m_nbAvailableRxChannels

int DeviceUISet::m_nbAvailableRxChannels
private

Number of Rx channels available for selection.

Definition at line 108 of file deviceuiset.h.

Referenced by DeviceUISet().

◆ m_nbAvailableTxChannels

int DeviceUISet::m_nbAvailableTxChannels
private

Number of Tx channels available for selection.

Definition at line 109 of file deviceuiset.h.

Referenced by DeviceUISet().

◆ m_rxChannelInstanceRegistrations

ChannelInstanceRegistrations DeviceUISet::m_rxChannelInstanceRegistrations
private

◆ m_samplingDeviceControl

SamplingDeviceControl* DeviceUISet::m_samplingDeviceControl

◆ m_spectrum

GLSpectrum* DeviceUISet::m_spectrum

◆ m_spectrumGUI

GLSpectrumGUI* DeviceUISet::m_spectrumGUI

◆ m_spectrumVis

SpectrumVis* DeviceUISet::m_spectrumVis

Definition at line 43 of file deviceuiset.h.

Referenced by DeviceUISet(), and ~DeviceUISet().

◆ m_txChannelInstanceRegistrations

ChannelInstanceRegistrations DeviceUISet::m_txChannelInstanceRegistrations
private

The documentation for this class was generated from the following files: