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 Member Functions | Static Public Attributes | Static Private Attributes | List of all members
SoapySDRInputPlugin Class Reference

#include <soapysdrinputplugin.h>

+ Inheritance diagram for SoapySDRInputPlugin:
+ Collaboration diagram for SoapySDRInputPlugin:

Public Member Functions

 SoapySDRInputPlugin (QObject *parent=0)
 
const PluginDescriptorgetPluginDescriptor () const
 
void initPlugin (PluginAPI *pluginAPI)
 
virtual SamplingDevices enumSampleSources ()
 
virtual PluginInstanceGUIcreateSampleSourcePluginInstanceGUI (const QString &sourceId, QWidget **widget, DeviceUISet *deviceUISet)
 
virtual DeviceSampleSourcecreateSampleSourcePluginInstance (const QString &sourceId, DeviceAPI *deviceAPI)
 
- Public Member Functions inherited from PluginInterface
virtual ~PluginInterface ()
 
virtual PluginInstanceGUIcreateRxChannelGUI (DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
 
virtual BasebandSampleSinkcreateRxChannelBS (DeviceAPI *deviceAPI)
 
virtual ChannelAPIcreateRxChannelCS (DeviceAPI *deviceAPI)
 
virtual PluginInstanceGUIcreateTxChannelGUI (DeviceUISet *deviceUISet, BasebandSampleSource *txChannel)
 
virtual BasebandSampleSourcecreateTxChannelBS (DeviceAPI *deviceAPI)
 
virtual ChannelAPIcreateTxChannelCS (DeviceAPI *deviceAPI)
 
virtual void deleteSampleSourcePluginInstanceGUI (PluginInstanceGUI *ui)
 
virtual void deleteSampleSourcePluginInstanceInput (DeviceSampleSource *source)
 
virtual SamplingDevices enumSampleSinks ()
 
virtual PluginInstanceGUIcreateSampleSinkPluginInstanceGUI (const QString &sinkId, QWidget **widget, DeviceUISet *deviceUISet)
 
virtual DeviceSampleSinkcreateSampleSinkPluginInstance (const QString &sinkId, DeviceAPI *deviceAPI)
 
virtual void deleteSampleSinkPluginInstanceGUI (PluginInstanceGUI *ui)
 
virtual void deleteSampleSinkPluginInstanceOutput (DeviceSampleSink *sink)
 
virtual SamplingDevices enumSampleMIMO ()
 
virtual PluginInstanceGUIcreateSampleMIMOPluginInstanceGUI (const QString &mimoId, QWidget **widget, DeviceUISet *deviceUISet)
 
virtual DeviceSampleMIMOcreateSampleMIMOPluginInstance (const QString &mimoId, DeviceAPI *deviceAPI)
 
virtual void deleteSampleMIMOPluginInstanceGUI (PluginInstanceGUI *ui)
 
virtual void deleteSampleMIMOPluginInstanceMIMO (DeviceSampleMIMO *mimo)
 

Static Public Attributes

static const QString m_hardwareID = "SoapySDR"
 
static const QString m_deviceTypeID = SOAPYSDRINPUT_DEVICE_TYPE_ID
 

Static Private Attributes

static const PluginDescriptor m_pluginDescriptor
 

Additional Inherited Members

- Public Types inherited from PluginInterface
typedef QList< SamplingDeviceSamplingDevices
 

Detailed Description

Definition at line 30 of file soapysdrinputplugin.h.

Constructor & Destructor Documentation

◆ SoapySDRInputPlugin()

SoapySDRInputPlugin::SoapySDRInputPlugin ( QObject *  parent = 0)
explicit

Definition at line 43 of file soapysdrinputplugin.cpp.

43  :
44  QObject(parent)
45 {
46 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

DeviceSampleSource * SoapySDRInputPlugin::createSampleSourcePluginInstance ( const QString &  sourceId,
DeviceAPI deviceAPI 
)
virtual

Reimplemented from PluginInterface.

Definition at line 121 of file soapysdrinputplugin.cpp.

References m_deviceTypeID.

122 {
123  if (sourceId == m_deviceTypeID)
124  {
125  SoapySDRInput *input = new SoapySDRInput(deviceAPI);
126  return input;
127  }
128  else
129  {
130  return 0;
131  }
132 }
static const QString m_deviceTypeID

◆ createSampleSourcePluginInstanceGUI()

PluginInstanceGUI * SoapySDRInputPlugin::createSampleSourcePluginInstanceGUI ( const QString &  sourceId,
QWidget **  widget,
DeviceUISet deviceUISet 
)
virtual

Reimplemented from PluginInterface.

Definition at line 103 of file soapysdrinputplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

107 {
108  if(sourceId == m_deviceTypeID)
109  {
110  SoapySDRInputGui* gui = new SoapySDRInputGui(deviceUISet);
111  *widget = gui;
112  return gui;
113  }
114  else
115  {
116  return 0;
117  }
118 }
static const QString m_deviceTypeID
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices SoapySDRInputPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 58 of file soapysdrinputplugin.cpp.

References arg(), createSampleSourcePluginInstanceGUI(), DeviceSoapySDR::getDevicesEnumeration(), DeviceSoapySDR::instance(), m_deviceTypeID, m_hardwareID, PluginInterface::SamplingDevice::PhysicalDevice, and PluginInterface::SamplingDevice::StreamSingleRx.

59 {
60  SamplingDevices result;
61  DeviceSoapySDR& deviceSoapySDR = DeviceSoapySDR::instance();
62  const std::vector<DeviceSoapySDRScan::SoapySDRDeviceEnum>& devicesEnumeration = deviceSoapySDR.getDevicesEnumeration();
63  qDebug("SoapySDRInputPlugin::enumSampleSources: %lu SoapySDR devices. Enumerate these with Rx channel(s):", devicesEnumeration.size());
64  std::vector<DeviceSoapySDRScan::SoapySDRDeviceEnum>::const_iterator it = devicesEnumeration.begin();
65 
66  for (int idev = 0; it != devicesEnumeration.end(); ++it, idev++)
67  {
68  unsigned int nbRxChannels = it->m_nbRx;
69 
70  for (unsigned int ichan = 0; ichan < nbRxChannels; ichan++)
71  {
72  QString displayedName(QString("SoapySDR[%1:%2] %3").arg(idev).arg(ichan).arg(it->m_label));
73  QString serial(QString("%1-%2").arg(it->m_driverName).arg(it->m_sequence));
74  qDebug("SoapySDRInputPlugin::enumSampleSources: device #%d (%s) serial %s channel %u",
75  idev, it->m_label.toStdString().c_str(), serial.toStdString().c_str(), ichan);
76  result.append(SamplingDevice(displayedName,
79  serial,
80  idev,
83  nbRxChannels,
84  ichan));
85  }
86  }
87 
88  return result;
89 }
static DeviceSoapySDR & instance()
const std::vector< DeviceSoapySDRScan::SoapySDRDeviceEnum > & getDevicesEnumeration() const
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
static const QString m_deviceTypeID
Exposes a single input stream that can be one of the streams of a physical device.
static const QString m_hardwareID
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & SoapySDRInputPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 48 of file soapysdrinputplugin.cpp.

References m_pluginDescriptor.

49 {
50  return m_pluginDescriptor;
51 }
static const PluginDescriptor m_pluginDescriptor

◆ initPlugin()

void SoapySDRInputPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 53 of file soapysdrinputplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

54 {
55  pluginAPI->registerSampleSource(m_deviceTypeID, this);
56 }
void registerSampleSource(const QString &sourceName, PluginInterface *plugin)
Definition: pluginapi.cpp:9
static const QString m_deviceTypeID
+ Here is the call graph for this function:

Member Data Documentation

◆ m_deviceTypeID

const QString SoapySDRInputPlugin::m_deviceTypeID = SOAPYSDRINPUT_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString SoapySDRInputPlugin::m_hardwareID = "SoapySDR"
static

Definition at line 48 of file soapysdrinputplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

const PluginDescriptor SoapySDRInputPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("SoapySDR Input"),
QString("4.5.2"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
QString("https://github.com/f4exb/sdrangel")
}

Definition at line 52 of file soapysdrinputplugin.h.

Referenced by getPluginDescriptor().


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