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 Private Attributes | List of all members
FCDProPlugin Class Reference

#include <fcdproplugin.h>

+ Inheritance diagram for FCDProPlugin:
+ Collaboration diagram for FCDProPlugin:

Public Member Functions

 FCDProPlugin (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 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 fcdproplugin.h.

Constructor & Destructor Documentation

◆ FCDProPlugin()

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

Definition at line 39 of file fcdproplugin.cpp.

39  :
40  QObject(parent)
41 {
42 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 113 of file fcdproplugin.cpp.

114 {
115  if (sourceId == fcd_traits<Pro>::interfaceIID)
116  {
117  FCDProInput* input = new FCDProInput(deviceAPI);
118  return input;
119  }
120  else
121  {
122  return 0;
123  }
124 }

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 95 of file fcdproplugin.cpp.

Referenced by enumSampleSources().

99 {
100  if(sourceId == fcd_traits<Pro>::interfaceIID)
101  {
102  FCDProGui* gui = new FCDProGui(deviceUISet);
103  *widget = gui;
104  return gui;
105  }
106  else
107  {
108  return 0;
109  }
110 }
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices FCDProPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 54 of file fcdproplugin.cpp.

References arg(), createSampleSourcePluginInstanceGUI(), hid_enumerate(), i, hid_device_info::next, PluginInterface::SamplingDevice::PhysicalDevice, hid_device_info::serial_number, and PluginInterface::SamplingDevice::StreamSingleRx.

55 {
56  SamplingDevices result;
57 
58  int i = 0;
60 
61  while (device_info != 0)
62  {
63  QString serialNumber = QString::fromWCharArray(device_info->serial_number);
64  QString displayedName(QString("%1[%2] %3").arg(fcd_traits<Pro>::displayedName).arg(i).arg(serialNumber));
65 
66  result.append(SamplingDevice(displayedName,
69  serialNumber,
70  i,
73  1,
74  0));
75 
76  device_info = device_info->next;
77  i++;
78  }
79 
80  return result;
81 }
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
struct hid_device_info * next
Definition: hidapi.h:78
wchar_t * serial_number
Definition: hidapi.h:57
int32_t i
Definition: decimators.h:244
struct hid_device_info HID_API_EXPORT * hid_enumerate(unsigned short vendor_id, unsigned short product_id)
Enumerate the HID Devices.
Definition: hid-libusb.c:444
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 & FCDProPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 44 of file fcdproplugin.cpp.

References m_pluginDescriptor.

45 {
46  return m_pluginDescriptor;
47 }
static const PluginDescriptor m_pluginDescriptor
Definition: fcdproplugin.h:30

◆ initPlugin()

void FCDProPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 49 of file fcdproplugin.cpp.

References PluginAPI::registerSampleSource().

50 {
52 }
void registerSampleSource(const QString &sourceName, PluginInterface *plugin)
Definition: pluginapi.cpp:9
+ Here is the call graph for this function:

Member Data Documentation

◆ m_pluginDescriptor

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

Definition at line 30 of file fcdproplugin.h.

Referenced by getPluginDescriptor().


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