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

#include <airspyhfplugin.h>

+ Inheritance diagram for AirspyHFPlugin:
+ Collaboration diagram for AirspyHFPlugin:

Public Member Functions

 AirspyHFPlugin (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 = "AirspyHF"
 
static const QString m_deviceTypeID = AIRSPYHF_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 airspyhfplugin.h.

Constructor & Destructor Documentation

◆ AirspyHFPlugin()

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

Definition at line 44 of file airspyhfplugin.cpp.

44  :
45  QObject(parent)
46 {
47 }

Member Function Documentation

◆ createSampleSourcePluginInstance()

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

Reimplemented from PluginInterface.

Definition at line 131 of file airspyhfplugin.cpp.

References m_deviceTypeID.

132 {
133  if (sourceId == m_deviceTypeID)
134  {
135  AirspyHFInput* input = new AirspyHFInput(deviceAPI);
136  return input;
137  }
138  else
139  {
140  return 0;
141  }
142 }
static const QString m_deviceTypeID

◆ createSampleSourcePluginInstanceGUI()

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

Reimplemented from PluginInterface.

Definition at line 113 of file airspyhfplugin.cpp.

References m_deviceTypeID.

Referenced by enumSampleSources().

117 {
118  if (sourceId == m_deviceTypeID)
119  {
120  AirspyHFGui* gui = new AirspyHFGui(deviceUISet);
121  *widget = gui;
122  return gui;
123  }
124  else
125  {
126  return 0;
127  }
128 }
static const QString m_deviceTypeID
+ Here is the caller graph for this function:

◆ enumSampleSources()

PluginInterface::SamplingDevices AirspyHFPlugin::enumSampleSources ( )
virtual

Reimplemented from PluginInterface.

Definition at line 59 of file airspyhfplugin.cpp.

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

60 {
61  SamplingDevices result;
62  int nbDevices;
63  uint64_t deviceSerials[m_maxDevices];
64 
65  nbDevices = airspyhf_list_devices(deviceSerials, m_maxDevices);
66 
67  if (nbDevices < 0)
68  {
69  qCritical("AirspyHFPlugin::enumSampleSources: failed to list Airspy HF devices");
70  }
71 
72  for (int i = 0; i < nbDevices; i++)
73  {
74  if (deviceSerials[i])
75  {
76  QString serial_str = QString::number(deviceSerials[i], 16);
77  QString displayedName(QString("AirspyHF[%1] %2").arg(i).arg(serial_str));
78 
79  result.append(SamplingDevice(displayedName,
82  serial_str,
83  i,
86  1,
87  0));
88 
89  qDebug("AirspyHFPlugin::enumSampleSources: enumerated Airspy HF device #%d", i);
90  }
91  else
92  {
93  qDebug("AirspyHFPlugin::enumSampleSources: finished to enumerate Airspy HF. %d devices found", i);
94  break; // finished
95  }
96  }
97 
98  return result;
99 }
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
static const int m_maxDevices
int32_t i
Definition: decimators.h:244
static const QString m_deviceTypeID
Exposes a single input stream that can be one of the streams of a physical device.
static const QString m_hardwareID
QList< SamplingDevice > SamplingDevices
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48
+ Here is the call graph for this function:

◆ getPluginDescriptor()

const PluginDescriptor & AirspyHFPlugin::getPluginDescriptor ( ) const
virtual

Implements PluginInterface.

Definition at line 49 of file airspyhfplugin.cpp.

References m_pluginDescriptor.

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

◆ initPlugin()

void AirspyHFPlugin::initPlugin ( PluginAPI pluginAPI)
virtual

Implements PluginInterface.

Definition at line 54 of file airspyhfplugin.cpp.

References m_deviceTypeID, and PluginAPI::registerSampleSource().

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

Member Data Documentation

◆ m_deviceTypeID

const QString AirspyHFPlugin::m_deviceTypeID = AIRSPYHF_DEVICE_TYPE_ID
static

◆ m_hardwareID

const QString AirspyHFPlugin::m_hardwareID = "AirspyHF"
static

Definition at line 46 of file airspyhfplugin.h.

Referenced by enumSampleSources().

◆ m_maxDevices

const int AirspyHFPlugin::m_maxDevices = 32
static

Definition at line 48 of file airspyhfplugin.h.

Referenced by enumSampleSources().

◆ m_pluginDescriptor

const PluginDescriptor AirspyHFPlugin::m_pluginDescriptor
staticprivate
Initial value:
= {
QString("AirspyHF 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 airspyhfplugin.h.

Referenced by getPluginDescriptor().


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