summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* runtime: remove ready message receiver queue remnant from basic_blockMarcus Müller2021-04-051-5/+1
| | | | | | 5197311dd22744b784ff9ae2cd965a26ef04f4a4 removed the blocking wait, which utilized this. Time for this to go. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: size_t for vmcircbuf constructorJosh Morman2021-03-251-2/+2
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* runtime: buffer factories use size_tJosh Morman2021-03-259-18/+19
| | | | | | | | Addresses the issue where large buffer size requests get converted back and forth to signed/unsigned and can cause an overflow and the buffer allocation to fail Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* runtime: add int_t and short_t PDU typesJacob Gilbert2021-03-181-1/+17
| | | | | | | These are not used yet but are valid PDUs and should be included here so as not to imply PDUs can have only byte/float/complex type uvec's Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* gr-pdu: move pdu blocks to gr::pduJacob Gilbert2021-03-182-0/+120
| | | | | | | | | | | | | | | | | | | | | Moving the following from gr::blocks into gr-pdu: - pdu_filter block - pdu_remove block - pdu_set block - pdu_to_tagged_stream block - random_pdu block - tagged_stream_to_pdu block Moving the following from gr::blocks into gr-network: - socket_pdu block - stream_pdu_base (noblock) - tcp_connection (noblock) - tuntap_pdu block Moving the following from gr::blocks into gr: - pdu (noblock, general PDU functions) Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* cmake: add compile definition for BOOST_DLLJosh Morman2021-03-131-0/+3
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* cmake: add compiler version statementsJosh Morman2021-03-131-0/+3
| | | | | | | Where std::filesystem is used to allow linking properly on Debian and Centos 8 Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* Replace boost::filesystem with std::filesystemZackery Spytz2021-03-136-26/+19
| | | | Signed-off-by: Zackery Spytz <zspytz@gmail.com>
* runtime: clean up realtime impl namespaceJosh Morman2021-03-083-15/+83
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* cmake: Thrift min version is set at top levelMartin Braun2021-02-181-1/+1
| | | | | | | - Modifies top-level CMake to set the min Thrift version - Modifies FindThrift.cmake to use a version argument Signed-off-by: Martin Braun <martin@gnuradio.org>
* block_executor: invalid states log errors without debug buildMarcus Müller2021-02-181-7/+3
| | | | | | Clean up includes on the way. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gnuradio-runtime: configurable buffer sizekarel2021-02-181-1/+2
| | | | Signed-off-by: karel <5636152+karel@users.noreply.github.com>
* runtime: Fix missing % in pagesize log statementMartin Braun2021-02-151-1/+1
| | | | Signed-off-by: Martin Braun <martin@gnuradio.org>
* Fix typosluz paz2021-02-081-1/+1
| | | | | | | | Found via `codespell v2.1.dev0` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk` Signed-off-by: luz paz <luzpaz@users.noreply.github.com> Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* Removing unused <cerrno> (and includes found on the way)Marcus Müller2021-01-281-2/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* Removed unused <cassert>Marcus Müller2021-01-285-5/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* ctrlport: apply same clang-tidy rules as to rest of codebaseMarcus Müller2021-01-282-4/+5
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: replace /dev/stdin in sine table generatorJosh Blum2021-01-271-1/+2
| | | | | | | /dev/stdin does not exist and was replaced by directing stdout to the file rather than piping stdout to the stdin of an install command Signed-off-by: Josh Blum <josh@joshknows.com>
* Bring man pages in-tree from project gnuradio/pkg_gnuradioDavid Pi2021-01-241-1/+0
| | | | | | | | | | | | | | - Move BUILD_DATE to top CMakeLists so it's available in other modules. Add Z suffix to indicate UTC. - Add a BUILD_DATE_SHORT with just yyy-mm-dd more appropriate for man pages - Put man pages in man/docs and give them a .in extension - Replace version and date placeholders at cmake configure time - Improve gnuradio-companion man page, expanding description and updating options - Remove help2man generated man pages, and man pages for non-existent commands Signed-off-by: David Pi <david.pinho@gmail.com>
* runtime: lib: Don't use hard-coded absolute path constants.Ryan Volz2021-01-212-17/+16
| | | | | | | | | | | | | | | | This replaces the path constants for the prefix, system configuration, and preferences directories with a runtime prefix lookup based on the gnuradio-runtime library location and relative paths from that. Boost >= 1.61 is required, but this is now compatible with the minimum version required by GNU Radio overall. Also use cmake-style paths instead of native paths for substitution to avoid unescaped character problems. Windows is able to use the forward-slash paths just fine, and this also has external benefits (e.g. conda will do path replacement during installation and it substitutes forward-slash paths, so this avoids mixed-slash paths). Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* lib: Clang-format constants.cc.inMartin Braun2021-01-201-83/+43
| | | | | | | Because we always used globs to find the files we re-format, this slipped under the clang-format-radar. Signed-off-by: Martin Braun <martin@gnuradio.org>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-1924-51/+51
| | | | | | | | | | | | | | | | | | | | run /usr/share/clang/run-clang-tidy.py -checks=file '-header-filter=.*' -fix .. from build directory. Then, clang-format -i $(git diff --name-only origin/master) to clang-format changed files. Then, refresh all header hashes in pybind bindings (*/python/bindings/*.cc) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: simplify math fxpt sine/cosine calculationArtem Pisarenko2021-01-171-16/+4
| | | | | | | | | Algorithm improved in order to eliminate getting output values outside of range [-1.0, 1.0) Fixes #2993 Signed-off-by: Artem Pisarenko <artem.k.pisarenko@gmail.com>
* runtime: integrate generation of math sine_table.h into build processArtem Pisarenko2021-01-173-1026/+13
| | | | | | | File sine_table.h is generated artifact and shouldn't be part of sources in order to properly be in sync with changes to gen_sine_table.py Signed-off-by: Artem Pisarenko <artem.k.pisarenko@gmail.com>
* cmake: Fixup BUILD_DATE commit.Ron Economos2021-01-141-4/+1
| | | | Signed-off-by: Ron Economos <w6rz@comcast.net>
* cmake: python: Fix linking when runtime py interpreter != build time.Ryan Volz2021-01-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | This fixes a segmentation fault with the Pybind11 bindings when trying to load any Python module on OSX with a different interpreter than was used at build time (relevant to at least conda and homebrew). This fix was already in place for the prior Swig bindings, but the Pybind11 changes do not incorporate it since they link with ${PYTHON_LIBRARIES} instead of the (fixed) Python::Python target. For clearer separation and to adopt the approach used by the new-ish (3.12) builtin CMake FindPython module, this commit creates a separate Python::Module target to be used when creating a Python extension module (which includes "-undefined" and "dynamic_lookup" for macOS instead of linking directly to the Python library). The Python::Python target that does link to the Python library is still necessary for use as a PRIVATE target (e.g. for runtime and qtgui). For future reference and a general description of best practices for linking Python extension modules, see https://blog.tim-smith.us/2015/09/python-extension-modules-os-x. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* cmake: use TIMESTAMP function for build date and generate constants onceAndrej Rode2021-01-141-6/+7
| | | | | | | | | | | | | Previously a a custom python command was used to generate the build date but this can be done with native CMake functions for all supported CMake versions. Additionally it's compatible with reproducible builds since CMake 3.8 as it honors SOURCE_DATE_EPOCH set in the environment varibales. Thanks to Sebastian Koslowski for pointing out the right way in CMake. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: lib: Put #include <cxxabi.h> behind HAVE_LIBINUWIND.Ryan Volz2021-01-091-2/+1
| | | | | | | It's only needed when libunwind is used, and always including it fails on Windows because the header doesn't exist for MSVC. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: lib: Fix GR_RUNTIME_API declaration in terminate_handler.h.Ryan Volz2021-01-091-1/+1
| | | | Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* C++14: Use std::make_unique instead of boost::make_uniqueMarcus Müller2021-01-045-9/+8
| | | | | | Also, clean up includes Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* pmt: use to_string for char string_refsmormj2020-12-191-2/+2
|
* runtime: Add terminate handlingPaul Wicks2020-12-194-3/+180
| | | | | | | | | | | | | | | | | | | | | | | | This consists of the following changes: 1. Add a top_block parameter to control exception handling This restores past behavior where the scheduler catches exceptions raised in block threads, allowing flowgraphs to continue running after the failure of an individual block. It also adds optional new behavior, selected by setting catch_exceptions=False to the top block, which causes exceptions to not be caught. In this mode of operation, a std::terminate handler can be installed to print a stack trace before the flowgraph exits. 2. Add terminate_handler to top_block_impl This adds a terminate_handler function that prints information about any uncaught exceptions and also attempts to print a backtrace for said exception after which it calls std::abort. The backtrace is printed via libunwind, which is a new optional dependency. If libunwind is not found/installed, then the terminate handler will still print information about the exception and then exit. Co-Authored-By: Scott Torborg <storborg@gmail.com>
* RPC fixes to allow using Thrift-0.13A. Maitland Bottoms2020-12-191-2/+6
| | | | | | | Adds ability for master to build with newer Thrift versions by checking availability of thrift include files. (Also spelling fix: Thift -> Thrift) And fix up logging for rpcserver_thrift class.
* gnuradio-runtime: Fix qa_fast_atan2f test code.Ron Economos2020-11-141-3/+3
|
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-0311-122/+125
|
* Add `override` for common virtual function overridesThomas Habets2020-11-031-2/+2
| | | | | | | | | | Mostly done with: ``` find -name "*_impl.h" | xargs sed -i -r '/(void forecast|int work|int general_work|bool check_topology)\(/{:back /\)/b nxt;N;b back;:nxt s/\)$|\)(;)/) override\1/g}' ``` Then I removed an incorrect `work` that this found.
* Fix typos throughout the codeluzpaz2020-10-291-1/+1
| | | | | | | * Fix various typos Found via `codespell v2.0.dev` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`
* Make hash table a little larger to reduce expensive iteration. The memory ↵Jacob Gilbert2020-10-281-1/+1
| | | | impact is very small, on the order of 10's of kB.
* Replace custom undocumented string hashing algorithm with std::hash. The std ↵Jacob Gilbert2020-10-281-17/+2
| | | | implmentation is slightly faster and has been tested to have similar distribution with arbitrary input data
* runtime: fix Windows loggingjapm482020-10-201-1/+1
| | | | | This removes a few compilation errors in Windows related to logging functions (see PR #3339).
* runtime: remove snprintfClayton Smith2020-10-202-6/+13
|
* gnuradio-runtime, pmt: dont use CMAKE_INSTALL_PREFIX for target ↵Gwenhael Goavec-Merou2020-10-162-2/+2
| | | | INSTALL_INTERFACE
* lib, include: Include missing headers.Ryan Volz2020-10-021-0/+1
| | | | | This fixes compilation with MSVC on conda-forge, although why this wasn't needed earlier is a mystery.
* runtime: fix latency issue caused by setting block alias on message blockJacob Gilbert2020-09-303-5/+9
| | | | This changes how the blocks are identified when they need to be notified that they have messages waiting. It also clarifies the name the block is registered with explicitly, and adds exceptions for looking up blocks that do not exist.
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-031-1/+0
| | | | | | | | | | | | | | | | All of the removed `from __future__ import` were needed in older versions of Python (mostly 2.5.x and below) but later became mandatory in most versions of Python 3 hence are not necessary anymore. More specifically, according to __future__.py[1]: - unicode_literals is part of Python since versions 2.6.0 and 3.0.0; - print_function is part of Python since versions 2.6.0 and 3.0.0; - absolute_import is part of Python since versions 2.5.0 and 3.0.0; - division is part of Python since versions 2.2.0 and 3.0.0; Get rid of those unnecessary imports to slightly clean up the codebase. [1] https://github.com/python/cpython/blob/master/Lib/__future__.py
* Replace all calls to `get_initial_sptr` with `make_block_sptr`Thomas Habets2020-07-304-29/+18
| | | | | | | | | | | | | | First batch of changes: ``` find […] -print0 | xargs -0 sed -i -r '/get_initial_sptr/{:nxt N;/;/!b nxt;s/get_initial_sptr\(\s*new ([^(]+)(.*)\)\)/make_block_sptr<\1>\2)/}' ``` Then: * Back out `sptr_magic.h` edits * Change some `friend` clauses * clang-format the whole thing * Update checksums in the pybind11 bindings files
* controlport: include <algorithm> when using std::for_each()Daniel Estévez2020-07-301-0/+1
| | | | | std::for_each() is defined in <algorithm>, so that if it is not included, it doesn't build in some platforms
* msg_handler: Use lambdas to set msg handlersJohannes Demel2020-06-041-2/+1
| | | | | With this commit, all calls to `set_msg_handler` in `gr-blocks` use lambdas. This helps to use `std::function` instead of `boost::function`.
* msg_handler: Switch from boost::function to std::functionJohannes Demel2020-06-041-1/+2
| | | | | | | This commit is a first stab at moving from `boost::function` to `std::function`. For now, it does only update gr-blocks. Also, this requires more testing. If others can confirm that this change works, I'll continue to update all modules.
* pybind: run clang-formatJosh Morman2020-06-043-12/+13
|