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

#include <rtlsdrplugin.h>

+ Inheritance diagram for RTLSDRPlugin:
+ Collaboration diagram for RTLSDRPlugin:

Public Member Functions

 RTLSDRPlugin (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 = "RTLSDR"
 
static const QString m_deviceTypeID = RTLSDR_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 11 of file rtlsdrplugin.h.

Constructor & Destructor Documentation

◆ RTLSDRPlugin()

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

Definition at line 26 of file rtlsdrplugin.cpp.

26  :
27  QObject(parent)
28 {
29 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 98 of file rtlsdrplugin.cpp.

References m_deviceTypeID.

99 {
100  if (sourceId == m_deviceTypeID)
101  {
102  RTLSDRInput* input = new RTLSDRInput(deviceAPI);
103  return input;
104  }
105  else
106  {
107  return 0;
108  }
109 }
static const QString m_deviceTypeID
Definition: rtlsdrplugin.h:30

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 83 of file rtlsdrplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

87 {
88  if(sourceId == m_deviceTypeID) {
89  RTLSDRGui* gui = new RTLSDRGui(deviceUISet);
90  *widget = gui;
91  return gui;
92  } else {
93  return 0;
94  }
95 }
static const QString m_deviceTypeID
Definition: rtlsdrplugin.h:30
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices RTLSDRPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 41 of file rtlsdrplugin.cpp.

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

42 {
43  SamplingDevices result;
44  int count = rtlsdr_get_device_count();
45  char vendor[256];
46  char product[256];
47  char serial[256];
48 
49  for(int i = 0; i < count; i++) {
50  vendor[0] = '\0';
51  product[0] = '\0';
52  serial[0] = '\0';
53 
54  if(rtlsdr_get_device_usb_strings((uint32_t)i, vendor, product, serial) != 0)
55  continue;
56  QString displayedName(QString("RTL-SDR[%1] %2").arg(i).arg(serial));
57 
58  result.append(SamplingDevice(displayedName,
61  QString(serial),
62  i,
65  1,
66  0));
67  }
68  return result;
69 }
static const QString m_hardwareID
Definition: rtlsdrplugin.h:29
unsigned int uint32_t
Definition: rtptypes_win.h:46
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
static const QString m_deviceTypeID
Definition: rtlsdrplugin.h:30
int32_t i
Definition: decimators.h:244
Exposes a single input stream that can be one of the streams of a physical device.
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & RTLSDRPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 31 of file rtlsdrplugin.cpp.

References m_pluginDescriptor.

32 {
33  return m_pluginDescriptor;
34 }
static const PluginDescriptor m_pluginDescriptor
Definition: rtlsdrplugin.h:33

◆ initPlugin()

void RTLSDRPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 36 of file rtlsdrplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

37 {
38  pluginAPI->registerSampleSource(m_deviceTypeID, this);
39 }
void registerSampleSource(const QString &sourceName, PluginInterface *plugin)
Definition: pluginapi.cpp:9
static const QString m_deviceTypeID
Definition: rtlsdrplugin.h:30
+ Here is the call graph for this function:

Member Data Documentation

◆ m_deviceTypeID

const QString RTLSDRPlugin::m_deviceTypeID = RTLSDR_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString RTLSDRPlugin::m_hardwareID = "RTLSDR"
static

Definition at line 29 of file rtlsdrplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

const PluginDescriptor RTLSDRPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("RTL-SDR Input"),
QString("4.5.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
QString("https://github.com/f4exb/sdrangel")
}

Definition at line 33 of file rtlsdrplugin.h.

Referenced by getPluginDescriptor().


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