23 #include "lime/LimeSuite.h" 35 QString(
"LimeSDR Input"),
37 QString(
"(c) Edouard Griffiths, F4EXB"),
38 QString(
"https://github.com/f4exb/sdrangel"),
40 QString(
"https://github.com/f4exb/sdrangel")
63 lms_info_str_t* deviceList;
67 if ((nbDevices = LMS_GetDeviceList(0)) <= 0)
69 qDebug(
"LimeSDRInputPlugin::enumSampleSources: Could not find any LimeSDR device");
73 deviceList =
new lms_info_str_t[nbDevices];
75 if (LMS_GetDeviceList(deviceList) < 0)
77 qDebug(
"LimeSDRInputPlugin::enumSampleSources: Could not obtain LimeSDR devices information");
83 for (
int i = 0;
i < nbDevices;
i++)
85 std::string serial(
"N/D");
89 limeSDRParams.
open(deviceList[i]);
90 limeSDRParams.
close();
94 qDebug(
"LimeSDRInputPlugin::enumSampleSources: device #%d channel %u: %s", i, j, (
char *) deviceList[i]);
95 QString displayedName(QString(
"LimeSDR[%1:%2] %3").
arg(i).
arg(j).
arg(serial.c_str()));
99 QString(deviceList[i]),
115 const QString& sourceId,
126 const QString& sourceId,
145 std::regex serial_reg(
"serial=([0-9,A-F]+)");
146 std::string input(lmsInfoStr);
148 std::regex_search(input, result, serial_reg);
150 if (result[1].str().length()>0)
152 serial = result[1].str();
void registerSampleSource(const QString &sourceName, PluginInterface *plugin)
uint32_t m_nbRxChannels
number of Rx channels (normally 2, we'll see if we really use it...)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Exposes a single input stream that can be one of the streams of a physical device.
bool open(lms_info_str_t deviceStr)
QList< SamplingDevice > SamplingDevices