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

#include <perseusplugin.h>

+ Inheritance diagram for PerseusPlugin:
+ Collaboration diagram for PerseusPlugin:

Public Member Functions

 PerseusPlugin (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 = "Perseus"
 
static const QString m_deviceTypeID = PERSEUS_DEVICE_TYPE_ID
 
static const int m_maxDevices = 32
 

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 perseusplugin.h.

Constructor & Destructor Documentation

◆ PerseusPlugin()

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

Definition at line 45 of file perseusplugin.cpp.

45  :
46  QObject(parent)
47 {
48 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 121 of file perseusplugin.cpp.

References m_deviceTypeID.

122 {
123  if (sourceId == m_deviceTypeID)
124  {
125  PerseusInput* input = new PerseusInput(deviceAPI);
126  return input;
127  }
128  else
129  {
130  return 0;
131  }
132 }
static const QString m_deviceTypeID
Definition: perseusplugin.h:47

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 103 of file perseusplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

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

◆ enumSampleSources()

PluginInterface::SamplingDevices PerseusPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 60 of file perseusplugin.cpp.

References arg(), createSampleSourcePluginInstanceGUI(), DevicePerseus::getSerials(), i, DevicePerseus::instance(), m_deviceTypeID, m_hardwareID, PluginInterface::SamplingDevice::PhysicalDevice, DevicePerseus::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("Perseus[%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("PerseusPlugin::enumSampleSources: enumerated Perseus device #%d", i);
86  }
87 
88  return result;
89 }
static DevicePerseus & instance()
void getSerials(std::vector< std::string > &serials) const
Definition: deviceperseus.h:30
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: perseusplugin.h:47
static const QString m_hardwareID
Definition: perseusplugin.h:46
QList< SamplingDevice > SamplingDevices
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & PerseusPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 50 of file perseusplugin.cpp.

References m_pluginDescriptor.

51 {
52  return m_pluginDescriptor;
53 }
static const PluginDescriptor m_pluginDescriptor
Definition: perseusplugin.h:51

◆ initPlugin()

void PerseusPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 55 of file perseusplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

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

Member Data Documentation

◆ m_deviceTypeID

const QString PerseusPlugin::m_deviceTypeID = PERSEUS_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString PerseusPlugin::m_hardwareID = "Perseus"
static

Definition at line 46 of file perseusplugin.h.

Referenced by enumSampleSources().

◆ m_maxDevices

const int PerseusPlugin::m_maxDevices = 32
static

Definition at line 48 of file perseusplugin.h.

◆ m_pluginDescriptor

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

Referenced by getPluginDescriptor().


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