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

#include <xtrxinputplugin.h>

+ Inheritance diagram for XTRXInputPlugin:
+ Collaboration diagram for XTRXInputPlugin:

Public Member Functions

 XTRXInputPlugin (QObject *parent=0)
 
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 = "XTRX"
 
static const QString m_deviceTypeID = XTRX_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 29 of file xtrxinputplugin.h.

Constructor & Destructor Documentation

◆ XTRXInputPlugin()

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

Definition at line 48 of file xtrxinputplugin.cpp.

48  :
49  QObject(parent)
50 {
51 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 119 of file xtrxinputplugin.cpp.

References m_deviceTypeID.

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

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 101 of file xtrxinputplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

105 {
106  if(sourceId == m_deviceTypeID)
107  {
108  XTRXInputGUI* gui = new XTRXInputGUI(deviceUISet);
109  *widget = gui;
110  return gui;
111  }
112  else
113  {
114  return 0;
115  }
116 }
static const QString m_deviceTypeID
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices XTRXInputPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 63 of file xtrxinputplugin.cpp.

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

64 {
65  SamplingDevices result;
66  xtrx_device_info_t devs[32];
67  int res = xtrx_discovery(devs, 32);
68  int i;
69  for (i = 0; i < res; i++) {
70  DeviceXTRXParams XTRXParams;
71  for (unsigned int j = 0; j < XTRXParams.m_nbRxChannels; j++)
72  {
73  qDebug("XTRXInputPlugin::enumSampleSources: device #%d channel %u: %s", i, j, devs[i].uniqname);
74  QString displayedName(QString("XTRX[%1:%2] %3").arg(i).arg(j).arg(devs[i].uniqname));
75  result.append(SamplingDevice(displayedName,
78  QString(devs[i].uniqname),
79  i,
82  XTRXParams.m_nbRxChannels,
83  j));
84  }
85  }
86  return result;
87 }
static const QString m_hardwareID
static const QString m_deviceTypeID
uint32_t m_nbRxChannels
number of Rx channels
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.
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & XTRXInputPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 53 of file xtrxinputplugin.cpp.

References m_pluginDescriptor.

54 {
55  return m_pluginDescriptor;
56 }
static const PluginDescriptor m_pluginDescriptor

◆ initPlugin()

void XTRXInputPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 58 of file xtrxinputplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

59 {
60  pluginAPI->registerSampleSource(m_deviceTypeID, this);
61 }
static const QString m_deviceTypeID
void registerSampleSource(const QString &sourceName, PluginInterface *plugin)
Definition: pluginapi.cpp:9
+ Here is the call graph for this function:

Member Data Documentation

◆ m_deviceTypeID

const QString XTRXInputPlugin::m_deviceTypeID = XTRX_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString XTRXInputPlugin::m_hardwareID = "XTRX"
static

Definition at line 47 of file xtrxinputplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

const PluginDescriptor XTRXInputPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("XTRX 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 51 of file xtrxinputplugin.h.

Referenced by getPluginDescriptor().


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