19 #include <libbladeRF.h> 32 QString(
"BladeRF1 Output"),
34 QString(
"(c) Edouard Griffiths, F4EXB"),
35 QString(
"https://github.com/f4exb/sdrangel"),
37 QString(
"https://github.com/f4exb/sdrangel")
61 struct bladerf_devinfo *devinfo = 0;
63 int count = bladerf_get_device_list(&devinfo);
67 for(
int i = 0;
i < count;
i++)
71 int status = bladerf_open_with_devinfo(&dev, &devinfo[
i]);
73 if (status == BLADERF_ERR_NODEV)
75 qCritical(
"BladerfOutputPlugin::enumSampleSinks: No device at index %d", i);
80 qCritical(
"BladerfOutputPlugin::enumSampleSinks: Failed to open device at index %d", i);
84 const char *boardName = bladerf_get_board_name(dev);
86 if (strcmp(boardName,
"bladerf1") == 0)
88 QString displayedName(QString(
"BladeRF1[%1] %2").
arg(devinfo[i].instance).
arg(devinfo[i].serial));
93 QString(devinfo[i].serial),
105 bladerf_free_device_list(devinfo);
113 const QString& sinkId,
124 const QString& sinkId,
static const QString m_hardwareID
void registerSampleSink(const QString &sinkName, PluginInterface *plugin)
static const PluginDescriptor m_pluginDescriptor
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
virtual DeviceSampleSink * createSampleSinkPluginInstance(const QString &sinkId, DeviceAPI *deviceAPI)
#define BLADERF1OUTPUT_DEVICE_TYPE_ID
Exposes a single output stream that can be one of the streams of a physical device.
void initPlugin(PluginAPI *pluginAPI)
const PluginDescriptor & getPluginDescriptor() const
Bladerf1OutputPlugin(QObject *parent=NULL)
virtual PluginInstanceGUI * createSampleSinkPluginInstanceGUI(const QString &sinkId, QWidget **widget, DeviceUISet *deviceUISet)
virtual SamplingDevices enumSampleSinks()
static const QString m_deviceTypeID
QList< SamplingDevice > SamplingDevices