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

#include <plutosdrinputplugin.h>

+ Inheritance diagram for PlutoSDRInputPlugin:
+ Collaboration diagram for PlutoSDRInputPlugin:

Public Member Functions

 PlutoSDRInputPlugin (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 = "PlutoSDR"
 
static const QString m_deviceTypeID = PLUTOSDR_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 plutosdrinputplugin.h.

Constructor & Destructor Documentation

◆ PlutoSDRInputPlugin()

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

Definition at line 44 of file plutosdrinputplugin.cpp.

44  :
45  QObject(parent)
46 {
47 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 121 of file plutosdrinputplugin.cpp.

References m_deviceTypeID.

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

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 103 of file plutosdrinputplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

107 {
108  if(sourceId == m_deviceTypeID)
109  {
110  PlutoSDRInputGui* gui = new PlutoSDRInputGui(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 PlutoSDRInputPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 60 of file plutosdrinputplugin.cpp.

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

61 {
63  std::vector<std::string> serials;
65 
66  std::vector<std::string>::const_iterator it = serials.begin();
67  int i;
68  SamplingDevices result;
69 
70  for (i = 0; it != serials.end(); ++it, ++i)
71  {
72  QString serial_str = QString::fromLocal8Bit(it->c_str());
73  QString displayedName(QString("PlutoSDR[%1] %2").arg(i).arg(serial_str));
74 
75  result.append(SamplingDevice(displayedName,
78  serial_str,
79  i,
82  1,
83  0));
84 
85  qDebug("PlutoSDRInputPlugin::enumSampleSources: enumerated PlutoSDR device #%d", i);
86  }
87 
88  return result;
89 }
static DevicePlutoSDR & instance()
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void getSerials(std::vector< std::string > &serials) const
int32_t i
Definition: decimators.h:244
static const QString m_hardwareID
Exposes a single input stream that can be one of the streams of a physical device.
static const QString m_deviceTypeID
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & PlutoSDRInputPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 49 of file plutosdrinputplugin.cpp.

References m_pluginDescriptor.

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

◆ initPlugin()

void PlutoSDRInputPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 54 of file plutosdrinputplugin.cpp.

References DevicePlutoSDR::instance(), m_deviceTypeID, and PluginAPI::registerSampleSource().

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

Member Data Documentation

◆ m_deviceTypeID

const QString PlutoSDRInputPlugin::m_deviceTypeID = PLUTOSDR_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString PlutoSDRInputPlugin::m_hardwareID = "PlutoSDR"
static

Definition at line 46 of file plutosdrinputplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

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

Definition at line 50 of file plutosdrinputplugin.h.

Referenced by getPluginDescriptor().


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