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.
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
DeviceAPI Class Reference

#include <deviceapi.h>

Inherits QObject.

+ Collaboration diagram for DeviceAPI:

Public Types

enum  StreamType { StreamSingleRx, StreamSingleTx, StreamMIMO }
 < This is the same enum as in PluginInterface More...
 
enum  EngineState {
  StNotStarted, StIdle, StReady, StRunning,
  StError
}
 

Public Member Functions

 DeviceAPI (StreamType streamType, int deviceTabIndex, DSPDeviceSourceEngine *deviceSourceEngine, DSPDeviceSinkEngine *deviceSinkEngine, DSPDeviceMIMOEngine *deviceMIMOEngine)
 
 ~DeviceAPI ()
 
void addSourceStream (bool connect)
 
void removeLastSourceStream ()
 
void addSinkStream (bool connect)
 
void removeLastSinkStream ()
 
void addAncillarySink (BasebandSampleSink *sink, unsigned int index=0)
 Adds a sink to receive full baseband and that is not a channel (e.g. spectrum) More...
 
void removeAncillarySink (BasebandSampleSink *sink, unsigned int index=0)
 Removes it. More...
 
void setSpectrumSinkInput (bool sourceElseSink=true, unsigned int index=0)
 Used in the MIMO case to select which stream is used as input to main spectrum. More...
 
void addChannelSink (ThreadedBasebandSampleSink *sink, int streamIndex=0)
 Add a channel sink (Rx) More...
 
void removeChannelSink (ThreadedBasebandSampleSink *sink, int streamIndex=0)
 Remove a channel sink (Rx) More...
 
void addChannelSource (ThreadedBasebandSampleSource *sink, int streamIndex=0)
 Add a channel source (Tx) More...
 
void removeChannelSource (ThreadedBasebandSampleSource *sink, int streamIndex=0)
 Remove a channel source (Tx) More...
 
void addChannelSinkAPI (ChannelAPI *channelAPI, int streamIndex=0)
 
void removeChannelSinkAPI (ChannelAPI *channelAPI, int streamIndex=0)
 
void addChannelSourceAPI (ChannelAPI *channelAPI, int streamIndex=0)
 
void removeChannelSourceAPI (ChannelAPI *channelAPI, int streamIndex=0)
 
void setSampleSource (DeviceSampleSource *source)
 Set the device sample source (single Rx) More...
 
void setSampleSink (DeviceSampleSink *sink)
 Set the device sample sink (single Tx) More...
 
void setSampleMIMO (DeviceSampleMIMO *mimo)
 Set the device sample MIMO. More...
 
DeviceSampleSourcegetSampleSource ()
 Return pointer to the device sample source (single Rx) or nullptr. More...
 
DeviceSampleSinkgetSampleSink ()
 Return pointer to the device sample sink (single Tx) or nullptr. More...
 
DeviceSampleMIMOgetSampleMIMO ()
 Return pointer to the device sample MIMO or nullptr. More...
 
bool initDeviceEngine ()
 Init the device engine corresponding to the stream type. More...
 
bool startDeviceEngine ()
 Start the device engine corresponding to the stream type. More...
 
void stopDeviceEngine ()
 Stop the device engine corresponding to the stream type. More...
 
EngineState state () const
 Return the state of the device engine corresponding to the stream type. More...
 
QString errorMessage ()
 Last error message from the device engine. More...
 
uint getDeviceUID () const
 Return the current device engine unique ID. More...
 
MessageQueuegetDeviceEngineInputMessageQueue ()
 Device engine message queue. More...
 
MessageQueuegetSamplingDeviceInputMessageQueue ()
 Sampling device (ex: single Rx) input message queue. More...
 
MessageQueuegetSamplingDeviceGUIMessageQueue ()
 Sampling device (ex: single Tx) GUI input message queue. More...
 
void configureCorrections (bool dcOffsetCorrection, bool iqImbalanceCorrection, int streamIndex=0)
 Configure current device engine DSP corrections (Rx) More...
 
void setHardwareId (const QString &id)
 
void setSamplingDeviceId (const QString &id)
 
void resetSamplingDeviceId ()
 
void setSamplingDeviceSerial (const QString &serial)
 
void setSamplingDeviceDisplayName (const QString &name)
 
void setSamplingDeviceSequence (int sequence)
 
void setHardwareUserArguments (const QString &userArguments)
 
void setSamplingDevicePluginInterface (PluginInterface *iface)
 
void setSamplingDevicePluginInstanceGUI (PluginInstanceGUI *gui)
 
const QString & getHardwareId () const
 
const QString & getSamplingDeviceId () const
 
const QString & getSamplingDeviceSerial () const
 
const QString & getSamplingDeviceDisplayName () const
 
uint32_t getSamplingDeviceSequence () const
 
const QString & getHardwareUserArguments () const
 
void setDeviceNbItems (uint32_t nbItems)
 
void setDeviceItemIndex (uint32_t index)
 
uint32_t getDeviceNbItems () const
 
uint32_t getDeviceItemIndex () const
 
int getDeviceSetIndex () const
 
PluginInterfacegetPluginInterface ()
 
PluginInstanceGUIgetSamplingDevicePluginInstanceGUI ()
 
void getDeviceEngineStateStr (QString &state)
 
ChannelAPIgetChanelSinkAPIAt (int index, int streamIndex=0)
 
ChannelAPIgetChanelSourceAPIAt (int index, int streamIndex=0)
 
int getNbSourceChannels () const
 
int getNbSinkChannels () const
 
void loadSamplingDeviceSettings (const Preset *preset)
 
void saveSamplingDeviceSettings (Preset *preset)
 
DSPDeviceSourceEnginegetDeviceSourceEngine ()
 
DSPDeviceSinkEnginegetDeviceSinkEngine ()
 
void addSourceBuddy (DeviceAPI *buddy)
 
void addSinkBuddy (DeviceAPI *buddy)
 
void removeSourceBuddy (DeviceAPI *buddy)
 
void removeSinkBuddy (DeviceAPI *buddy)
 
void clearBuddiesLists ()
 
void * getBuddySharedPtr () const
 
void setBuddySharedPtr (void *ptr)
 
bool isBuddyLeader () const
 
void setBuddyLeader (bool isBuddyLeader)
 
const std::vector< DeviceAPI * > & getSourceBuddies () const
 
const std::vector< DeviceAPI * > & getSinkBuddies () const
 
void setNbSourceStreams (uint32_t nbSourceStreams)
 
void setNbSinkStreams (uint32_t nbSinkStreams)
 
uint32_t getNbSourceStreams () const
 
uint32_t getNbSinkStreams () const
 
const QTimer & getMasterTimer () const
 This is the DSPEngine master timer. More...
 

Protected Attributes

StreamType m_streamType
 
int m_deviceTabIndex
 This is the tab index in the GUI and also the device set index. More...
 
QString m_hardwareId
 The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...) More...
 
uint32_t m_deviceNbItems
 Number of items in the physical device either Rx or Tx. Can be >1 for NxM devices (i.e. 2 for LimeSDR) More...
 
uint32_t m_deviceItemIndex
 The item index inb the Rx or Tx side of the physical device. Can be >0 for NxM devices (i.e. 0 or 1 for LimeSDR) More...
 
uint32_t m_nbSourceStreams
 The number of source streams in the logical device. 1 for Single Rx (SI) can be 0 or more for MIMO. More...
 
uint32_t m_nbSinkStreams
 The number of sink streams in the logical device. 1 for Single Tx (SO) can be 0 or more for MIMO. More...
 
PluginInterfacem_pluginInterface
 
const QTimer & m_masterTimer
 This is the DSPEngine master timer. More...
 
QString m_samplingDeviceId
 The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...) More...
 
QString m_samplingDeviceSerial
 The device serial number defined by the vendor or a fake one (SDRplay) More...
 
QString m_samplingDeviceDisplayName
 The human readable name identifying this instance. More...
 
uint32_t m_samplingDeviceSequence
 The device sequence. >0 when more than one device of the same type is connected. More...
 
QString m_hardwareUserArguments
 User given arguments to be used at hardware level i.e. for the hardware device and device sequence. More...
 
PluginInstanceGUIm_samplingDevicePluginInstanceUI
 
std::vector< DeviceAPI * > m_sourceBuddies
 Device source APIs referencing the same physical device. More...
 
std::vector< DeviceAPI * > m_sinkBuddies
 Device sink APIs referencing the same physical device. More...
 
void * m_buddySharedPtr
 
bool m_isBuddyLeader
 
DSPDeviceSourceEnginem_deviceSourceEngine
 
QList< ChannelAPI * > m_channelSinkAPIs
 
DSPDeviceSinkEnginem_deviceSinkEngine
 
QList< ChannelAPI * > m_channelSourceAPIs
 
DSPDeviceMIMOEnginem_deviceMIMOEngine
 

Private Member Functions

void renumerateChannels ()
 

Detailed Description

Definition at line 42 of file deviceapi.h.

Member Enumeration Documentation

◆ EngineState

Enumerator
StNotStarted 

engine is before initialization

StIdle 

engine is idle

StReady 

engine is ready to run

StRunning 

engine is running

StError 

engine is in error

Definition at line 52 of file deviceapi.h.

52  {
53  StNotStarted,
54  StIdle,
55  StReady,
56  StRunning,
57  StError
58  };
engine is before initialization
Definition: deviceapi.h:53
engine is idle
Definition: deviceapi.h:54
engine is running
Definition: deviceapi.h:56
engine is in error
Definition: deviceapi.h:57
engine is ready to run
Definition: deviceapi.h:55

◆ StreamType

< This is the same enum as in PluginInterface

Enumerator
StreamSingleRx 

Exposes a single input stream that can be one of the streams of a physical device.

StreamSingleTx 

Exposes a single output stream that can be one of the streams of a physical device.

StreamMIMO 

May expose any number of input and/or output streams.

Definition at line 45 of file deviceapi.h.

46  {
49  StreamMIMO
50  };
May expose any number of input and/or output streams.
Definition: deviceapi.h:49
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47

Constructor & Destructor Documentation

◆ DeviceAPI()

DeviceAPI::DeviceAPI ( StreamType  streamType,
int  deviceTabIndex,
DSPDeviceSourceEngine deviceSourceEngine,
DSPDeviceSinkEngine deviceSinkEngine,
DSPDeviceMIMOEngine deviceMIMOEngine 
)

Definition at line 32 of file deviceapi.cpp.

38  :
39  m_streamType(streamType),
40  m_deviceTabIndex(deviceTabIndex),
41  m_deviceNbItems(1),
44  m_nbSinkStreams(0),
45  m_pluginInterface(nullptr),
49  m_buddySharedPtr(nullptr),
50  m_isBuddyLeader(false),
51  m_deviceSourceEngine(deviceSourceEngine),
52  m_deviceSinkEngine(deviceSinkEngine),
53  m_deviceMIMOEngine(deviceMIMOEngine)
54 {
55 }
const QTimer & m_masterTimer
This is the DSPEngine master timer.
Definition: deviceapi.h:186
uint32_t m_deviceNbItems
Number of items in the physical device either Rx or Tx. Can be >1 for NxM devices (i...
Definition: deviceapi.h:181
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
int m_deviceTabIndex
This is the tab index in the GUI and also the device set index.
Definition: deviceapi.h:179
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
Definition: deviceapi.h:173
PluginInstanceGUI * m_samplingDevicePluginInstanceUI
Definition: deviceapi.h:192
uint32_t m_deviceItemIndex
The item index inb the Rx or Tx side of the physical device. Can be >0 for NxM devices (i...
Definition: deviceapi.h:182
PluginInterface * m_pluginInterface
Definition: deviceapi.h:185
uint32_t m_nbSourceStreams
The number of source streams in the logical device. 1 for Single Rx (SI) can be 0 or more for MIMO...
Definition: deviceapi.h:183
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void * m_buddySharedPtr
Definition: deviceapi.h:198
static DSPEngine * instance()
Definition: dspengine.cpp:51
uint32_t m_nbSinkStreams
The number of sink streams in the logical device. 1 for Single Tx (SO) can be 0 or more for MIMO...
Definition: deviceapi.h:184
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
StreamType m_streamType
Definition: deviceapi.h:178
bool m_isBuddyLeader
Definition: deviceapi.h:199
uint32_t m_samplingDeviceSequence
The device sequence. >0 when more than one device of the same type is connected.
Definition: deviceapi.h:190

◆ ~DeviceAPI()

DeviceAPI::~DeviceAPI ( )

Definition at line 57 of file deviceapi.cpp.

58 {
59 }

Member Function Documentation

◆ addAncillarySink()

void DeviceAPI::addAncillarySink ( BasebandSampleSink sink,
unsigned int  index = 0 
)

Adds a sink to receive full baseband and that is not a channel (e.g. spectrum)

Definition at line 89 of file deviceapi.cpp.

References DSPDeviceMIMOEngine::addAncillarySink(), DSPDeviceSourceEngine::addSink(), DSPDeviceSinkEngine::addSpectrumSink(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by AirspyHFInput::AirspyHFInput(), AirspyInput::AirspyInput(), TestMI::init(), and RTLSDRInput::RTLSDRInput().

90 {
93  } else if (m_deviceSinkEngine) {
95  } else if (m_deviceMIMOEngine) {
97  }
98 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void addSink(BasebandSampleSink *sink)
Add a sample sink.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
void addSpectrumSink(BasebandSampleSink *spectrumSink)
Add a spectrum vis baseband sample sink.
void addAncillarySink(BasebandSampleSink *sink, int index=0)
Add an ancillary sink like a I/Q recorder.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChannelSink()

void DeviceAPI::addChannelSink ( ThreadedBasebandSampleSink sink,
int  streamIndex = 0 
)

Add a channel sink (Rx)

Definition at line 118 of file deviceapi.cpp.

References DSPDeviceMIMOEngine::addChannelSink(), DSPDeviceSourceEngine::addThreadedSink(), m_deviceMIMOEngine, and m_deviceSourceEngine.

Referenced by AMDemod::AMDemod(), AMDemod::applySettings(), ATVDemod::ATVDemod(), BFMDemod::BFMDemod(), ChannelAnalyzer::ChannelAnalyzer(), DSDDemod::DSDDemod(), FreeDVDemod::FreeDVDemod(), FreqTracker::FreqTracker(), LocalSink::LocalSink(), LoRaDemod::LoRaDemod(), RemoteSink::RemoteSink(), SSBDemod::SSBDemod(), UDPSink::UDPSink(), and WFMDemod::WFMDemod().

119 {
120  if (m_deviceSourceEngine) {
122  } else if (m_deviceMIMOEngine) {
123  m_deviceMIMOEngine->addChannelSink(sink, streamIndex);
124  }
125 }
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
void addChannelSink(ThreadedBasebandSampleSink *sink, int index=0)
Add a channel sink that will run on its own thread.
void addThreadedSink(ThreadedBasebandSampleSink *sink)
Add a sample sink that will run on its own thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChannelSinkAPI()

void DeviceAPI::addChannelSinkAPI ( ChannelAPI channelAPI,
int  streamIndex = 0 
)

Definition at line 156 of file deviceapi.cpp.

References m_channelSinkAPIs, and renumerateChannels().

Referenced by AMDemod::AMDemod(), AMDemod::applySettings(), ATVDemod::ATVDemod(), BFMDemod::BFMDemod(), ChannelAnalyzer::ChannelAnalyzer(), DSDDemod::DSDDemod(), FreeDVDemod::FreeDVDemod(), FreqTracker::FreqTracker(), LocalSink::LocalSink(), LoRaDemod::LoRaDemod(), RemoteSink::RemoteSink(), SSBDemod::SSBDemod(), UDPSink::UDPSink(), and WFMDemod::WFMDemod().

157 {
158  (void) streamIndex;
159  m_channelSinkAPIs.append(channelAPI);
161 }
void renumerateChannels()
Definition: deviceapi.cpp:773
QList< ChannelAPI * > m_channelSinkAPIs
Definition: deviceapi.h:204
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChannelSource()

void DeviceAPI::addChannelSource ( ThreadedBasebandSampleSource sink,
int  streamIndex = 0 
)

Add a channel source (Tx)

Definition at line 138 of file deviceapi.cpp.

References DSPDeviceSinkEngine::addThreadedSource(), and m_deviceSinkEngine.

Referenced by AMMod::AMMod(), ATVMod::ATVMod(), FileSource::FileSource(), FreeDVMod::FreeDVMod(), LocalSource::LocalSource(), NFMMod::NFMMod(), RemoteSource::RemoteSource(), SSBMod::SSBMod(), UDPSource::UDPSource(), and WFMMod::WFMMod().

139 {
140  (void) streamIndex;
141 
142  if (m_deviceSinkEngine) {
144  }
145 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
void addThreadedSource(ThreadedBasebandSampleSource *source)
Add a baseband sample source that will run on its own thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addChannelSourceAPI()

void DeviceAPI::addChannelSourceAPI ( ChannelAPI channelAPI,
int  streamIndex = 0 
)

Definition at line 174 of file deviceapi.cpp.

References m_channelSourceAPIs, and renumerateChannels().

Referenced by AMMod::AMMod(), ATVMod::ATVMod(), FileSource::FileSource(), FreeDVMod::FreeDVMod(), LocalSource::LocalSource(), NFMMod::NFMMod(), RemoteSource::RemoteSource(), SSBMod::SSBMod(), UDPSource::UDPSource(), and WFMMod::WFMMod().

175 {
176  (void) streamIndex;
177  m_channelSourceAPIs.append(channelAPI);
179 }
QList< ChannelAPI * > m_channelSourceAPIs
Definition: deviceapi.h:209
void renumerateChannels()
Definition: deviceapi.cpp:773
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSinkBuddy()

void DeviceAPI::addSinkBuddy ( DeviceAPI buddy)

Definition at line 646 of file deviceapi.cpp.

References getHardwareId(), getSamplingDeviceSerial(), m_sinkBuddies, m_sourceBuddies, m_streamType, StreamSingleRx, and StreamSingleTx.

647 {
648  if (buddy->m_streamType != StreamSingleTx)
649  {
650  qDebug("DeviceAPI::addSinkBuddy: buddy %s(%s) is not of single Tx type",
651  qPrintable(buddy->getHardwareId()),
652  qPrintable(buddy->getSamplingDeviceSerial()));
653  return;
654  }
655 
656  m_sinkBuddies.push_back(buddy);
657 
658  if (m_streamType == StreamSingleRx) {
659  buddy->m_sourceBuddies.push_back(this); // this is a source
660  } else if (m_streamType == StreamSingleTx) {
661  buddy->m_sinkBuddies.push_back(this); // this is a sink
662  } else {
663  qDebug("DeviceAPI::addSinkBuddy: not relevant if this is not a single Rx or Tx");
664  return;
665  }
666 
667  qDebug("DeviceAPI::addSinkBuddy: added buddy %s(%s) [%llu] <-> [%llu]",
668  qPrintable(buddy->getHardwareId()),
669  qPrintable(buddy->getSamplingDeviceSerial()),
670  (quint64) buddy,
671  (quint64) this);
672 }
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47
const QString & getSamplingDeviceSerial() const
Definition: deviceapi.h:121
std::vector< DeviceAPI * > m_sourceBuddies
Device source APIs referencing the same physical device.
Definition: deviceapi.h:196
StreamType m_streamType
Definition: deviceapi.h:178
const QString & getHardwareId() const
Definition: deviceapi.h:119
std::vector< DeviceAPI * > m_sinkBuddies
Device sink APIs referencing the same physical device.
Definition: deviceapi.h:197
+ Here is the call graph for this function:

◆ addSinkStream()

void DeviceAPI::addSinkStream ( bool  connect)

Definition at line 75 of file deviceapi.cpp.

References DSPDeviceMIMOEngine::addSinkStream(), and m_deviceMIMOEngine.

76 {
77  if (m_deviceMIMOEngine) {
79  }
80 }
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
void addSinkStream(bool connect)
+ Here is the call graph for this function:

◆ addSourceBuddy()

void DeviceAPI::addSourceBuddy ( DeviceAPI buddy)

Definition at line 617 of file deviceapi.cpp.

References getHardwareId(), getSamplingDeviceSerial(), m_sinkBuddies, m_sourceBuddies, m_streamType, StreamSingleRx, and StreamSingleTx.

618 {
619  if (buddy->m_streamType != StreamSingleRx)
620  {
621  qDebug("DeviceAPI::addSourceBuddy: buddy %s(%s) is not of single Rx type",
622  qPrintable(buddy->getHardwareId()),
623  qPrintable(buddy->getSamplingDeviceSerial()));
624  return;
625  }
626 
627  m_sourceBuddies.push_back(buddy);
628 
629  if (m_streamType == StreamSingleRx) {
630  buddy->m_sourceBuddies.push_back(this); // this is a source
631  } else if (m_streamType == StreamSingleTx) {
632  buddy->m_sinkBuddies.push_back(this); // this is a sink
633  } else {
634  qDebug("DeviceAPI::addSourceBuddy: not relevant if this is not a single Rx or Tx");
635  return;
636  }
637 
638  qDebug("DeviceAPI::addSourceBuddy: added buddy %s(%s) [%llu] <-> [%llu]",
639  qPrintable(buddy->getHardwareId()),
640  qPrintable(buddy->getSamplingDeviceSerial()),
641  (quint64) buddy,
642  (quint64) this);
643 }
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47
const QString & getSamplingDeviceSerial() const
Definition: deviceapi.h:121
std::vector< DeviceAPI * > m_sourceBuddies
Device source APIs referencing the same physical device.
Definition: deviceapi.h:196
StreamType m_streamType
Definition: deviceapi.h:178
const QString & getHardwareId() const
Definition: deviceapi.h:119
std::vector< DeviceAPI * > m_sinkBuddies
Device sink APIs referencing the same physical device.
Definition: deviceapi.h:197
+ Here is the call graph for this function:

◆ addSourceStream()

void DeviceAPI::addSourceStream ( bool  connect)

Definition at line 61 of file deviceapi.cpp.

References DSPDeviceMIMOEngine::addSourceStream(), and m_deviceMIMOEngine.

62 {
63  if (m_deviceMIMOEngine) {
65  }
66 }
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
void addSourceStream(bool connect)
+ Here is the call graph for this function:

◆ clearBuddiesLists()

void DeviceAPI::clearBuddiesLists ( )

Definition at line 740 of file deviceapi.cpp.

References isBuddyLeader(), m_sinkBuddies, and m_sourceBuddies.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

741 {
742  std::vector<DeviceAPI*>::iterator itSource = m_sourceBuddies.begin();
743  std::vector<DeviceAPI*>::iterator itSink = m_sinkBuddies.begin();
744  bool leaderElected = false;
745 
746  for (;itSource != m_sourceBuddies.end(); ++itSource)
747  {
748  if (isBuddyLeader() && !leaderElected)
749  {
750  (*itSource)->setBuddyLeader(true);
751  leaderElected = true;
752  }
753 
754  (*itSource)->removeSinkBuddy(this);
755  }
756 
757  m_sourceBuddies.clear();
758 
759  for (;itSink != m_sinkBuddies.end(); ++itSink)
760  {
761  if (isBuddyLeader() && !leaderElected)
762  {
763  (*itSink)->setBuddyLeader(true);
764  leaderElected = true;
765  }
766 
767  (*itSink)->removeSinkBuddy(this);
768  }
769 
770  m_sinkBuddies.clear();
771 }
bool isBuddyLeader() const
Definition: deviceapi.h:163
std::vector< DeviceAPI * > m_sourceBuddies
Device source APIs referencing the same physical device.
Definition: deviceapi.h:196
std::vector< DeviceAPI * > m_sinkBuddies
Device sink APIs referencing the same physical device.
Definition: deviceapi.h:197
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configureCorrections()

void DeviceAPI::configureCorrections ( bool  dcOffsetCorrection,
bool  iqImbalanceCorrection,
int  streamIndex = 0 
)

Configure current device engine DSP corrections (Rx)

Definition at line 355 of file deviceapi.cpp.

References DSPDeviceSourceEngine::configureCorrections(), DSPDeviceMIMOEngine::configureCorrections(), m_deviceMIMOEngine, and m_deviceSourceEngine.

Referenced by TestSourceInput::applySettings(), Bladerf1Input::applySettings(), AirspyInput::applySettings(), AirspyHFInput::applySettings(), TestMI::applySettings(), RTLSDRInput::applySettings(), PlutoSDRInput::applySettings(), HackRFInput::applySettings(), FCDProPlusInput::applySettings(), KiwiSDRInput::applySettings(), LocalInput::applySettings(), FCDProInput::applySettings(), SDRPlayInput::applySettings(), BladeRF2Input::applySettings(), SoapySDRInput::applySettings(), XTRXInput::applySettings(), LimeSDRInput::applySettings(), and RemoteInput::applySettings().

356 {
357  if (m_deviceSourceEngine) {
358  m_deviceSourceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
359  } else if (m_deviceMIMOEngine) {
360  m_deviceMIMOEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection, streamIndex);
361  }
362 }
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
Configure DSP corrections.
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection, int isource)
Configure source DSP corrections.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ errorMessage()

QString DeviceAPI::errorMessage ( )

Last error message from the device engine.

Definition at line 290 of file deviceapi.cpp.

References DSPDeviceSourceEngine::errorMessage(), DSPDeviceSinkEngine::errorMessage(), DSPDeviceMIMOEngine::errorMessage(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by SDRPlayGui::updateStatus(), KiwiSDRGui::updateStatus(), Bladerf1OutputGui::updateStatus(), BladeRF2OutputGui::updateStatus(), PerseusGui::updateStatus(), LocalOutputGui::updateStatus(), FCDProPlusGui::updateStatus(), FileSinkGui::updateStatus(), Bladerf1InputGui::updateStatus(), PlutoSDROutputGUI::updateStatus(), AirspyGui::updateStatus(), AirspyHFGui::updateStatus(), BladeRF2InputGui::updateStatus(), FileInputGUI::updateStatus(), XTRXOutputGUI::updateStatus(), TestSourceGui::updateStatus(), RTLSDRGui::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(), and RemoteOutputSinkGui::updateStatus().

291 {
292  if (m_deviceSourceEngine) {
294  } else if (m_deviceSinkEngine) {
296  } else if (m_deviceMIMOEngine) {
298  } else {
299  return "Not implemented";
300  }
301 }
QString errorMessage()
Return the current error message.
QString errorMessage()
Return the current error message.
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
QString errorMessage()
Return the current error message.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBuddySharedPtr()

void* DeviceAPI::getBuddySharedPtr ( ) const
inline

◆ getChanelSinkAPIAt()

ChannelAPI * DeviceAPI::getChanelSinkAPIAt ( int  index,
int  streamIndex = 0 
)

Definition at line 445 of file deviceapi.cpp.

References m_channelSinkAPIs, m_streamType, and StreamSingleRx.

Referenced by WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterGUI::devicesetChannelSettingsGet(), WebAPIAdapterSrv::devicesetChannelSettingsGet(), WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), WebAPIAdapterSrv::devicesetChannelSettingsPutPatch(), WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterSrv::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

446 {
447  (void) streamIndex;
448 
450  {
451  if (index < m_channelSinkAPIs.size()) {
452  return m_channelSinkAPIs.at(index);
453  } else {
454  return nullptr;
455  }
456  }
457  else // TODO: not implemented
458  {
459  return nullptr;
460  }
461 }
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47
StreamType m_streamType
Definition: deviceapi.h:178
QList< ChannelAPI * > m_channelSinkAPIs
Definition: deviceapi.h:204
+ Here is the caller graph for this function:

◆ getChanelSourceAPIAt()

ChannelAPI * DeviceAPI::getChanelSourceAPIAt ( int  index,
int  streamIndex = 0 
)

Definition at line 463 of file deviceapi.cpp.

References m_channelSourceAPIs, m_streamType, and StreamSingleTx.

Referenced by WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterGUI::devicesetChannelSettingsGet(), WebAPIAdapterSrv::devicesetChannelSettingsGet(), WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), WebAPIAdapterSrv::devicesetChannelSettingsPutPatch(), WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterSrv::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

464 {
465  (void) streamIndex;
466 
468  {
469  if (index < m_channelSourceAPIs.size()) {
470  return m_channelSourceAPIs.at(index);
471  } else {
472  return nullptr;
473  }
474  }
475  else // TODO: not implemented
476  {
477  return nullptr;
478  }
479 }
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
QList< ChannelAPI * > m_channelSourceAPIs
Definition: deviceapi.h:209
StreamType m_streamType
Definition: deviceapi.h:178
+ Here is the caller graph for this function:

◆ getDeviceEngineInputMessageQueue()

MessageQueue * DeviceAPI::getDeviceEngineInputMessageQueue ( )

Device engine message queue.

Definition at line 316 of file deviceapi.cpp.

References DSPDeviceSourceEngine::getInputMessageQueue(), DSPDeviceSinkEngine::getInputMessageQueue(), DSPDeviceMIMOEngine::getInputMessageQueue(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by PlutoSDROutput::applySettings(), TestSourceInput::applySettings(), Bladerf1Output::applySettings(), HackRFOutput::applySettings(), Bladerf1Input::applySettings(), PerseusInput::applySettings(), AirspyInput::applySettings(), AirspyHFInput::applySettings(), TestMI::applySettings(), RTLSDRInput::applySettings(), PlutoSDRInput::applySettings(), BladeRF2Output::applySettings(), FCDProPlusInput::applySettings(), HackRFInput::applySettings(), KiwiSDRInput::applySettings(), FCDProInput::applySettings(), RemoteOutput::applySettings(), SDRPlayInput::applySettings(), SoapySDROutput::applySettings(), BladeRF2Input::applySettings(), FileSinkOutput::applySettings(), SoapySDRInput::applySettings(), XTRXOutput::applySettings(), LimeSDROutput::applySettings(), LimeSDRInput::applySettings(), HackRFOutput::handleMessage(), BladeRF2Output::handleMessage(), HackRFInput::handleMessage(), BladeRF2Input::handleMessage(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), FileInput::init(), RemoteInputUDPHandler::processData(), LocalOutput::setCenterFrequency(), LocalInput::setCenterFrequency(), LocalOutput::setSampleRate(), and LocalInput::setSampleRate().

317 {
318  if (m_deviceSourceEngine) {
320  } else if (m_deviceSinkEngine) {
322  } else if (m_deviceMIMOEngine) {
324  } else {
325  return nullptr;
326  }
327 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
MessageQueue * getInputMessageQueue()
MessageQueue * getInputMessageQueue()
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
MessageQueue * getInputMessageQueue()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDeviceEngineStateStr()

void DeviceAPI::getDeviceEngineStateStr ( QString &  state)

Definition at line 389 of file deviceapi.cpp.

References m_deviceSinkEngine, m_deviceSourceEngine, DSPDeviceSourceEngine::state(), DSPDeviceSinkEngine::state(), DSPDeviceSourceEngine::StError, DSPDeviceSinkEngine::StError, DSPDeviceSourceEngine::StIdle, DSPDeviceSinkEngine::StIdle, DSPDeviceSourceEngine::StNotStarted, DSPDeviceSinkEngine::StNotStarted, DSPDeviceSourceEngine::StReady, DSPDeviceSinkEngine::StReady, DSPDeviceSourceEngine::StRunning, and DSPDeviceSinkEngine::StRunning.

Referenced by WebAPIAdapterGUI::getDeviceSet(), WebAPIAdapterSrv::getDeviceSet(), PlutoSDROutput::webapiRun(), PlutoSDRInput::webapiRun(), Bladerf1Output::webapiRun(), HackRFOutput::webapiRun(), FCDProPlusInput::webapiRun(), TestSourceInput::webapiRun(), AirspyInput::webapiRun(), Bladerf1Input::webapiRun(), PerseusInput::webapiRun(), RTLSDRInput::webapiRun(), AirspyHFInput::webapiRun(), TestMI::webapiRun(), FCDProInput::webapiRun(), LocalOutput::webapiRun(), BladeRF2Output::webapiRun(), HackRFInput::webapiRun(), KiwiSDRInput::webapiRun(), LocalInput::webapiRun(), RemoteOutput::webapiRun(), SDRPlayInput::webapiRun(), SoapySDROutput::webapiRun(), BladeRF2Input::webapiRun(), FileSinkOutput::webapiRun(), SoapySDRInput::webapiRun(), XTRXOutput::webapiRun(), LimeSDROutput::webapiRun(), XTRXInput::webapiRun(), LimeSDRInput::webapiRun(), RemoteInput::webapiRun(), FileInput::webapiRun(), PlutoSDROutput::webapiRunGet(), PlutoSDRInput::webapiRunGet(), Bladerf1Output::webapiRunGet(), HackRFOutput::webapiRunGet(), FCDProPlusInput::webapiRunGet(), TestSourceInput::webapiRunGet(), AirspyInput::webapiRunGet(), Bladerf1Input::webapiRunGet(), PerseusInput::webapiRunGet(), RTLSDRInput::webapiRunGet(), AirspyHFInput::webapiRunGet(), TestMI::webapiRunGet(), FCDProInput::webapiRunGet(), LocalOutput::webapiRunGet(), BladeRF2Output::webapiRunGet(), HackRFInput::webapiRunGet(), KiwiSDRInput::webapiRunGet(), LocalInput::webapiRunGet(), RemoteOutput::webapiRunGet(), SDRPlayInput::webapiRunGet(), SoapySDROutput::webapiRunGet(), BladeRF2Input::webapiRunGet(), FileSinkOutput::webapiRunGet(), SoapySDRInput::webapiRunGet(), XTRXOutput::webapiRunGet(), LimeSDROutput::webapiRunGet(), XTRXInput::webapiRunGet(), LimeSDRInput::webapiRunGet(), RemoteInput::webapiRunGet(), and FileInput::webapiRunGet().

390 {
392  {
393  switch(m_deviceSourceEngine->state())
394  {
396  state = "notStarted";
397  break;
399  state = "idle";
400  break;
402  state = "ready";
403  break;
405  state = "running";
406  break;
408  state = "error";
409  break;
410  default:
411  state = "notStarted";
412  break;
413  }
414  }
415  else if (m_deviceSinkEngine)
416  {
417  switch(m_deviceSinkEngine->state())
418  {
420  state = "notStarted";
421  break;
423  state = "idle";
424  break;
426  state = "ready";
427  break;
429  state = "running";
430  break;
432  state = "error";
433  break;
434  default:
435  state = "notStarted";
436  break;
437  }
438  }
439  else
440  {
441  state = "notStarted";
442  }
443 }
engine is before initialization
engine is ready to run
engine is before initialization
State state() const
Return DSP engine current state.
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
EngineState state() const
Return the state of the device engine corresponding to the stream type.
Definition: deviceapi.cpp:277
State state() const
Return DSP engine current state.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDeviceItemIndex()

uint32_t DeviceAPI::getDeviceItemIndex ( ) const
inline

◆ getDeviceNbItems()

uint32_t DeviceAPI::getDeviceNbItems ( ) const
inline

Definition at line 128 of file deviceapi.h.

Referenced by WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

128 { return m_deviceNbItems; }
uint32_t m_deviceNbItems
Number of items in the physical device either Rx or Tx. Can be >1 for NxM devices (i...
Definition: deviceapi.h:181
+ Here is the caller graph for this function:

◆ getDeviceSetIndex()

int DeviceAPI::getDeviceSetIndex ( ) const
inline

Definition at line 131 of file deviceapi.h.

Referenced by Bladerf1Output::webapiReverseSendSettings(), PlutoSDROutput::webapiReverseSendSettings(), TestSourceInput::webapiReverseSendSettings(), HackRFOutput::webapiReverseSendSettings(), Bladerf1Input::webapiReverseSendSettings(), PerseusInput::webapiReverseSendSettings(), LocalOutput::webapiReverseSendSettings(), AirspyInput::webapiReverseSendSettings(), AirspyHFInput::webapiReverseSendSettings(), TestMI::webapiReverseSendSettings(), RTLSDRInput::webapiReverseSendSettings(), PlutoSDRInput::webapiReverseSendSettings(), FCDProPlusInput::webapiReverseSendSettings(), HackRFInput::webapiReverseSendSettings(), BladeRF2Output::webapiReverseSendSettings(), KiwiSDRInput::webapiReverseSendSettings(), LocalInput::webapiReverseSendSettings(), FCDProInput::webapiReverseSendSettings(), RemoteOutput::webapiReverseSendSettings(), SDRPlayInput::webapiReverseSendSettings(), BladeRF2Input::webapiReverseSendSettings(), SoapySDROutput::webapiReverseSendSettings(), SoapySDRInput::webapiReverseSendSettings(), XTRXOutput::webapiReverseSendSettings(), LimeSDROutput::webapiReverseSendSettings(), XTRXInput::webapiReverseSendSettings(), LimeSDRInput::webapiReverseSendSettings(), RemoteInput::webapiReverseSendSettings(), FileInput::webapiReverseSendSettings(), Bladerf1Output::webapiReverseSendStartStop(), TestSourceInput::webapiReverseSendStartStop(), PlutoSDROutput::webapiReverseSendStartStop(), HackRFOutput::webapiReverseSendStartStop(), Bladerf1Input::webapiReverseSendStartStop(), PerseusInput::webapiReverseSendStartStop(), LocalOutput::webapiReverseSendStartStop(), AirspyInput::webapiReverseSendStartStop(), TestMI::webapiReverseSendStartStop(), AirspyHFInput::webapiReverseSendStartStop(), RTLSDRInput::webapiReverseSendStartStop(), PlutoSDRInput::webapiReverseSendStartStop(), FCDProPlusInput::webapiReverseSendStartStop(), HackRFInput::webapiReverseSendStartStop(), BladeRF2Output::webapiReverseSendStartStop(), KiwiSDRInput::webapiReverseSendStartStop(), LocalInput::webapiReverseSendStartStop(), FCDProInput::webapiReverseSendStartStop(), RemoteOutput::webapiReverseSendStartStop(), SDRPlayInput::webapiReverseSendStartStop(), BladeRF2Input::webapiReverseSendStartStop(), SoapySDROutput::webapiReverseSendStartStop(), SoapySDRInput::webapiReverseSendStartStop(), XTRXOutput::webapiReverseSendStartStop(), LimeSDROutput::webapiReverseSendStartStop(), XTRXInput::webapiReverseSendStartStop(), LimeSDRInput::webapiReverseSendStartStop(), RemoteInput::webapiReverseSendStartStop(), and FileInput::webapiReverseSendStartStop().

131 { return m_deviceTabIndex; }
int m_deviceTabIndex
This is the tab index in the GUI and also the device set index.
Definition: deviceapi.h:179
+ Here is the caller graph for this function:

◆ getDeviceSinkEngine()

DSPDeviceSinkEngine* DeviceAPI::getDeviceSinkEngine ( )
inline

Definition at line 154 of file deviceapi.h.

Referenced by Bladerf1Input::applySettings().

154 { return m_deviceSinkEngine; }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
+ Here is the caller graph for this function:

◆ getDeviceSourceEngine()

DSPDeviceSourceEngine* DeviceAPI::getDeviceSourceEngine ( )
inline

Definition at line 153 of file deviceapi.h.

Referenced by Bladerf1Output::applySettings().

153 { return m_deviceSourceEngine; }
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
+ Here is the caller graph for this function:

◆ getDeviceUID()

uint DeviceAPI::getDeviceUID ( ) const

Return the current device engine unique ID.

Definition at line 303 of file deviceapi.cpp.

References DSPDeviceSourceEngine::getUID(), DSPDeviceSinkEngine::getUID(), DSPDeviceMIMOEngine::getUID(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by AirspyHFInput::AirspyHFInput(), AirspyInput::AirspyInput(), TestSourceInput::handleMessage(), PerseusInput::handleMessage(), AirspyInput::handleMessage(), RTLSDRInput::handleMessage(), AirspyHFInput::handleMessage(), Bladerf1Input::handleMessage(), PlutoSDRInput::handleMessage(), TestMI::handleMessage(), FCDProInput::handleMessage(), FCDProPlusInput::handleMessage(), HackRFInput::handleMessage(), KiwiSDRInput::handleMessage(), LocalInput::handleMessage(), SDRPlayInput::handleMessage(), BladeRF2Input::handleMessage(), SoapySDRInput::handleMessage(), LimeSDRInput::handleMessage(), RemoteInput::handleMessage(), TestMI::init(), LimeSDROutputGUI::LimeSDROutputGUI(), and RTLSDRInput::RTLSDRInput().

304 {
305  if (m_deviceSourceEngine) {
306  return m_deviceSourceEngine->getUID();
307  } else if (m_deviceSinkEngine) {
308  return m_deviceSinkEngine->getUID();
309  } else if (m_deviceMIMOEngine) {
310  return m_deviceMIMOEngine->getUID();
311  } else {
312  return 0;
313  }
314 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
uint32_t getUID() const
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHardwareId()

const QString& DeviceAPI::getHardwareId ( ) const
inline

◆ getHardwareUserArguments()

const QString& DeviceAPI::getHardwareUserArguments ( ) const
inline

Definition at line 124 of file deviceapi.h.

Referenced by SoapySDROutput::openDevice(), and SoapySDRInput::openDevice().

124 { return m_hardwareUserArguments; }
QString m_hardwareUserArguments
User given arguments to be used at hardware level i.e. for the hardware device and device sequence...
Definition: deviceapi.h:191
+ Here is the caller graph for this function:

◆ getMasterTimer()

const QTimer& DeviceAPI::getMasterTimer ( ) const
inline

This is the DSPEngine master timer.

Definition at line 173 of file deviceapi.h.

Referenced by FileInputGUI::FileInputGUI(), FileSinkGui::FileSinkGui(), FileSourceGUI::FileSourceGUI(), RemoteOutputSinkGui::RemoteOutputSinkGui(), and RemoteSourceGUI::RemoteSourceGUI().

+ Here is the caller graph for this function:

◆ getNbSinkChannels()

int DeviceAPI::getNbSinkChannels ( ) const
inline

Definition at line 144 of file deviceapi.h.

Referenced by WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterSrv::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

144 { return m_channelSinkAPIs.size(); }
QList< ChannelAPI * > m_channelSinkAPIs
Definition: deviceapi.h:204
+ Here is the caller graph for this function:

◆ getNbSinkStreams()

uint32_t DeviceAPI::getNbSinkStreams ( ) const
inline

Definition at line 171 of file deviceapi.h.

171 { return m_nbSinkStreams; }
uint32_t m_nbSinkStreams
The number of sink streams in the logical device. 1 for Single Tx (SO) can be 0 or more for MIMO...
Definition: deviceapi.h:184

◆ getNbSourceChannels()

int DeviceAPI::getNbSourceChannels ( ) const
inline

Definition at line 143 of file deviceapi.h.

Referenced by WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterSrv::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

143 { return m_channelSourceAPIs.size(); }
QList< ChannelAPI * > m_channelSourceAPIs
Definition: deviceapi.h:209
+ Here is the caller graph for this function:

◆ getNbSourceStreams()

uint32_t DeviceAPI::getNbSourceStreams ( ) const
inline

Definition at line 170 of file deviceapi.h.

Referenced by AMDemod::getNumberOfDeviceStreams().

170 { return m_nbSourceStreams; }
uint32_t m_nbSourceStreams
The number of source streams in the logical device. 1 for Single Rx (SI) can be 0 or more for MIMO...
Definition: deviceapi.h:183
+ Here is the caller graph for this function:

◆ getPluginInterface()

PluginInterface* DeviceAPI::getPluginInterface ( )
inline

Definition at line 132 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

132 { return m_pluginInterface; }
PluginInterface * m_pluginInterface
Definition: deviceapi.h:185
+ Here is the caller graph for this function:

◆ getSampleMIMO()

DeviceSampleMIMO * DeviceAPI::getSampleMIMO ( )

Return pointer to the device sample MIMO or nullptr.

Definition at line 231 of file deviceapi.cpp.

References DSPDeviceMIMOEngine::getMIMO(), and m_deviceMIMOEngine.

Referenced by AMDemod::applySettings(), MainWindow::sampleMIMOChanged(), and TestMIGui::TestMIGui().

232 {
233  if (m_deviceMIMOEngine) {
234  return m_deviceMIMOEngine->getMIMO();
235  } else {
236  return nullptr;
237  }
238 }
DeviceSampleMIMO * getMIMO()
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSampleSink()

DeviceSampleSink * DeviceAPI::getSampleSink ( )

Return pointer to the device sample sink (single Tx) or nullptr.

Definition at line 222 of file deviceapi.cpp.

References DSPDeviceSinkEngine::getSink(), and m_deviceSinkEngine.

Referenced by Bladerf1OutputGui::Bladerf1OutputGui(), BladeRF2OutputGui::BladeRF2OutputGui(), MainCore::changeSampleSink(), WebAPIAdapterGUI::devicesetDeviceReportGet(), WebAPIAdapterSrv::devicesetDeviceReportGet(), WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunGet(), WebAPIAdapterSrv::devicesetDeviceRunGet(), WebAPIAdapterGUI::devicesetDeviceRunPost(), WebAPIAdapterSrv::devicesetDeviceRunPost(), WebAPIAdapterGUI::devicesetDeviceSettingsGet(), WebAPIAdapterSrv::devicesetDeviceSettingsGet(), WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch(), FileSinkGui::FileSinkGui(), HackRFOutputGui::HackRFOutputGui(), LimeSDROutputGUI::LimeSDROutputGUI(), LocalOutputGui::LocalOutputGui(), PlutoSDROutputGUI::PlutoSDROutputGUI(), RemoteOutputSinkGui::RemoteOutputSinkGui(), MainWindow::sampleSinkChanged(), SoapySDROutputGui::SoapySDROutputGui(), RemoteSource::webapiFormatChannelReport(), and XTRXOutputGUI::XTRXOutputGUI().

223 {
224  if (m_deviceSinkEngine) {
225  return m_deviceSinkEngine->getSink();
226  } else {
227  return nullptr;
228  }
229 }
DeviceSampleSink * getSink()
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSampleSource()

DeviceSampleSource * DeviceAPI::getSampleSource ( )

Return pointer to the device sample source (single Rx) or nullptr.

Definition at line 213 of file deviceapi.cpp.

References DSPDeviceSourceEngine::getSource(), and m_deviceSourceEngine.

Referenced by AirspyGui::AirspyGui(), AirspyHFGui::AirspyHFGui(), Bladerf1InputGui::Bladerf1InputGui(), BladeRF2InputGui::BladeRF2InputGui(), MainCore::changeSampleSource(), WebAPIAdapterGUI::devicesetDeviceReportGet(), WebAPIAdapterSrv::devicesetDeviceReportGet(), WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunGet(), WebAPIAdapterSrv::devicesetDeviceRunGet(), WebAPIAdapterGUI::devicesetDeviceRunPost(), WebAPIAdapterSrv::devicesetDeviceRunPost(), WebAPIAdapterGUI::devicesetDeviceSettingsGet(), WebAPIAdapterSrv::devicesetDeviceSettingsGet(), WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch(), FCDProGui::FCDProGui(), FCDProPlusGui::FCDProPlusGui(), FileInputGUI::FileInputGUI(), HackRFInputGui::HackRFInputGui(), KiwiSDRGui::KiwiSDRGui(), LimeSDRInputGUI::LimeSDRInputGUI(), LocalInputGui::LocalInputGui(), PerseusGui::PerseusGui(), PlutoSDRInputGui::PlutoSDRInputGui(), RemoteInputGui::RemoteInputGui(), RTLSDRGui::RTLSDRGui(), MainWindow::sampleSourceChanged(), SDRPlayGui::SDRPlayGui(), SoapySDRInputGui::SoapySDRInputGui(), TestSourceGui::TestSourceGui(), and XTRXInputGUI::XTRXInputGUI().

214 {
215  if (m_deviceSourceEngine) {
217  } else {
218  return nullptr;
219  }
220 }
DeviceSampleSource * getSource()
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSamplingDeviceDisplayName()

const QString& DeviceAPI::getSamplingDeviceDisplayName ( ) const
inline

Definition at line 122 of file deviceapi.h.

Referenced by MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

122 { return m_samplingDeviceDisplayName; }
QString m_samplingDeviceDisplayName
The human readable name identifying this instance.
Definition: deviceapi.h:189
+ Here is the caller graph for this function:

◆ getSamplingDeviceGUIMessageQueue()

MessageQueue * DeviceAPI::getSamplingDeviceGUIMessageQueue ( )

Sampling device (ex: single Tx) GUI input message queue.

Definition at line 342 of file deviceapi.cpp.

References DeviceSampleSink::getMessageQueueToGUI(), DeviceSampleSource::getMessageQueueToGUI(), DeviceSampleMIMO::getMessageQueueToGUI(), DSPDeviceMIMOEngine::getMIMO(), DSPDeviceSinkEngine::getSink(), DSPDeviceSourceEngine::getSource(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), and LimeSDRInput::handleMessage().

343 {
344  if (m_deviceSourceEngine) {
346  } else if (m_deviceSinkEngine) {
348  } else if (m_deviceMIMOEngine) {
350  } else {
351  return nullptr;
352  }
353 }
DeviceSampleSink * getSink()
DeviceSampleMIMO * getMIMO()
DeviceSampleSource * getSource()
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
MessageQueue * getMessageQueueToGUI()
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
MessageQueue * getMessageQueueToGUI()
MessageQueue * getMessageQueueToGUI()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSamplingDeviceId()

const QString& DeviceAPI::getSamplingDeviceId ( ) const
inline

Definition at line 120 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

120 { return m_samplingDeviceId; }
QString m_samplingDeviceId
The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...
Definition: deviceapi.h:187
+ Here is the caller graph for this function:

◆ getSamplingDeviceInputMessageQueue()

MessageQueue * DeviceAPI::getSamplingDeviceInputMessageQueue ( )

Sampling device (ex: single Rx) input message queue.

Definition at line 329 of file deviceapi.cpp.

References DeviceSampleSink::getInputMessageQueue(), DeviceSampleSource::getInputMessageQueue(), DeviceSampleMIMO::getInputMessageQueue(), DSPDeviceMIMOEngine::getMIMO(), DSPDeviceSinkEngine::getSink(), DSPDeviceSourceEngine::getSource(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by HackRFOutput::applySettings(), and HackRFInput::applySettings().

330 {
331  if (m_deviceSourceEngine) {
333  } else if (m_deviceSinkEngine) {
335  } else if (m_deviceMIMOEngine) {
337  } else {
338  return nullptr;
339  }
340 }
DeviceSampleSink * getSink()
MessageQueue * getInputMessageQueue()
DeviceSampleMIMO * getMIMO()
MessageQueue * getInputMessageQueue()
DeviceSampleSource * getSource()
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
MessageQueue * getInputMessageQueue()
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSamplingDevicePluginInstanceGUI()

PluginInstanceGUI* DeviceAPI::getSamplingDevicePluginInstanceGUI ( )
inline

Definition at line 134 of file deviceapi.h.

Referenced by MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

PluginInstanceGUI * m_samplingDevicePluginInstanceUI
Definition: deviceapi.h:192
+ Here is the caller graph for this function:

◆ getSamplingDeviceSequence()

uint32_t DeviceAPI::getSamplingDeviceSequence ( ) const
inline

Definition at line 123 of file deviceapi.h.

Referenced by WebAPIAdapterGUI::getDeviceSet(), WebAPIAdapterSrv::getDeviceSet(), AirspyInput::openDevice(), FCDProPlusInput::openDevice(), FCDProInput::openDevice(), SoapySDROutput::openDevice(), SDRPlayInput::openDevice(), and SoapySDRInput::openDevice().

123 { return m_samplingDeviceSequence; }
uint32_t m_samplingDeviceSequence
The device sequence. >0 when more than one device of the same type is connected.
Definition: deviceapi.h:190
+ Here is the caller graph for this function:

◆ getSamplingDeviceSerial()

const QString& DeviceAPI::getSamplingDeviceSerial ( ) const
inline

◆ getSinkBuddies()

const std::vector<DeviceAPI*>& DeviceAPI::getSinkBuddies ( ) const
inline

Definition at line 166 of file deviceapi.h.

Referenced by Bladerf1Input::applySettings(), BladeRF2Output::applySettings(), PlutoSDRInput::applySettings(), HackRFInput::applySettings(), SoapySDROutput::applySettings(), BladeRF2Input::applySettings(), SoapySDRInput::applySettings(), XTRXOutput::applySettings(), LimeSDROutput::applySettings(), LimeSDRInput::applySettings(), Bladerf1Input::closeDevice(), PlutoSDRInput::closeDevice(), BladeRF2Output::closeDevice(), HackRFInput::closeDevice(), SoapySDROutput::closeDevice(), BladeRF2Input::closeDevice(), SoapySDRInput::closeDevice(), XTRXOutput::closeDevice(), LimeSDROutput::closeDevice(), XTRXInput::closeDevice(), LimeSDRInput::closeDevice(), BladeRF2Output::findThread(), SoapySDROutput::findThread(), XTRXOutput::findThread(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), BladeRF2Output::moveThreadToBuddy(), SoapySDROutput::moveThreadToBuddy(), XTRXOutput::moveThreadToBuddy(), Bladerf1Input::openDevice(), BladeRF2Output::openDevice(), PlutoSDRInput::openDevice(), HackRFInput::openDevice(), SoapySDROutput::openDevice(), BladeRF2Input::openDevice(), SoapySDRInput::openDevice(), XTRXOutput::openDevice(), LimeSDROutput::openDevice(), XTRXInput::openDevice(), LimeSDRInput::openDevice(), PlutoSDRInput::resumeBuddies(), LimeSDROutput::resumeTxBuddies(), LimeSDRInput::resumeTxBuddies(), XTRXInput::resumeTxThread(), BladeRF2Output::start(), SoapySDROutput::start(), XTRXOutput::start(), BladeRF2Output::stop(), SoapySDROutput::stop(), XTRXOutput::stop(), PlutoSDRInput::suspendBuddies(), LimeSDROutput::suspendTxBuddies(), LimeSDRInput::suspendTxBuddies(), and XTRXInput::suspendTxThread().

166 { return m_sinkBuddies; }
std::vector< DeviceAPI * > m_sinkBuddies
Device sink APIs referencing the same physical device.
Definition: deviceapi.h:197
+ Here is the caller graph for this function:

◆ getSourceBuddies()

const std::vector<DeviceAPI*>& DeviceAPI::getSourceBuddies ( ) const
inline

Definition at line 165 of file deviceapi.h.

Referenced by PlutoSDROutput::applySettings(), Bladerf1Output::applySettings(), HackRFOutput::applySettings(), BladeRF2Output::applySettings(), SoapySDROutput::applySettings(), BladeRF2Input::applySettings(), SoapySDRInput::applySettings(), XTRXOutput::applySettings(), LimeSDROutput::applySettings(), LimeSDRInput::applySettings(), PlutoSDROutput::closeDevice(), Bladerf1Output::closeDevice(), HackRFOutput::closeDevice(), BladeRF2Output::closeDevice(), SoapySDROutput::closeDevice(), BladeRF2Input::closeDevice(), SoapySDRInput::closeDevice(), XTRXOutput::closeDevice(), LimeSDROutput::closeDevice(), XTRXInput::closeDevice(), LimeSDRInput::closeDevice(), BladeRF2Input::findThread(), SoapySDRInput::findThread(), XTRXInput::findThread(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), BladeRF2Input::moveThreadToBuddy(), SoapySDRInput::moveThreadToBuddy(), XTRXInput::moveThreadToBuddy(), PlutoSDROutput::openDevice(), Bladerf1Output::openDevice(), HackRFOutput::openDevice(), BladeRF2Output::openDevice(), SoapySDROutput::openDevice(), BladeRF2Input::openDevice(), SoapySDRInput::openDevice(), XTRXOutput::openDevice(), LimeSDROutput::openDevice(), XTRXInput::openDevice(), LimeSDRInput::openDevice(), PlutoSDROutput::resumeBuddies(), LimeSDROutput::resumeRxBuddies(), LimeSDRInput::resumeRxBuddies(), XTRXOutput::resumeRxThread(), BladeRF2Input::start(), SoapySDRInput::start(), XTRXInput::start(), BladeRF2Input::stop(), SoapySDRInput::stop(), XTRXInput::stop(), PlutoSDROutput::suspendBuddies(), LimeSDROutput::suspendRxBuddies(), LimeSDRInput::suspendRxBuddies(), and XTRXOutput::suspendRxThread().

165 { return m_sourceBuddies; }
std::vector< DeviceAPI * > m_sourceBuddies
Device source APIs referencing the same physical device.
Definition: deviceapi.h:196
+ Here is the caller graph for this function:

◆ initDeviceEngine()

bool DeviceAPI::initDeviceEngine ( )

Init the device engine corresponding to the stream type.

Definition at line 240 of file deviceapi.cpp.

References DSPDeviceSourceEngine::initAcquisition(), DSPDeviceSinkEngine::initGeneration(), DSPDeviceMIMOEngine::initProcess(), m_deviceMIMOEngine, m_deviceSinkEngine, and m_deviceSourceEngine.

Referenced by PlutoSDROutput::handleMessage(), Bladerf1Output::handleMessage(), HackRFOutput::handleMessage(), TestSourceInput::handleMessage(), PerseusInput::handleMessage(), RTLSDRInput::handleMessage(), AirspyInput::handleMessage(), AirspyHFInput::handleMessage(), PlutoSDRInput::handleMessage(), Bladerf1Input::handleMessage(), LocalOutput::handleMessage(), TestMI::handleMessage(), FCDProInput::handleMessage(), FCDProPlusInput::handleMessage(), BladeRF2Output::handleMessage(), HackRFInput::handleMessage(), KiwiSDRInput::handleMessage(), SoapySDROutput::handleMessage(), LocalInput::handleMessage(), RemoteOutput::handleMessage(), SDRPlayInput::handleMessage(), BladeRF2Input::handleMessage(), SoapySDRInput::handleMessage(), FileSinkOutput::handleMessage(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), RemoteInput::handleMessage(), and FileInput::handleMessage().

241 {
242  if (m_deviceSourceEngine) {
244  } else if (m_deviceSinkEngine) {
246  } else if (m_deviceMIMOEngine) {
248  } else {
249  return false;
250  }
251 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
bool initProcess()
Initialize process sequence.
bool initGeneration()
Initialize generation sequence.
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
bool initAcquisition()
Initialize acquisition sequence.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBuddyLeader()

bool DeviceAPI::isBuddyLeader ( ) const
inline

◆ loadSamplingDeviceSettings()

void DeviceAPI::loadSamplingDeviceSettings ( const Preset preset)

Definition at line 481 of file deviceapi.cpp.

References PluginInstanceGUI::deserialize(), DeviceSampleSink::deserialize(), DeviceSampleSource::deserialize(), Preset::findBestDeviceConfig(), Preset::getCenterFrequency(), Preset::getDescription(), Preset::getGroup(), DSPDeviceSinkEngine::getSink(), DSPDeviceSourceEngine::getSource(), Preset::isSourcePreset(), m_deviceSinkEngine, m_deviceSourceEngine, m_samplingDeviceId, m_samplingDevicePluginInstanceUI, m_samplingDeviceSequence, m_samplingDeviceSerial, PluginInstanceGUI::setCenterFrequency(), DeviceSampleSink::setCenterFrequency(), and DeviceSampleSource::setCenterFrequency().

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainCore::loadPresetSettings(), MainWindow::loadPresetSettings(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

482 {
483  if (m_deviceSourceEngine && (preset->isSourcePreset()))
484  {
485  qDebug("DeviceAPI::loadSamplingDeviceSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
486 
488  qint64 centerFrequency = preset->getCenterFrequency();
489  qDebug("DeviceAPI::loadSamplingDeviceSettings: center frequency: %llu Hz", centerFrequency);
490 
491  if (sourceConfig != 0)
492  {
493  qDebug("DeviceAPI::loadSamplingDeviceSettings: deserializing source %s[%d]: %s",
495 
496  if (m_samplingDevicePluginInstanceUI != 0) // GUI flavor
497  {
499  }
500  else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
501  {
502  m_deviceSourceEngine->getSource()->deserialize(*sourceConfig);
503  }
504  else
505  {
506  qDebug("DeviceAPI::loadSamplingDeviceSettings: deserializing no source");
507  }
508  }
509  else
510  {
511  qDebug("DeviceAPI::loadSamplingDeviceSettings: source %s[%d]: %s not found",
513  }
514 
515  // set center frequency anyway
516  if (m_samplingDevicePluginInstanceUI != 0) // GUI flavor
517  {
519  }
520  else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
521  {
523  }
524  else
525  {
526  qDebug("DeviceAPI::loadSamplingDeviceSettings: no source");
527  }
528  }
529  else if (m_deviceSinkEngine && (!preset->isSourcePreset())) // TODO: refine preset stream type
530  {
531  qDebug("DeviceAPI::loadSamplingDeviceSettings: Loading preset [%s | %s]", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
532 
534  qint64 centerFrequency = preset->getCenterFrequency();
535  qDebug("DeviceAPI::loadSamplingDeviceSettings: center frequency: %llu Hz", centerFrequency);
536 
537  if (sinkConfig != 0)
538  {
539  qDebug("DeviceAPI::loadSamplingDeviceSettings: deserializing sink %s[%d]: %s",
541 
542  if (m_samplingDevicePluginInstanceUI != 0) // GUI flavor
543  {
546  }
547  else if (m_deviceSinkEngine->getSink() != 0) // Server flavor
548  {
549  m_deviceSinkEngine->getSink()->deserialize(*sinkConfig);
550  m_deviceSinkEngine->getSink()->setCenterFrequency(centerFrequency);
551  }
552  else
553  {
554  qDebug("DeviceAPI::loadSamplingDeviceSettings: no sink");
555  }
556  }
557  else
558  {
559  qDebug("DeviceAPI::loadSamplingDeviceSettings: sink %s[%d]: %s not found",
561  }
562  }
563  else
564  {
565  qDebug("DeviceAPI::loadSamplingDeviceSettings: Loading preset [%s | %s] is not a suitable preset", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
566  }
567 }
DeviceSampleSink * getSink()
QString m_samplingDeviceId
The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...
Definition: deviceapi.h:187
const QByteArray * findBestDeviceConfig(const QString &deviceId, const QString &deviceSerial, int deviceSequence) const
Definition: preset.cpp:215
quint64 getCenterFrequency() const
Definition: preset.h:76
DeviceSampleSource * getSource()
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
virtual void setCenterFrequency(qint64 centerFrequency)=0
bool isSourcePreset() const
Definition: preset.h:66
PluginInstanceGUI * m_samplingDevicePluginInstanceUI
Definition: deviceapi.h:192
virtual void setCenterFrequency(qint64 centerFrequency)=0
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
virtual bool deserialize(const QByteArray &data)=0
virtual bool deserialize(const QByteArray &data)=0
QString m_samplingDeviceSerial
The device serial number defined by the vendor or a fake one (SDRplay)
Definition: deviceapi.h:188
virtual void setCenterFrequency(qint64 centerFrequency)=0
virtual bool deserialize(const QByteArray &data)=0
uint32_t m_samplingDeviceSequence
The device sequence. >0 when more than one device of the same type is connected.
Definition: deviceapi.h:190
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:

◆ removeAncillarySink()

void DeviceAPI::removeAncillarySink ( BasebandSampleSink sink,
unsigned int  index = 0 
)

Removes it.

Definition at line 100 of file deviceapi.cpp.

References m_deviceMIMOEngine, m_deviceSinkEngine, m_deviceSourceEngine, DSPDeviceMIMOEngine::removeAncillarySink(), DSPDeviceSourceEngine::removeSink(), and DSPDeviceSinkEngine::removeSpectrumSink().

Referenced by AirspyHFInput::~AirspyHFInput(), AirspyInput::~AirspyInput(), Bladerf1Input::~Bladerf1Input(), BladeRF2Input::~BladeRF2Input(), FCDProInput::~FCDProInput(), FCDProPlusInput::~FCDProPlusInput(), HackRFInput::~HackRFInput(), KiwiSDRInput::~KiwiSDRInput(), LimeSDRInput::~LimeSDRInput(), LocalInput::~LocalInput(), PerseusInput::~PerseusInput(), PlutoSDRInput::~PlutoSDRInput(), RemoteInput::~RemoteInput(), RTLSDRInput::~RTLSDRInput(), SDRPlayInput::~SDRPlayInput(), SoapySDRInput::~SoapySDRInput(), TestMI::~TestMI(), TestSourceInput::~TestSourceInput(), and XTRXInput::~XTRXInput().

101 {
102  if (m_deviceSourceEngine) {
104  } else if (m_deviceSinkEngine) {
106  } else if (m_deviceMIMOEngine) {
108  }
109 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
void removeSpectrumSink(BasebandSampleSink *spectrumSink)
Add a spectrum vis baseband sample sink.
void removeSink(BasebandSampleSink *sink)
Remove a sample sink.
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void removeAncillarySink(BasebandSampleSink *sink, int index=0)
Remove an ancillary sample sink.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeChannelSink()

void DeviceAPI::removeChannelSink ( ThreadedBasebandSampleSink sink,
int  streamIndex = 0 
)

Remove a channel sink (Rx)

Definition at line 127 of file deviceapi.cpp.

References m_deviceMIMOEngine, m_deviceSourceEngine, DSPDeviceMIMOEngine::removeChannelSink(), and DSPDeviceSourceEngine::removeThreadedSink().

Referenced by AMDemod::applySettings(), AMDemod::~AMDemod(), ATVDemod::~ATVDemod(), BFMDemod::~BFMDemod(), ChannelAnalyzer::~ChannelAnalyzer(), DATVDemod::~DATVDemod(), DSDDemod::~DSDDemod(), FreeDVDemod::~FreeDVDemod(), FreqTracker::~FreqTracker(), LocalSink::~LocalSink(), LoRaDemod::~LoRaDemod(), NFMDemod::~NFMDemod(), RemoteSink::~RemoteSink(), SSBDemod::~SSBDemod(), UDPSink::~UDPSink(), and WFMDemod::~WFMDemod().

128 {
129  (void) streamIndex;
130 
131  if (m_deviceSourceEngine) {
133  } else if (m_deviceMIMOEngine) {
134  m_deviceMIMOEngine->removeChannelSink(sink, streamIndex);
135  }
136 }
void removeChannelSink(ThreadedBasebandSampleSink *sink, int index=0)
Remove a channel sink that runs on its own thread.
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
void removeThreadedSink(ThreadedBasebandSampleSink *sink)
Remove a sample sink that runs on its own thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeChannelSinkAPI()

void DeviceAPI::removeChannelSinkAPI ( ChannelAPI channelAPI,
int  streamIndex = 0 
)

Definition at line 163 of file deviceapi.cpp.

References m_channelSinkAPIs, renumerateChannels(), and ChannelAPI::setIndexInDeviceSet().

Referenced by AMDemod::applySettings(), AMDemod::~AMDemod(), ATVDemod::~ATVDemod(), BFMDemod::~BFMDemod(), ChannelAnalyzer::~ChannelAnalyzer(), DATVDemod::~DATVDemod(), DSDDemod::~DSDDemod(), FreeDVDemod::~FreeDVDemod(), FreqTracker::~FreqTracker(), LocalSink::~LocalSink(), LoRaDemod::~LoRaDemod(), NFMDemod::~NFMDemod(), RemoteSink::~RemoteSink(), SSBDemod::~SSBDemod(), UDPSink::~UDPSink(), and WFMDemod::~WFMDemod().

164 {
165  (void) streamIndex;
166 
167  if (m_channelSinkAPIs.removeOne(channelAPI)) {
169  }
170 
171  channelAPI->setIndexInDeviceSet(-1);
172 }
void setIndexInDeviceSet(int indexInDeviceSet)
Definition: channelapi.h:88
void renumerateChannels()
Definition: deviceapi.cpp:773
QList< ChannelAPI * > m_channelSinkAPIs
Definition: deviceapi.h:204
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeChannelSource()

void DeviceAPI::removeChannelSource ( ThreadedBasebandSampleSource sink,
int  streamIndex = 0 
)

Remove a channel source (Tx)

Definition at line 147 of file deviceapi.cpp.

References m_deviceSinkEngine, and DSPDeviceSinkEngine::removeThreadedSource().

Referenced by AMMod::~AMMod(), ATVMod::~ATVMod(), FileSource::~FileSource(), FreeDVMod::~FreeDVMod(), LocalSource::~LocalSource(), NFMMod::~NFMMod(), RemoteSource::~RemoteSource(), SSBMod::~SSBMod(), UDPSource::~UDPSource(), and WFMMod::~WFMMod().

148 {
149  (void) streamIndex;
150 
151  if (m_deviceSinkEngine) {
153  }
154 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
void removeThreadedSource(ThreadedBasebandSampleSource *source)
Remove a baseband sample source that runs on its own thread.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeChannelSourceAPI()

void DeviceAPI::removeChannelSourceAPI ( ChannelAPI channelAPI,
int  streamIndex = 0 
)

Definition at line 181 of file deviceapi.cpp.

References m_channelSourceAPIs, renumerateChannels(), and ChannelAPI::setIndexInDeviceSet().

Referenced by AMMod::~AMMod(), ATVMod::~ATVMod(), FileSource::~FileSource(), FreeDVMod::~FreeDVMod(), LocalSource::~LocalSource(), NFMMod::~NFMMod(), RemoteSource::~RemoteSource(), SSBMod::~SSBMod(), UDPSource::~UDPSource(), and WFMMod::~WFMMod().

182 {
183  (void) streamIndex;
184 
185  if (m_channelSourceAPIs.removeOne(channelAPI)) {
187  }
188 
189  channelAPI->setIndexInDeviceSet(-1);
190 }
QList< ChannelAPI * > m_channelSourceAPIs
Definition: deviceapi.h:209
void setIndexInDeviceSet(int indexInDeviceSet)
Definition: channelapi.h:88
void renumerateChannels()
Definition: deviceapi.cpp:773
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeLastSinkStream()

void DeviceAPI::removeLastSinkStream ( )

Definition at line 82 of file deviceapi.cpp.

References m_deviceMIMOEngine, and DSPDeviceMIMOEngine::removeLastSinkStream().

83 {
84  if (m_deviceMIMOEngine) {
86  }
87 }
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:

◆ removeLastSourceStream()

void DeviceAPI::removeLastSourceStream ( )

Definition at line 68 of file deviceapi.cpp.

References m_deviceMIMOEngine, and DSPDeviceMIMOEngine::removeLastSourceStream().

Referenced by TestMI::~TestMI().

69 {
70  if (m_deviceMIMOEngine) {
72  }
73 }
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeSinkBuddy()

void DeviceAPI::removeSinkBuddy ( DeviceAPI buddy)

Definition at line 707 of file deviceapi.cpp.

References getHardwareId(), getSamplingDeviceSerial(), m_sinkBuddies, m_streamType, and StreamSingleTx.

708 {
709  if (buddy->m_streamType != StreamSingleTx)
710  {
711  qDebug("DeviceAPI::removeSinkBuddy: buddy %s(%s) is not of single Tx type",
712  qPrintable(buddy->getHardwareId()),
713  qPrintable(buddy->getSamplingDeviceSerial()));
714  return;
715  }
716 
717  std::vector<DeviceAPI*>::iterator it = m_sinkBuddies.begin();
718 
719  for (;it != m_sinkBuddies.end(); ++it)
720  {
721  if (*it == buddy)
722  {
723  qDebug("DeviceAPI::removeSinkBuddy: buddy %s(%s) [%llu] removed from the list of [%llu]",
724  qPrintable(buddy->getHardwareId()),
725  qPrintable(buddy->getSamplingDeviceSerial()),
726  (quint64) (*it),
727  (quint64) this);
728  m_sinkBuddies.erase(it);
729  return;
730  }
731  }
732 
733  qDebug("DeviceAPI::removeSourceBuddy: buddy %s(%s) [%llu] not found in the list of [%llu]",
734  qPrintable(buddy->getHardwareId()),
735  qPrintable(buddy->getSamplingDeviceSerial()),
736  (quint64) buddy,
737  (quint64) this);
738 }
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
const QString & getSamplingDeviceSerial() const
Definition: deviceapi.h:121
StreamType m_streamType
Definition: deviceapi.h:178
const QString & getHardwareId() const
Definition: deviceapi.h:119
std::vector< DeviceAPI * > m_sinkBuddies
Device sink APIs referencing the same physical device.
Definition: deviceapi.h:197
+ Here is the call graph for this function:

◆ removeSourceBuddy()

void DeviceAPI::removeSourceBuddy ( DeviceAPI buddy)

Definition at line 674 of file deviceapi.cpp.

References getHardwareId(), getSamplingDeviceSerial(), m_sourceBuddies, m_streamType, and StreamSingleRx.

675 {
676  if (buddy->m_streamType != StreamSingleRx)
677  {
678  qDebug("DeviceAPI::removeSourceBuddy: buddy %s(%s) is not of single Rx type",
679  qPrintable(buddy->getHardwareId()),
680  qPrintable(buddy->getSamplingDeviceSerial()));
681  return;
682  }
683 
684  std::vector<DeviceAPI*>::iterator it = m_sourceBuddies.begin();
685 
686  for (;it != m_sourceBuddies.end(); ++it)
687  {
688  if (*it == buddy)
689  {
690  qDebug("DeviceAPI::removeSourceBuddy: buddy %s(%s) [%llu] removed from the list of [%llu]",
691  qPrintable(buddy->getHardwareId()),
692  qPrintable(buddy->getSamplingDeviceSerial()),
693  (quint64) (*it),
694  (quint64) this);
695  m_sourceBuddies.erase(it);
696  return;
697  }
698  }
699 
700  qDebug("DeviceAPI::removeSourceBuddy: buddy %s(%s) [%llu] not found in the list of [%llu]",
701  qPrintable(buddy->getHardwareId()),
702  qPrintable(buddy->getSamplingDeviceSerial()),
703  (quint64) buddy,
704  (quint64) this);
705 }
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47
const QString & getSamplingDeviceSerial() const
Definition: deviceapi.h:121
std::vector< DeviceAPI * > m_sourceBuddies
Device source APIs referencing the same physical device.
Definition: deviceapi.h:196
StreamType m_streamType
Definition: deviceapi.h:178
const QString & getHardwareId() const
Definition: deviceapi.h:119
+ Here is the call graph for this function:

◆ renumerateChannels()

void DeviceAPI::renumerateChannels ( )
private

Definition at line 773 of file deviceapi.cpp.

References i, m_channelSinkAPIs, m_channelSourceAPIs, m_deviceTabIndex, m_streamType, StreamSingleRx, and StreamSingleTx.

Referenced by addChannelSinkAPI(), addChannelSourceAPI(), removeChannelSinkAPI(), and removeChannelSourceAPI().

774 {
776  {
777  for (int i = 0; i < m_channelSinkAPIs.size(); ++i)
778  {
779  m_channelSinkAPIs.at(i)->setIndexInDeviceSet(i);
780  m_channelSinkAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex);
781  m_channelSinkAPIs.at(i)->setDeviceAPI(this);
782  }
783  }
784  else if (m_streamType == StreamSingleTx)
785  {
786  for (int i = 0; i < m_channelSourceAPIs.size(); ++i)
787  {
788  m_channelSourceAPIs.at(i)->setIndexInDeviceSet(i);
789  m_channelSourceAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex);
790  m_channelSourceAPIs.at(i)->setDeviceAPI(this);
791  }
792  }
793 }
Exposes a single output stream that can be one of the streams of a physical device.
Definition: deviceapi.h:48
int m_deviceTabIndex
This is the tab index in the GUI and also the device set index.
Definition: deviceapi.h:179
Exposes a single input stream that can be one of the streams of a physical device.
Definition: deviceapi.h:47
QList< ChannelAPI * > m_channelSourceAPIs
Definition: deviceapi.h:209
int32_t i
Definition: decimators.h:244
StreamType m_streamType
Definition: deviceapi.h:178
QList< ChannelAPI * > m_channelSinkAPIs
Definition: deviceapi.h:204
+ Here is the caller graph for this function:

◆ resetSamplingDeviceId()

void DeviceAPI::resetSamplingDeviceId ( )
inline

Definition at line 111 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

111 { m_samplingDeviceId.clear(); }
QString m_samplingDeviceId
The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...
Definition: deviceapi.h:187
+ Here is the caller graph for this function:

◆ saveSamplingDeviceSettings()

void DeviceAPI::saveSamplingDeviceSettings ( Preset preset)

Definition at line 569 of file deviceapi.cpp.

References Preset::addOrUpdateDeviceConfig(), PluginInstanceGUI::getCenterFrequency(), DeviceSampleSink::getCenterFrequency(), DeviceSampleSource::getCenterFrequency(), DSPDeviceSinkEngine::getSink(), DSPDeviceSourceEngine::getSource(), Preset::isSourcePreset(), m_deviceSinkEngine, m_deviceSourceEngine, m_samplingDeviceId, m_samplingDevicePluginInstanceUI, m_samplingDeviceSequence, m_samplingDeviceSerial, PluginInstanceGUI::serialize(), DeviceSampleSink::serialize(), DeviceSampleSource::serialize(), and Preset::setCenterFrequency().

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), MainWindow::sampleSourceChanged(), MainCore::savePresetSettings(), and MainWindow::savePresetSettings().

570 {
571  if (m_deviceSourceEngine && (preset->isSourcePreset()))
572  {
573  qDebug("DeviceAPI::saveSamplingDeviceSettings: serializing source %s[%d]: %s",
575 
577  {
580  }
581  else if (m_deviceSourceEngine->getSource() != 0)
582  {
585  }
586  else
587  {
588  qDebug("DeviceAPI::saveSamplingDeviceSettings: no source");
589  }
590  }
591  else if (m_deviceSinkEngine && (!preset->isSourcePreset())) // TODO: refine preset stream type
592  {
593  qDebug("DeviceAPI::saveSamplingDeviceSettings: serializing sink %s[%d]: %s",
595 
596  if (m_samplingDevicePluginInstanceUI != 0) // GUI flavor
597  {
600  }
601  else if (m_deviceSinkEngine->getSink() != 0) // Server flavor
602  {
605  }
606  else
607  {
608  qDebug("DeviceAPI::saveSamplingDeviceSettings: no sink");
609  }
610  }
611  else
612  {
613  qDebug("DeviceAPI::saveSamplingDeviceSettings: not a suitable preset");
614  }
615 }
void setCenterFrequency(const quint64 centerFrequency)
Definition: preset.h:75
DeviceSampleSink * getSink()
virtual QByteArray serialize() const =0
QString m_samplingDeviceId
The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...
Definition: deviceapi.h:187
DeviceSampleSource * getSource()
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
virtual qint64 getCenterFrequency() const =0
void addOrUpdateDeviceConfig(const QString &deviceId, const QString &deviceSerial, int deviceSequence, const QByteArray &config)
Definition: preset.cpp:177
bool isSourcePreset() const
Definition: preset.h:66
PluginInstanceGUI * m_samplingDevicePluginInstanceUI
Definition: deviceapi.h:192
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
virtual quint64 getCenterFrequency() const =0
Center frequency exposed by the sink.
QString m_samplingDeviceSerial
The device serial number defined by the vendor or a fake one (SDRplay)
Definition: deviceapi.h:188
virtual QByteArray serialize() const =0
virtual QByteArray serialize() const =0
uint32_t m_samplingDeviceSequence
The device sequence. >0 when more than one device of the same type is connected.
Definition: deviceapi.h:190
virtual quint64 getCenterFrequency() const =0
Center frequency exposed by the source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBuddyLeader()

void DeviceAPI::setBuddyLeader ( bool  isBuddyLeader)
inline

Definition at line 164 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

bool isBuddyLeader() const
Definition: deviceapi.h:163
bool m_isBuddyLeader
Definition: deviceapi.h:199
+ Here is the caller graph for this function:

◆ setBuddySharedPtr()

void DeviceAPI::setBuddySharedPtr ( void *  ptr)
inline

◆ setDeviceItemIndex()

void DeviceAPI::setDeviceItemIndex ( uint32_t  index)

Definition at line 374 of file deviceapi.cpp.

References m_deviceItemIndex.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

375 {
376  m_deviceItemIndex = index;
377 }
uint32_t m_deviceItemIndex
The item index inb the Rx or Tx side of the physical device. Can be >0 for NxM devices (i...
Definition: deviceapi.h:182
+ Here is the caller graph for this function:

◆ setDeviceNbItems()

void DeviceAPI::setDeviceNbItems ( uint32_t  nbItems)

Definition at line 369 of file deviceapi.cpp.

References m_deviceNbItems.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

370 {
371  m_deviceNbItems = nbItems;
372 }
uint32_t m_deviceNbItems
Number of items in the physical device either Rx or Tx. Can be >1 for NxM devices (i...
Definition: deviceapi.h:181
+ Here is the caller graph for this function:

◆ setHardwareId()

void DeviceAPI::setHardwareId ( const QString &  id)

Definition at line 364 of file deviceapi.cpp.

References m_hardwareId.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

365 {
366  m_hardwareId = id;
367 }
QString m_hardwareId
The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
Definition: deviceapi.h:180
+ Here is the caller graph for this function:

◆ setHardwareUserArguments()

void DeviceAPI::setHardwareUserArguments ( const QString &  userArguments)
inline

Definition at line 115 of file deviceapi.h.

Referenced by MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

115 { m_hardwareUserArguments = userArguments; }
QString m_hardwareUserArguments
User given arguments to be used at hardware level i.e. for the hardware device and device sequence...
Definition: deviceapi.h:191
+ Here is the caller graph for this function:

◆ setNbSinkStreams()

void DeviceAPI::setNbSinkStreams ( uint32_t  nbSinkStreams)
inline

Definition at line 169 of file deviceapi.h.

Referenced by RemoteOutput::RemoteOutput().

169 { m_nbSinkStreams = nbSinkStreams; }
uint32_t m_nbSinkStreams
The number of sink streams in the logical device. 1 for Single Tx (SO) can be 0 or more for MIMO...
Definition: deviceapi.h:184
+ Here is the caller graph for this function:

◆ setNbSourceStreams()

void DeviceAPI::setNbSourceStreams ( uint32_t  nbSourceStreams)
inline

Definition at line 168 of file deviceapi.h.

Referenced by AirspyHFInput::AirspyHFInput(), AirspyInput::AirspyInput(), and RTLSDRInput::RTLSDRInput().

168 { m_nbSourceStreams = nbSourceStreams; }
uint32_t m_nbSourceStreams
The number of source streams in the logical device. 1 for Single Rx (SI) can be 0 or more for MIMO...
Definition: deviceapi.h:183
+ Here is the caller graph for this function:

◆ setSampleMIMO()

void DeviceAPI::setSampleMIMO ( DeviceSampleMIMO mimo)

Set the device sample MIMO.

Definition at line 206 of file deviceapi.cpp.

References m_deviceMIMOEngine, and DSPDeviceMIMOEngine::setMIMO().

Referenced by MainWindow::sampleMIMOChanged().

207 {
208  if (m_deviceMIMOEngine) {
210  }
211 }
void setMIMO(DeviceSampleMIMO *mimo)
Set the sample MIMO type.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSampleSink()

void DeviceAPI::setSampleSink ( DeviceSampleSink sink)

Set the device sample sink (single Tx)

Definition at line 199 of file deviceapi.cpp.

References m_deviceSinkEngine, and DSPDeviceSinkEngine::setSink().

Referenced by MainCore::changeSampleSink(), and MainWindow::sampleSinkChanged().

200 {
201  if (m_deviceSinkEngine) {
203  }
204 }
void setSink(DeviceSampleSink *sink)
Set the sample sink type.
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSampleSource()

void DeviceAPI::setSampleSource ( DeviceSampleSource source)

Set the device sample source (single Rx)

Definition at line 192 of file deviceapi.cpp.

References m_deviceSourceEngine, and DSPDeviceSourceEngine::setSource().

Referenced by MainCore::changeSampleSource(), and MainWindow::sampleSourceChanged().

193 {
194  if (m_deviceSourceEngine) {
196  }
197 }
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void setSource(DeviceSampleSource *source)
Set the sample source type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSamplingDeviceDisplayName()

void DeviceAPI::setSamplingDeviceDisplayName ( const QString &  name)
inline

Definition at line 113 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

113 { m_samplingDeviceDisplayName = name; }
QString m_samplingDeviceDisplayName
The human readable name identifying this instance.
Definition: deviceapi.h:189
+ Here is the caller graph for this function:

◆ setSamplingDeviceId()

void DeviceAPI::setSamplingDeviceId ( const QString &  id)
inline

Definition at line 110 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

110 { m_samplingDeviceId = id; }
QString m_samplingDeviceId
The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...
Definition: deviceapi.h:187
+ Here is the caller graph for this function:

◆ setSamplingDevicePluginInstanceGUI()

void DeviceAPI::setSamplingDevicePluginInstanceGUI ( PluginInstanceGUI gui)

Definition at line 384 of file deviceapi.cpp.

References m_samplingDevicePluginInstanceUI.

Referenced by MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

385 {
387 }
PluginInstanceGUI * m_samplingDevicePluginInstanceUI
Definition: deviceapi.h:192
+ Here is the caller graph for this function:

◆ setSamplingDevicePluginInterface()

void DeviceAPI::setSamplingDevicePluginInterface ( PluginInterface iface)

Definition at line 379 of file deviceapi.cpp.

References m_pluginInterface.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

380 {
381  m_pluginInterface = iface;
382 }
PluginInterface * m_pluginInterface
Definition: deviceapi.h:185
+ Here is the caller graph for this function:

◆ setSamplingDeviceSequence()

void DeviceAPI::setSamplingDeviceSequence ( int  sequence)
inline

Definition at line 114 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

114 { m_samplingDeviceSequence = sequence; }
uint32_t m_samplingDeviceSequence
The device sequence. >0 when more than one device of the same type is connected.
Definition: deviceapi.h:190
+ Here is the caller graph for this function:

◆ setSamplingDeviceSerial()

void DeviceAPI::setSamplingDeviceSerial ( const QString &  serial)
inline

Definition at line 112 of file deviceapi.h.

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

112 { m_samplingDeviceSerial = serial; }
QString m_samplingDeviceSerial
The device serial number defined by the vendor or a fake one (SDRplay)
Definition: deviceapi.h:188
+ Here is the caller graph for this function:

◆ setSpectrumSinkInput()

void DeviceAPI::setSpectrumSinkInput ( bool  sourceElseSink = true,
unsigned int  index = 0 
)

Used in the MIMO case to select which stream is used as input to main spectrum.

Definition at line 111 of file deviceapi.cpp.

References m_deviceMIMOEngine, and DSPDeviceMIMOEngine::setSpectrumSinkInput().

Referenced by TestMIGui::on_spectrumSource_currentIndexChanged(), and TestMIGui::on_streamIndex_currentIndexChanged().

112 {
113  if (m_deviceMIMOEngine) { // In practice this is only used in the MIMO case
114  m_deviceMIMOEngine->setSpectrumSinkInput(sourceElseSink, index);
115  }
116 }
void setSpectrumSinkInput(bool sourceElseSink, int index)
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startDeviceEngine()

bool DeviceAPI::startDeviceEngine ( )

Start the device engine corresponding to the stream type.

Definition at line 253 of file deviceapi.cpp.

References m_deviceMIMOEngine, m_deviceSinkEngine, m_deviceSourceEngine, DSPDeviceSourceEngine::startAcquisition(), DSPDeviceSinkEngine::startGeneration(), and DSPDeviceMIMOEngine::startProcess().

Referenced by PlutoSDROutput::handleMessage(), Bladerf1Output::handleMessage(), HackRFOutput::handleMessage(), TestSourceInput::handleMessage(), PerseusInput::handleMessage(), RTLSDRInput::handleMessage(), AirspyInput::handleMessage(), AirspyHFInput::handleMessage(), PlutoSDRInput::handleMessage(), Bladerf1Input::handleMessage(), LocalOutput::handleMessage(), TestMI::handleMessage(), FCDProInput::handleMessage(), FCDProPlusInput::handleMessage(), BladeRF2Output::handleMessage(), HackRFInput::handleMessage(), KiwiSDRInput::handleMessage(), SoapySDROutput::handleMessage(), LocalInput::handleMessage(), RemoteOutput::handleMessage(), SDRPlayInput::handleMessage(), BladeRF2Input::handleMessage(), SoapySDRInput::handleMessage(), FileSinkOutput::handleMessage(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), RemoteInput::handleMessage(), and FileInput::handleMessage().

254 {
255  if (m_deviceSourceEngine) {
257  } else if (m_deviceSinkEngine) {
259  } else if (m_deviceMIMOEngine) {
261  } else {
262  return false;
263  }
264 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
bool startAcquisition()
Start acquisition sequence.
bool startGeneration()
Start generation sequence.
bool startProcess()
Start process sequence.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ state()

DeviceAPI::EngineState DeviceAPI::state ( ) const

Return the state of the device engine corresponding to the stream type.

Definition at line 277 of file deviceapi.cpp.

References m_deviceMIMOEngine, m_deviceSinkEngine, m_deviceSourceEngine, DSPDeviceSourceEngine::state(), DSPDeviceSinkEngine::state(), DSPDeviceMIMOEngine::state(), and StError.

Referenced by SDRPlayGui::updateStatus(), KiwiSDRGui::updateStatus(), Bladerf1OutputGui::updateStatus(), BladeRF2OutputGui::updateStatus(), PerseusGui::updateStatus(), LocalOutputGui::updateStatus(), FCDProPlusGui::updateStatus(), FileSinkGui::updateStatus(), Bladerf1InputGui::updateStatus(), PlutoSDROutputGUI::updateStatus(), AirspyGui::updateStatus(), AirspyHFGui::updateStatus(), BladeRF2InputGui::updateStatus(), FileInputGUI::updateStatus(), XTRXOutputGUI::updateStatus(), TestSourceGui::updateStatus(), RTLSDRGui::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(), and RemoteOutputSinkGui::updateStatus().

278 {
279  if (m_deviceSourceEngine) {
281  } else if (m_deviceSinkEngine) {
283  } else if (m_deviceMIMOEngine) {
285  } else {
286  return StError;
287  }
288 }
State state() const
Return DSP engine current state.
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
State state() const
Return DSP engine current state.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
State state() const
Return DSP engine current state.
engine is in error
Definition: deviceapi.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stopDeviceEngine()

void DeviceAPI::stopDeviceEngine ( )

Stop the device engine corresponding to the stream type.

Definition at line 266 of file deviceapi.cpp.

References m_deviceMIMOEngine, m_deviceSinkEngine, m_deviceSourceEngine, DSPDeviceSourceEngine::stopAcquistion(), DSPDeviceSinkEngine::stopGeneration(), and DSPDeviceMIMOEngine::stopProcess().

Referenced by MainCore::changeSampleSink(), MainCore::changeSampleSource(), PlutoSDROutput::handleMessage(), Bladerf1Output::handleMessage(), HackRFOutput::handleMessage(), TestSourceInput::handleMessage(), PerseusInput::handleMessage(), RTLSDRInput::handleMessage(), AirspyInput::handleMessage(), AirspyHFInput::handleMessage(), PlutoSDRInput::handleMessage(), Bladerf1Input::handleMessage(), LocalOutput::handleMessage(), TestMI::handleMessage(), FCDProPlusInput::handleMessage(), FCDProInput::handleMessage(), BladeRF2Output::handleMessage(), HackRFInput::handleMessage(), KiwiSDRInput::handleMessage(), SoapySDROutput::handleMessage(), LocalInput::handleMessage(), RemoteOutput::handleMessage(), SDRPlayInput::handleMessage(), BladeRF2Input::handleMessage(), SoapySDRInput::handleMessage(), FileSinkOutput::handleMessage(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), XTRXInput::handleMessage(), LimeSDRInput::handleMessage(), RemoteInput::handleMessage(), FileInput::handleMessage(), MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

267 {
268  if (m_deviceSourceEngine) {
270  } else if (m_deviceSinkEngine) {
272  } else if (m_deviceMIMOEngine) {
274  }
275 }
DSPDeviceSinkEngine * m_deviceSinkEngine
Definition: deviceapi.h:208
void stopProcess()
Stop process sequence.
DSPDeviceSourceEngine * m_deviceSourceEngine
Definition: deviceapi.h:203
void stopGeneration()
Stop generation sequence.
void stopAcquistion()
Stop acquisition sequence.
DSPDeviceMIMOEngine * m_deviceMIMOEngine
Definition: deviceapi.h:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_buddySharedPtr

void* DeviceAPI::m_buddySharedPtr
protected

Definition at line 198 of file deviceapi.h.

◆ m_channelSinkAPIs

QList<ChannelAPI*> DeviceAPI::m_channelSinkAPIs
protected

◆ m_channelSourceAPIs

QList<ChannelAPI*> DeviceAPI::m_channelSourceAPIs
protected

◆ m_deviceItemIndex

uint32_t DeviceAPI::m_deviceItemIndex
protected

The item index inb the Rx or Tx side of the physical device. Can be >0 for NxM devices (i.e. 0 or 1 for LimeSDR)

Definition at line 182 of file deviceapi.h.

Referenced by setDeviceItemIndex().

◆ m_deviceMIMOEngine

DSPDeviceMIMOEngine* DeviceAPI::m_deviceMIMOEngine
protected

◆ m_deviceNbItems

uint32_t DeviceAPI::m_deviceNbItems
protected

Number of items in the physical device either Rx or Tx. Can be >1 for NxM devices (i.e. 2 for LimeSDR)

Definition at line 181 of file deviceapi.h.

Referenced by setDeviceNbItems().

◆ m_deviceSinkEngine

DSPDeviceSinkEngine* DeviceAPI::m_deviceSinkEngine
protected

◆ m_deviceSourceEngine

DSPDeviceSourceEngine* DeviceAPI::m_deviceSourceEngine
protected

◆ m_deviceTabIndex

int DeviceAPI::m_deviceTabIndex
protected

This is the tab index in the GUI and also the device set index.

Definition at line 179 of file deviceapi.h.

Referenced by renumerateChannels().

◆ m_hardwareId

QString DeviceAPI::m_hardwareId
protected

The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)

Definition at line 180 of file deviceapi.h.

Referenced by setHardwareId().

◆ m_hardwareUserArguments

QString DeviceAPI::m_hardwareUserArguments
protected

User given arguments to be used at hardware level i.e. for the hardware device and device sequence.

Definition at line 191 of file deviceapi.h.

◆ m_isBuddyLeader

bool DeviceAPI::m_isBuddyLeader
protected

Definition at line 199 of file deviceapi.h.

◆ m_masterTimer

const QTimer& DeviceAPI::m_masterTimer
protected

This is the DSPEngine master timer.

Definition at line 186 of file deviceapi.h.

◆ m_nbSinkStreams

uint32_t DeviceAPI::m_nbSinkStreams
protected

The number of sink streams in the logical device. 1 for Single Tx (SO) can be 0 or more for MIMO.

Definition at line 184 of file deviceapi.h.

◆ m_nbSourceStreams

uint32_t DeviceAPI::m_nbSourceStreams
protected

The number of source streams in the logical device. 1 for Single Rx (SI) can be 0 or more for MIMO.

Definition at line 183 of file deviceapi.h.

◆ m_pluginInterface

PluginInterface* DeviceAPI::m_pluginInterface
protected

Definition at line 185 of file deviceapi.h.

Referenced by setSamplingDevicePluginInterface().

◆ m_samplingDeviceDisplayName

QString DeviceAPI::m_samplingDeviceDisplayName
protected

The human readable name identifying this instance.

Definition at line 189 of file deviceapi.h.

◆ m_samplingDeviceId

QString DeviceAPI::m_samplingDeviceId
protected

The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...)

Definition at line 187 of file deviceapi.h.

Referenced by loadSamplingDeviceSettings(), and saveSamplingDeviceSettings().

◆ m_samplingDevicePluginInstanceUI

PluginInstanceGUI* DeviceAPI::m_samplingDevicePluginInstanceUI
protected

◆ m_samplingDeviceSequence

uint32_t DeviceAPI::m_samplingDeviceSequence
protected

The device sequence. >0 when more than one device of the same type is connected.

Definition at line 190 of file deviceapi.h.

Referenced by loadSamplingDeviceSettings(), and saveSamplingDeviceSettings().

◆ m_samplingDeviceSerial

QString DeviceAPI::m_samplingDeviceSerial
protected

The device serial number defined by the vendor or a fake one (SDRplay)

Definition at line 188 of file deviceapi.h.

Referenced by loadSamplingDeviceSettings(), and saveSamplingDeviceSettings().

◆ m_sinkBuddies

std::vector<DeviceAPI*> DeviceAPI::m_sinkBuddies
protected

Device sink APIs referencing the same physical device.

Definition at line 197 of file deviceapi.h.

Referenced by addSinkBuddy(), addSourceBuddy(), clearBuddiesLists(), and removeSinkBuddy().

◆ m_sourceBuddies

std::vector<DeviceAPI*> DeviceAPI::m_sourceBuddies
protected

Device source APIs referencing the same physical device.

Definition at line 196 of file deviceapi.h.

Referenced by addSinkBuddy(), addSourceBuddy(), clearBuddiesLists(), and removeSourceBuddy().

◆ m_streamType

StreamType DeviceAPI::m_streamType
protected

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