Range-based for loops are available since C++11. Using them reduces
gr-osmosdr's dependence on Boost. Here I've done the replacement using a
global search-and-replace.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
Support for the original FUNcube Dongle used to live in GNU Radio's
gr-fcd module, which was removed in version 3.8. As a result, gr-osmosdr
lost support for both FUNcube Dongle and FUNcube Dongle Pro+.
The gr-fcdproplus out-of-tree module subsequently added support for the
original FUNcube Dongle, meaning that it now supports both types. As a
result, FUNcube support can easily be restored in gr-osmosdr. The
now.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
XXX
CMake 3.13 is not present in older (~2 years old)
Linux distributions and GNU Radio requires min CMake
version 3.8.
All that is needed in order to avoid bumping CMake version
is to not use 'target_link_libraries' in subdirectories.
Here this is done by creating a list of needed
libraries and adding them for linking at the end (like
it was done in gr-osmosdr before porting to GNU Radio 3.8).
One thing that is lost here is 'PRIVATE' statement in case
of FCD libraries linking.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
The gnuradio block https://github.com/dl1ksv/gr-fcdproplus must be
installed before building gr-osmosdr.
Available named gains:
Dongle Classic:
LNA: -5 to 30 dB, in 2.5 dB steps
MIX: 4 or 12 dB
Dongle Pro+:
LNA: 0 or 1, meaning off/on only. no information about real values.
MIX: 0 or 1, meaning off/on only. no information about real values.
BB: 0 to 59 dB, in 1 dB steps
This patch also introduces optional "device" and "type" arguments which
allow to override the values automatically picked by gr-osmosdr:
osmocom_fft -a "fcd,device=hw:2,type=2"
The "device" argument overrides the audio device used by the underlying
driver to access the dongle's IQ sample stream.
The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.
Thanks to Alexey Bazhin for the initial patch and Volker Schroer for
testing.
This API allows to acquire a list of devices connected to the host and
creates an argument string ready to be passed to a source object for
cunstruction.
Each device_t entry contains a "label" entry, which holds the generic
device name which may be shown to the user for device selection.
For certain radio hardware extended entries ("name", "serial", "type")
may be available to make bijective device addressing possible.
The argument string for target types "rtl_tcp" and "file" might be
constructed using the osmosdr::device_t class facilities.
Example:
#include <osmosdr_device.h>
#include <osmosdr_source_c.h>
osmosdr::devices_t devs = osmosdr::device::find();
BOOST_FOREACH(osmosdr::device_t &dev, devs) // try to create each dev
osmosdr_source_c_sptr src = osmosdr_make_source_c(dev.to_string());