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

#include <sdrplayplugin.h>

+ Inheritance diagram for SDRPlayPlugin:
+ Collaboration diagram for SDRPlayPlugin:

Public Member Functions

 SDRPlayPlugin (QObject *parent=NULL)
 
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 = "SDRplay1"
 
static const QString m_deviceTypeID = SDRPLAY_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 sdrplayplugin.h.

Constructor & Destructor Documentation

◆ SDRPlayPlugin()

SDRPlayPlugin::SDRPlayPlugin ( QObject *  parent = NULL)
explicit

Definition at line 42 of file sdrplayplugin.cpp.

42  :
43  QObject(parent)
44 {
45 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 124 of file sdrplayplugin.cpp.

References m_deviceTypeID.

125 {
126  if (sourceId == m_deviceTypeID)
127  {
128  SDRPlayInput* input = new SDRPlayInput(deviceAPI);
129  return input;
130  }
131  else
132  {
133  return 0;
134  }
135 }
static const QString m_deviceTypeID
Definition: sdrplayplugin.h:47

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 106 of file sdrplayplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

110 {
111  if(sourceId == m_deviceTypeID)
112  {
113  SDRPlayGui* gui = new SDRPlayGui(deviceUISet);
114  *widget = gui;
115  return gui;
116  }
117  else
118  {
119  return 0;
120  }
121 }
static const QString m_deviceTypeID
Definition: sdrplayplugin.h:47
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices SDRPlayPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 57 of file sdrplayplugin.cpp.

References arg(), createSampleSourcePluginInstanceGUI(), i, m_deviceTypeID, m_hardwareID, PluginInterface::SamplingDevice::PhysicalDevice, and PluginInterface::SamplingDevice::StreamSingleRx.

58 {
59  SamplingDevices result;
60  int count = mirisdr_get_device_count();
61 
62  char vendor[256];
63  char product[256];
64  char serial[256];
65 
66  for(int i = 0; i < count; i++)
67  {
68  vendor[0] = '\0';
69  product[0] = '\0';
70  serial[0] = '\0';
71 
72  if (mirisdr_get_device_usb_strings((uint32_t)i, vendor, product, serial) != 0)
73  {
74  continue;
75  }
76 
77  qDebug("SDRPlayPlugin::enumSampleSources: found %s:%s (%s)", vendor, product, serial);
78  QString displayedName(QString("SDRPlay[%1] %2").arg(i).arg(serial));
79 
80  result.append(SamplingDevice(displayedName,
83  QString(serial),
84  i,
87  1,
88  0));
89  }
90 
91  return result;
92 }
unsigned int uint32_t
Definition: rtptypes_win.h:46
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
int32_t i
Definition: decimators.h:244
Exposes a single input stream that can be one of the streams of a physical device.
static const QString m_deviceTypeID
Definition: sdrplayplugin.h:47
static const QString m_hardwareID
Definition: sdrplayplugin.h:46
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & SDRPlayPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 47 of file sdrplayplugin.cpp.

References m_pluginDescriptor.

48 {
49  return m_pluginDescriptor;
50 }
static const PluginDescriptor m_pluginDescriptor
Definition: sdrplayplugin.h:50

◆ initPlugin()

void SDRPlayPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 52 of file sdrplayplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

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

Member Data Documentation

◆ m_deviceTypeID

const QString SDRPlayPlugin::m_deviceTypeID = SDRPLAY_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString SDRPlayPlugin::m_hardwareID = "SDRplay1"
static

Definition at line 46 of file sdrplayplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

const PluginDescriptor SDRPlayPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("SDRPlay RSP1 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 50 of file sdrplayplugin.h.

Referenced by getPluginDescriptor().


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