summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio/gr
Commit message (Collapse)AuthorAgeFilesLines
...
* pybind: remove forecast from python bindingsJosh Morman2021-02-185-35/+0
| | | | | | | | There is no scenario that a block or app should be calling forecast over the python interface. This is only called by the scheduler, and for python blocks would pass through the gateway interface. Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-195-5/+5
| | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | 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: added missing algorithm headerJosh Blum2021-01-111-1/+1
| | | | | | tag_checker.h uses std::sort Signed-off-by: Josh Blum <josh@joshknows.com>
* runtime: Add terminate handlingPaul Wicks2020-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* runtime: abolish the gru python moduleMarcus Müller2020-12-171-29/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-0314-14/+14
|
* qa: run autopep8 formatting on qa python filesmormj2020-10-306-31/+45
| | | | | | find ./ -iname qa*.py | xargs autopep8 --in-place -a -a mostly formats whitespace and gets rid of trailing semicolons
* qa: remove xml file parameter causing deprecation warningsmormj2020-10-306-6/+6
|
* Fix typos throughout the codeluzpaz2020-10-292-4/+4
| | | | | | | * Fix various typos Found via `codespell v2.0.dev` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`
* pybind11: Remove SWIG remnants.Ron Economos2020-10-121-1/+1
|
* runtime: add alias for io_signature{v,3,2}Josh Morman2020-08-141-0/+4
|
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-0310-16/+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-303-3/+3
| | | | | | | | | | | | | | 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
* pybind: include and enable realtime_impl wrappingMarcus Müller2020-06-222-3/+3
| | | | | This solves the issue of gr.enable_realtime_scheduling() failing because rt_status_t wasn't wrapped without.
* pybind: update hash for basic_block.hJosh Morman2020-06-041-1/+1
|
* pybind: add hash check to binding file creation (#3472)mormj2020-06-0445-46/+398
|
* runtime: replace py gateway with pybind11 support, remove fevalJosh Morman2020-06-041-99/+0
|
* runtime: disable prefs from python bindingsJosh Morman2020-06-041-2/+2
|
* runtime: add pybind11 bindingsJosh Morman2020-06-04106-212/+7342
|
* Update license header to SPDX formatdevnulling2020-01-2716-208/+16
|
* Exception Handling QA: increase wait time to ensure error could've occuredMarcus Müller2020-01-061-2/+2
| | | | | Prior to this, the unit test was flaky, especially when running the test suite concurrently, as test setup could take more than 0.5 s.
* runtime: add GR_PREFS_PATH env variable searchJosh Morman2020-01-061-0/+40
| | | | | | | When looking for the config file, allow the env variable GR_PREFS_PATH to be searched so that multiple installations of GR each with its own prefs can be used, similar to what is currently done in GRC
* Add a top_block parameter to control exception handlingScott Torborg2020-01-052-23/+35
| | | | | | | | | 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.
* Remove catch statements from thread_body_wrapper.hPaul Wicks2020-01-051-0/+83
| | | | | | | | | | This commit removes the catch statements from thread_body_wrapper.h. The reason to do this is that, as-is, a single block in a flowgraph may throw an exception and stop functioning, but the only indication of this to the user is printing the exception's what() to stderr. With this patch, any uncaught exception will call std::terminate, which should still print the exception's what(), but will also terminate the process, rather than leaving a zombie flowgraph.
* Fix for misc. documentation + trivial typosluz.paz2019-07-172-3/+3
| | | | | | | | | | | | | Found via `codespell -q 3 -L ans,sinc,hist,ist,ith,uint,fo -S ./volk` Fix typos in gnuradio-runtime/ Fix typos in gr-digital/ Fix typos in gr-qtgui/ Fix typos in gr-channels/ Fix typos in grc/ Fix typos gr-filter/ Fix typos in gr-uhd/ Fix typos in gr-blocks/ Fix typos in gr-fec/
* pmt: remove intrusive_ptrAndrej Rode2019-04-191-8/+8
|
* runtime: gr_threading clutch obsolete; remove it and its usageMarcus Müller2018-11-125-1570/+4
| | | | | | | | We essentially monkeypatched Python's `threading` module inelegantly to get around shortcomings in Python 2.3 and 2.4. Since support for these versions is long gone: removal of this clutch and its usage.
* Merge remote-tracking branch 'origin/next' into merge_nextMarcus Müller2018-08-3118-110/+145
|\
| * Merge branch 'python3_fix' into nextAndrej Rode2018-06-2418-112/+148
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manual merge conflict resolution has been applied to following conflicts: * Typos: * gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py * gr-blocks/python/blocks/qa_wavfile.py * gr-filter/examples/gr_filtdes_api.py * grc/blocks/parameter.xml * gr-uhd/python/uhd/__init__.py * ValueError -> RuntimeError: * gr-blocks/python/blocks/qa_hier_block2.py * relative Imports & other Py3k: * gr-digital/python/digital/psk_constellations.py * gr-digital/python/digital/qam_constellations.py * gr-digital/python/digital/test_soft_decisions.py * gr-digital/python/digital/gfsk.py * SequenceCompleter: * gr-utils/python/modtool/modtool_add.py * gr-utils/python/modtool/modtool_rename.py * gr-utils/python/modtool/modtool_rm.py * Updated API on next: * gr-blocks/grc/blocks_file_source.xml * gr-blocks/python/blocks/qa_file_source_sink.py * gr-qtgui/grc/qtgui_time_sink_x.xml * GRC Py3k Updates: * grc/core/Block.py * grc/core/Constants.py * grc/core/Platform.py * grc/core/utils/odict.py * grc/gui/Actions.py * grc/gui/Block.py * grc/gui/Executor.py * grc/gui/Port.py
| | * python3: update non-GRC components to use python2 or python3Douglas Anderson2017-02-2618-120/+156
| | |
| * | Merge branch 'master' into nextMartin Braun2018-02-033-4/+4
| |\ \
| * \ \ Merge branch 'master' into nextJohnathan Corgan2017-06-221-8/+8
| |\ \ \ | | |_|/ | |/| |
| * | | Merge branch 'master' into nextJohnathan Corgan2016-10-021-0/+58
| |\ \ \
| * | | | cmake: nuke cpack from existenceJohnathan Corgan2016-08-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPack is not used, unmaintaned, and broken. This does not eliminate any MSVC build functionality.
* | | | | Test: adds swig dirs to python tests to allow ctest to run on win buildsgnieboer2018-03-221-0/+5
| | | | |
* | | | | runtime: make py_io_signature iterable, hashableMarcus Müller2018-03-061-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows GRC to iterate the output signatures of epy blocks after switching over to py_io_signature. Fixes #1666.
* | | | | runtime: py_io_signature method documentationMarcus Müller2018-03-061-17/+23
| | | | | | | | | | | | | | | | | | | | Only moved code comments to become docstrings.
* | | | | python gateway: added arg descriptions as docstringsJeff Long2018-02-211-0/+57
| | | | |
* | | | | python gateway: use range instead of xrange for Python 3 compatibilityJeff Long2018-02-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Performance testing shows that the difference between range and xrange is negligable here, using Python 2.7.14.
* | | | | python gateway: use tuples instead of lists where possibleJeff Long2018-02-211-4/+4
| | | | |
* | | | | python gateway: permit a variable number of portsJeff Long2018-02-212-28/+65
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ block in/out ports are described by io_signature, which holds the min number of ports, max number of ports, and a list of type lengths. If len(type lengths) < max number of ports, the last type is assumed to apply to the remaining ports. When a flowgraph is built, a variable number of ports can be connected. Python block ports are specified using a list of numpy types. The number of ports is fixed in the block specification, and the flowgraph must connect exactly that number of ports. This patch changes the Python behavior (while maintaining backward compatibility) to match the C++ behavior. A new py_io_signature class is used to specify port number limits, along with a list of numpy types, like this: in_sig = gr.py_io_signature(2, -1, ['float32', 'float32']) where in_sig is passed to the block super's __init__ as before.
* | | | Comment typo fixing.luz.paz2018-02-033-4/+4
| |_|/ |/| | | | | | | | Luzpaz went ahead and found typos using `codespell -q 3`.
* | | runtime: replace pmt.pmt_swig.* namespace calls with pmt.*gnieboer2017-06-111-8/+8
| |/ |/|
* | runtime: add qa for flowgraphBastian Bloessl2016-10-011-0/+58
|/
* Merge branch 'maint'Johnathan Corgan2015-12-081-1/+50
|\
| * runtime: fix hierarchical block message port flattening/GRC usageTim O'Shea2015-12-081-1/+50
| |
* | runtime: add accessors for in_sig and out_sig in python blocksSebastian Koslowski2015-11-061-0/+7
| |
* | random-analog: fixed reseed issueJohannes Demel2015-09-281-15/+14
| |
* | random-analog: added new uniform integer distribution sourceJohannes Demel2015-09-281-11/+26
| |