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
SoapySDROutputPlugin Class Reference

#include <soapysdroutputplugin.h>

+ Inheritance diagram for SoapySDROutputPlugin:
+ Collaboration diagram for SoapySDROutputPlugin:

Public Member Functions

 SoapySDROutputPlugin (QObject *parent=0)
 
const PluginDescriptorgetPluginDescriptor () const
 
void initPlugin (PluginAPI *pluginAPI)
 
virtual SamplingDevices enumSampleSinks ()
 
virtual PluginInstanceGUIcreateSampleSinkPluginInstanceGUI (const QString &sinkId, QWidget **widget, DeviceUISet *deviceUISet)
 
virtual DeviceSampleSinkcreateSampleSinkPluginInstance (const QString &sinkId, 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 SamplingDevices enumSampleSources ()
 
virtual PluginInstanceGUIcreateSampleSourcePluginInstanceGUI (const QString &sourceId, QWidget **widget, DeviceUISet *deviceUISet)
 
virtual DeviceSampleSourcecreateSampleSourcePluginInstance (const QString &sourceId, DeviceAPI *deviceAPI)
 
virtual void deleteSampleSourcePluginInstanceGUI (PluginInstanceGUI *ui)
 
virtual void deleteSampleSourcePluginInstanceInput (DeviceSampleSource *source)
 
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 = SOAPYSDROUTPUT_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 28 of file soapysdroutputplugin.h.

Constructor & Destructor Documentation

◆ SoapySDROutputPlugin()

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

Definition at line 44 of file soapysdroutputplugin.cpp.

44  :
45  QObject(parent)
46 {
47 }

Member Function Documentation

◆ createSampleSinkPluginInstance()

DeviceSampleSink * SoapySDROutputPlugin::createSampleSinkPluginInstance ( const QString &  sinkId,
DeviceAPI deviceAPI 
)
virtual

Reimplemented from PluginInterface.

Definition at line 122 of file soapysdroutputplugin.cpp.

References m_deviceTypeID.

123 {
124  if(sinkId == m_deviceTypeID)
125  {
126  SoapySDROutput* output = new SoapySDROutput(deviceAPI);
127  return output;
128  }
129  else
130  {
131  return 0;
132  }
133 }
static const QString m_deviceTypeID

◆ createSampleSinkPluginInstanceGUI()

PluginInstanceGUI * SoapySDROutputPlugin::createSampleSinkPluginInstanceGUI ( const QString &  sinkId,
QWidget **  widget,
DeviceUISet deviceUISet 
)
virtual

Reimplemented from PluginInterface.

Definition at line 104 of file soapysdroutputplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSinks().

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

◆ enumSampleSinks()

PluginInterface::SamplingDevices SoapySDROutputPlugin::enumSampleSinks ( )
virtual

Reimplemented from PluginInterface.

Definition at line 59 of file soapysdroutputplugin.cpp.

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

60 {
61  SamplingDevices result;
62  DeviceSoapySDR& deviceSoapySDR = DeviceSoapySDR::instance();
63  const std::vector<DeviceSoapySDRScan::SoapySDRDeviceEnum>& devicesEnumeration = deviceSoapySDR.getDevicesEnumeration();
64  qDebug("SoapySDROutputPlugin::enumSampleSinks: %lu SoapySDR devices. Enumerate these with Tx channel(s):", devicesEnumeration.size());
65  std::vector<DeviceSoapySDRScan::SoapySDRDeviceEnum>::const_iterator it = devicesEnumeration.begin();
66 
67  for (int idev = 0; it != devicesEnumeration.end(); ++it, idev++)
68  {
69  unsigned int nbTxChannels = it->m_nbTx;
70 
71  for (unsigned int ichan = 0; ichan < nbTxChannels; ichan++)
72  {
73  QString displayedName(QString("SoapySDR[%1:%2] %3").arg(idev).arg(ichan).arg(it->m_label));
74  QString serial(QString("%1-%2").arg(it->m_driverName).arg(it->m_sequence));
75  qDebug("SoapySDROutputPlugin::enumSampleSinks: device #%d (%s) serial %s channel %u",
76  idev, it->m_label.toStdString().c_str(), serial.toStdString().c_str(), ichan);
77  result.append(SamplingDevice(displayedName,
80  serial,
81  idev,
84  nbTxChannels,
85  ichan));
86  }
87  }
88 
89  return result;
90 }
static const QString m_deviceTypeID
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
Exposes a single output 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 & SoapySDROutputPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 49 of file soapysdroutputplugin.cpp.

References m_pluginDescriptor.

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

◆ initPlugin()

void SoapySDROutputPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 54 of file soapysdroutputplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSink().

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

Member Data Documentation

◆ m_deviceTypeID

const QString SoapySDROutputPlugin::m_deviceTypeID = SOAPYSDROUTPUT_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString SoapySDROutputPlugin::m_hardwareID = "SoapySDR"
static

Definition at line 48 of file soapysdroutputplugin.h.

Referenced by enumSampleSinks().

◆ m_pluginDescriptor

const PluginDescriptor SoapySDROutputPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("SoapySDR Output"),
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 soapysdroutputplugin.h.

Referenced by getPluginDescriptor().


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