summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio
Commit message (Collapse)AuthorAgeFilesLines
* runtime: configurable blkd_input timerJosh Morman2021-12-102-1/+16
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: Use <spdlog/fmt/fmt.h> header handling SPDLOG_FMT_EXTERNALRyan Volz2021-12-101-1/+1
| | | | | | | | | Regardless of how spdlog was built (with/without SPDLOG_FMT_EXTERNAL), this ensures that the proper fmt headers are included. This makes it so that fmt is not a required dependency when spdlog is built with SPDLOG_FMT_EXTERNAL=OFF. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: add workaround to #define disable logger headerJosh Morman2021-12-061-1/+1
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* cmake: change how test files are build when cross compilingPhilip Balister2021-12-031-1/+6
| | | | | | | | | | | | | | | | | | | | * When cross compiling gnuradio, change how the test files are built. Normally, the gnuradio QA code expects to run in the build tree. For the cross compilng case, we cannot run the QA code during the build process. The changes here allow the creation of an additional package that can be installed on a target that will run the QA code against the installed libraries. Major changes are not using full paths to test files (since they include paths that only exist on the build machine) and not setting environment variables in the shell files to force the QA code to use code in the build tree. This patch disables the C++ only tests, these need some work and then they can be added back for the cross compile case. Signed-off-by: Philip Balister <philip@balister.org>
* runtime: remove unused includes from buffer headersMarcus Müller2021-11-242-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: pep8 formattingJosh Morman2021-11-2423-379/+485
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* modtool: move OOTs equal to components for 3.10 mormj2021-11-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modtool: move OOTs equal to components for 3.10 Signed-off-by: Josh Morman <jmorman@gnuradio.org> * pybind: update some python dir references Signed-off-by: Josh Morman <jmorman@gnuradio.org> * cmake: have pybind address the correct header Signed-off-by: Josh Morman <jmorman@gnuradio.org> * runtime: extend the python search path allow OOT modules to be installed in other places in PYTHONPATH that have a gnuradio directory Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: update python paths for rm Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: minor fixes for new dir structure Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: update the installed cmake targets Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: add include(CMakePackageConfigHelpers) Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: test_modules dir under gnuradio Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: change name of level_enum in py bindingJosh Morman2021-11-211-1/+1
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: minor API cleanupMarcus Müller2021-11-193-3/+3
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging core: replace log4cpp by spdlogMarcus Müller2021-11-194-259/+118
| | | | | | | | also: enable formerly disabled qa_logger tests This replaces log4cpp with spdlog. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: don't include boost/format.hpp in logger.hMarcus Müller2021-11-191-1/+1
| | | | | | this necessitates including it whenever it's used in-tree Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: mark buffer methods as overrideJosh Morman2021-11-031-1/+1
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: pybind version in gnuradio-config-infoJosh Morman2021-10-261-1/+1
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* gr-runtime: Change hier_block2.py __getattr__ to avoid recursive loop in ↵Matt Mills2021-10-261-2/+7
| | | | | | | exception gnuradio-runtime: hier_block2.py __getattr__ recursive loop bug fix #5072 Signed-off-by: Matt Mills <mmills@2bn.net>
* runtime: replace the DEFINE_CUSTOM_BUFFER_TYPE() macro function withDavid Sorber2021-10-253-3/+3
| | | | | | | some advanced template magic; also a few minor type corrections for consistency Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: rename buffer_context to transfer type; also rename theDavid Sorber2021-10-252-2/+2
| | | | | | | | MAKE_CUSTOM_BUFFER_TYPE macro function to DEFINE_CUSTOM_BUFFER_TYPE; mark unused parameters from virtual functions with the [[maybe_unused]] C++ attribute Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: use std::function for callback logicDavid Sorber2021-10-251-1/+1
| | | | Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: Custom Buffer/Accelerator Device Support - Milestone 2David Sorber2021-10-258-5/+87
| | | | | | | | | | | | | | | | | Completion of custom buffer/accelerator device support changes: * Improved custom buffer interface by removing awkward memory allocation functions from the block class * Increased flexibility for creating custom buffers by allowing creation of buffer_single_mapped subclasses * Fully incorporated data movement abstraction into the custom buffer interface and the runtime itself; accelerated blocks are no longer directly responsible for their own data movement * Zero copy back-to-back accelerated blocks are now supported (data no longer needs to be moved back to the host between each block) Signed-off-by: David Sorber <david.sorber@blacklynx.tech> Signed-off-by: Mike Mason <mike.mason@blacklynx.tech>
* runtime: Custom Buffer/Accelerator Device Support - Milestone 1David Sorber2021-10-258-9/+157
| | | | | | | | | | | | | | | Custom Buffer/Accelerator Device Support - Milestone 1 changes: * Refactored existing single mapped buffer code and created single mapped buffer abstraction; wrapping within single mapped buffers is handled explicitly by input blocked and output blocked callbacks that are called from block_executor * Added simple custom buffer allocation interface (NOTE: this interface will change for milestone 2) * Accelerated blocks are still responsible for data transfer but the custom buffer interface eliminates the double copy problem Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* global: Replace stdio logging with loggerDavid Winter2021-10-211-1/+1
| | | | | | | This commit replaces many uses of std::c{out,err} and printf with the appropriate GR_LOG_* directives. Signed-off-by: David Winter <david.winter@analog.com>
* runtime: fix pybind of get_tags_in_window mormj2021-09-291-2/+2
| | | | | | | | | | | | | * runtime: fix pybind of get_tags_in_window Fix issue where get_tags_in_window was bound to and consequently had the same behavior as get_tags_in_range Fixes #5005 Test recommended by ryanvolz fails to validate tag offset not just when nitems_read is 0 Signed-off-by: Josh Morman <jmorman@peratonlabs.com>
* pdu: add samp_rate keyJacob Gilbert2021-09-222-1/+7
| | | | | | | This was omitted accidentally, but is necessary in general for correct processing of PDU data Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* qtgui: Replace pyqwidget() with qwidget()David Winter2021-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, two versions of the `qtwidget` functions existed, `qwidget()` and `pyqwidget()`, with the only difference being that `qwidget()` returned a pointer to the `QWidget` object managed by the corresponding block, while `pyqwidget()` returned that same pointer, but as an integer (Or `PyLong` in this case). While `qwidget()` is used by C++ code accessing the widgets, `pyqwidget()` is only used for the python interface. This makes these two methods redundant, thus this commit entirely removes `pyqwidget()`, and modifies the `qwidget()` python wrapper to behave like `pyqwidget()`. Note that we can be fairly confident that this change will not effect potential users of `qwidget()`, because any invocation on the objects previously returned by `qwidget()` would cause a segmentation fault. This commit also fixes a memory leak: Internally, the `pyqwidget()` functions were returning a PyLong `PyObject *`, which was then upwrapped in a pybind trampoline without decrementing the reference count of that python object. Signed-off-by: David Winter <david.winter@analog.com>
* runtime: remove tag_checkerMarcus Müller2021-07-304-87/+0
| | | | | | | | | | | | | | | | | | | | | | Deprecated on 3.9: `tag_checker` used to be meant for cases where you've gotten an unsorted tag vector (mostly, from `get_tags_in_range`), which you then had to go through in parallel to your samples, to check which tag applies at what sample. For that it sorts the tags; the tags coming from the `get_tags*` functions are sorted already The checking pattern (which `chunks_to_symbols` is the last consumer of) is inefficient: instead of taking the index of the first unprocessed tag and processing all samples up to that index, a check is performed on every sample, which includes calls and multiple indirections. So, since very likely nobody uses this, and because it's a design anti-pattern, deprecating this on 3.9 and removing it with 3.10. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* pdu: adding tags_to_pdu blockJacob Gilbert2021-07-192-1/+26
| | | | Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* pdu: adding pdu_to_stream blockJacob Gilbert2021-07-192-1/+17
| | | | Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* pdu: Adding new blocksJacob Gilbert2021-07-192-1/+10
| | | | | | Added take_skip_to_pdu block and pdu lambda blocks, needs examples still Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* gr: logger: Add logger_get_configured_logger()David Winter2021-07-021-2/+5
| | | | | | | | A helper method is added to gr/lib/logger.cc to facilitate the allocation of loggers which are automatically configured according to the local GNURadio configuration. Signed-off-by: David Winter <david.winter@analog.com>
* runtime: use < instead of compare_offset, remove Python comparison classMarcus Müller2021-06-283-39/+23
| | | | | | | Since the introduction of the comparison operator obsoletes the comparison class, remove it. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: tags can be compared with < instead of offset_compareMarcus Müller2021-06-281-1/+5
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: cleaning up unspecific/mistaken boost dependenciesMarcus Müller2021-06-221-1/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatically remove unused boost includesMarcus Müller2021-06-221-1/+1
| | | | | | | | used command: sed -i '/^#include.*boost.*$/d' $(ag -L '(boost::|BOOST)' $(ag --cpp -l '#include <boost')) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* testing: rm dependencies from disabled components in blocks/runtime testsMarcus Müller2021-06-193-47/+49
| | | | | | | | | This included shifting of the PDU test from runtime to gr-pdu, and making the tests that actually require blocks conditional on whether there's going to be gr-blocks. Also, don't use gr-analog just because you need data. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatic removal of <cstdio> where unusedMarcus Müller2021-06-171-1/+1
| | | | | | | | | | used command: sed -i '/^#include.*cstdio.*$/d' $(ag -L '\b(fscanf|sscanf|printf|sprintf|ftell|fgetpos|fseek|fsetpos|rewind|fopen|freopen|fclose|fflush|setbuf|setvbuf|fread|fwrite|fprintf|feof|ferror|perror|clearerror|rename|tmpfile|tmpnam)\b' $(ag -l 'include.*<cstdio>' gnuradio-runtime)) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logger: move non-interface includes to buffer.ccMarcus Müller2021-06-171-1/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging: remove <iostream> from logger.h, add where consequently missingMarcus Müller2021-06-172-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: remove iostream from all files not use cout|cerr|cin|clogMarcus Müller2021-06-172-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* feature: gr-iioAdam Horden2021-06-041-0/+1
| | | | | | Co-authored-by: Edward Kigwana <ekigwana@scires.com> Co-authored-by: Travis Collins <travis.collins@analog.com> Signed-off-by: Adam Horden <adam.horden@horden.engineering>
* runtime: ctrlport: cmake: Fix thrift dependency for OOTs.Ryan Volz2021-06-011-2/+2
| | | | | | | | | | | | | | | | | | | First, this moves find_package(THRIFT) up to the gnuradio-runtime CMakeLists.txt so that cache variables no longer have to be used to mark the found components. This fixes an issue where the thrift-specific headers were not installed even when thrift was enabled, because on first run the detection was occurring AFTER the runtime include CMakeLists.txt was evaluated. See further discussion in #2734, which solved one issue related to this setup. Further, even with thrift enabled, the thrift headers are not required for OOTs to build against gnuradio-runtime. OOTs would need to take special action to use those headers, in which case they should detect/enable thrift on their own. Thus, this makes the change to not add thrift as an extra dependency for OOTs and switches linking of Thrift::thrift from PUBLIC to PRIVATE. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: ctrlport: cmake: Add target for thrift python bindings.Ryan Volz2021-06-011-0/+4
| | | | | | | | Without a target, the Python bindings are not built (i.e. the custom command is not run) until they are needed, during install. By adding a target, they will be generated during the build step. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* soapy: added Python support for Soapy types needed for full API supportNicholas Corgan2021-05-061-0/+1
| | | | | | | * Fixed gr-soapy Python import * Partially addresses https://github.com/gnuradio/gnuradio/issues/4571 Signed-off-by: Nicholas Corgan <n.corgan@gmail.com>
* runtime: Access d_config_map cleanerThomas Habets2021-05-021-1/+1
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime: Use mutex for prefsThomas Habets2021-05-021-1/+1
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime: Simplify prefsThomas Habets2021-05-021-1/+1
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime/pybind: reduce buffer bindingsJosh Morman2021-04-061-185/+2
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* runtime: fix gr::random API to be fixed-width 64 bit, use XOROSHIRO128+Marcus Müller2021-04-063-3/+82
| | | | | | | | | | | | | | | Seeding being inconsistent between gr::random and things like fastnoise source is an outstanding issue (#1559). Fix that by fixing the API, and pivoting to our built-in XOROSHIRO128+, which is also substantially faster than MT19937. For that purpose, introduce, and python-bind, a wrapper class that can be used with STL distribution shapers. Add a unit test for the (P)RNG. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: remove ready message receiver queue remnant from basic_blockMarcus Müller2021-04-051-1/+1
| | | | | | 5197311dd22744b784ff9ae2cd965a26ef04f4a4 removed the blocking wait, which utilized this. Time for this to go. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* pmt: remove tag_to_pmt method (unused)Josh Morman2021-03-261-9/+0
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* runtime: update thrift binding header hashesMarcus Müller2021-03-242-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime/random: xoroshiro128p.h was _nearly_ C compatibleMarcus Müller2021-03-231-1/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>