23 #include "lime/LimeSuite.h" 36 QString(
"LimeSDR Output"),
38 QString(
"(c) Edouard Griffiths, F4EXB"),
39 QString(
"https://github.com/f4exb/sdrangel"),
41 QString(
"https://github.com/f4exb/sdrangel")
64 lms_info_str_t* deviceList;
68 if ((nbDevices = LMS_GetDeviceList(0)) <= 0)
70 qDebug(
"LimeSDROutputPlugin::enumSampleSources: Could not find any LimeSDR device");
74 deviceList =
new lms_info_str_t[nbDevices];
76 if (LMS_GetDeviceList(deviceList) < 0)
78 qDebug(
"LimeSDROutputPlugin::enumSampleSources: Could not obtain LimeSDR devices information");
84 for (
int i = 0;
i < nbDevices;
i++)
86 std::string serial(
"N/D");
90 limeSDRParams.
open(deviceList[i]);
91 limeSDRParams.
close();
95 qDebug(
"LimeSDROutputPlugin::enumSampleSources: device #%d channel %u: %s", i, j, (
char *) deviceList[i]);
96 QString displayedName(QString(
"LimeSDR[%1:%2] %3").
arg(i).
arg(j).
arg(serial.c_str()));
100 QString(deviceList[i]),
116 const QString& sinkId,
127 const QString& sinkId,
146 std::regex serial_reg(
"serial=([0-9,A-F]+)");
147 std::string input(lmsInfoStr);
149 std::regex_search(input, result, serial_reg);
151 if (result[1].str().length()>0)
153 serial = result[1].str();
static bool findSerial(const char *lmsInfoStr, std::string &serial)
void registerSampleSink(const QString &sinkName, PluginInterface *plugin)
const PluginDescriptor & getPluginDescriptor() const
uint32_t m_nbTxChannels
number of Tx channels (normally 2, we'll see if we really use it...)
virtual PluginInstanceGUI * createSampleSinkPluginInstanceGUI(const QString &sinkId, QWidget **widget, DeviceUISet *deviceUISet)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
static const QString m_hardwareID
static const PluginDescriptor m_pluginDescriptor
LimeSDROutputPlugin(QObject *parent=0)
#define LIMESDROUTPUT_DEVICE_TYPE_ID
virtual DeviceSampleSink * createSampleSinkPluginInstance(const QString &sinkId, DeviceAPI *deviceAPI)
static const QString m_deviceTypeID
virtual SamplingDevices enumSampleSinks()
Exposes a single output stream that can be one of the streams of a physical device.
bool open(lms_info_str_t deviceStr)
void initPlugin(PluginAPI *pluginAPI)
QList< SamplingDevice > SamplingDevices