summaryrefslogtreecommitdiff
path: root/gr-blocks/lib
Commit message (Collapse)AuthorAgeFilesLines
* logging core: replace log4cpp by spdlogMarcus Müller2021-11-191-5/+6
| | | | | | | | also: enable formerly disabled qa_logger tests This replaces log4cpp with spdlog. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: Custom Buffer/Accelerator Device Support - Milestone 1David Sorber2021-10-252-1/+3
| | | | | | | | | | | | | | | 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-212-54/+63
| | | | | | | 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>
* IWYU: iomanip, iostream, sstreamMarcus Müller2021-09-072-1/+4
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* modules: include boost/format where usedMarcus Müller2021-09-0718-0/+18
| | | | | | | | | | | | | | | | | | | in the classic modules: audio blocks digital dtv fec fft filter qtgui trellis/fsm uhd video-sdl vocoder/freedv_rx Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: use common precompiled headersMarcus Müller2021-07-191-1/+10
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* digital: pack_k_bits propagate tags correctlyJason Uher2021-07-192-0/+18
| | | | | | fixes #1111 Signed-off-by: Jason Uher <jason.uher@jhuapl.edu>
* blocks: Throttle consume-only modeMarcus Müller2021-07-191-3/+7
| | | | | | | | | When throttling a sample flow, it's not necessary to produce items at the desired average rate - consuming them at a limited rate suffices to slow down the processing of the whole flow graph just as well, and avoids a copy. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: tagged_file_sink: don't sort; get_tags_in_range is already sortedMarcus Müller2021-07-191-3/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: zero-output, zero-copy Head modeMarcus Müller2021-06-281-2/+8
| | | | | | | | | If you don't want to test a stream with an exact number of input, but just want your flow graph to terminate after a given number of items, having a head block without an output enables you to do that without copying the data from Head's in- to its output. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: annotator_alltoall: include <sstream>, not cstring; reduce PMT overheadMarcus Müller2021-06-171-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: remove unused <iomanip>, fix other includes in affected files when ↵Marcus Müller2021-06-175-7/+1
| | | | | | obvious Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging: remove <iostream> from logger.h, add where consequently missingMarcus Müller2021-06-171-0/+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-1710-10/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: use VOLK popcnt implementations for count_bitsNicholas Corgan2021-05-131-12/+10
| | | | | | * Changed count_bits64 input parameter type to uint64_t Signed-off-by: Nicholas Corgan <n.corgan@gmail.com>
* blocks: remove deprecated network blocksJosh Morman2021-04-217-668/+0
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* Store tag key on a static variableIgor Freire2021-04-171-1/+2
| | | | Signed-off-by: Igor Freire <igor@blockstream.com>
* Remove #if 0Igor Freire2021-04-171-7/+0
| | | | Signed-off-by: Igor Freire <igor@blockstream.com>
* blocks: Add msg port to set rotator's phase incIgor Freire2021-04-172-6/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Receivers commonly estimate the frequency offset on a block that is downstream relative to the frequency correction NCO. In such architectures, typically the frequency offset estimator feeds the estimation back to the NCO. Until now, this was not possible if using the rotator block as the NCO. This patch adds a message port to the rotator block such that the referred feedback architecture becomes feasible. A downstream block can estimate the frequency offset and send a message to the rotator block to update its rotating frequency (i.e., its phase increment). The requesting block can schedule the phase increment update to a specific absolute sample index. This feature is useful for receivers that rely on a frame structure and pilot-aided frequency offset estimation. If the true frequency offset is allowed to change at any random instant throughout the frame, the frame-averaged frequency offset estimation can become less reliable. Instead, it is often better to update the frequency correction right at the start of a new frame. With that, the true frequency offset is preserved in the course of a frame and only changes around the boundary between consecutive frames. For flexibility when using this feature, it is the responsibility of the downstream block to schedule the phase increment update properly. For example, if there is a decimator in between the rotator block and the frequency offset estimator, the latter will need to take the sample rate conversion into account when defining the absolute sample offset when the update should be applied. Besides, the rotator block can now place a tag on the sample where it updates the phase increment. This allows a downstream block to better calibrate and validate the scheduling of phase increment updates. Signed-off-by: Igor Freire <igor@blockstream.com>
* runtime, blocks, network: Clean up use of Win headers, fix stream_pdu.Ryan Volz2021-04-172-25/+2
| | | | | | | stream_pdu_base was failing to compile on Windows after moving to gr-network since HAVE_IO_H was not checked for or defined. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* blocks: message_debug: mutex getting the stored message countMarcus Müller2021-03-231-1/+5
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: message_debug: avoid refcount modification in 'hot' PMT handlingMarcus Müller2021-03-232-11/+13
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: message_debug: vector indices are size_t, not signed intMarcus Müller2021-03-232-5/+5
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: replace ::bind with lambdaMarcus Müller2021-03-202-2/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gr-blocks: remove pdu blocksJacob Gilbert2021-03-1822-1591/+0
| | | | | | | | | | | | | | | | | | | | | | | | The following have been moved to the new gr::pdu module or to gr::network and are no longer needed in gr::blocks: - pdu (noblock) - pdu_filter block - pdu_remove block - pdu_set block - pdu_to_tagged_stream block - random_pdu block - socket_pdu block - stream_pdu_base (noblock) - tagged_stream_to_pdu block - tcp_connection (noblock) - tuntap_pdu block The digital and FEC modules had a large number of references to the PDU blocks that were moved from gr-blocks to gr-pdu, this updates these changes in example flowgraphs and a few python files. The usage-manual update will be propagated to the wiki so that future exports will remain up to date. Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* gr-blocks: Fix Remove DC Spike AutoSync block.Ron Economos2021-03-161-4/+6
| | | | Signed-off-by: Ron Economos <w6rz@comcast.net>
* gr-blocks: deprecate print_pdu port of message_debug blockJacob Gilbert2021-02-252-28/+32
| | | | | | | | | Having two print ports on this block has confused a number of people, most recently issue #4191, and combining them is straightforward and should make this block easier to use. The print_pdu formatting is now be applied on the print port if the message is a PDU. Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* removed ssize_t, which is not standard C, and we're a C++ projectMarcus Müller2021-02-234-14/+18
| | | | | | Co-authored-by: Josh Morman <jmorman@perspectalabs.com> Signed-off-by: Josh Morman <jmorman@perspectalabs.com> Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* digital: packed<->unpacked: check chunk sizes, incl. NDBEBUG buildsMarcus Müller2021-02-182-14/+19
| | | | | | | | Also, get rid of impossible asserts(), and throw exceptions instead of assert(0)-aborting, as we now have facilities to handle failed block::work(). Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* CMake: remove unused compile/header checksMarcus Müller2021-02-181-42/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gr-blocks: Update message debug error handling on Print PDU portJacob Gilbert2021-02-131-1/+2
| | | | | | Currently non PDU messages get silently dropped. This can mask connection issues; given this is a debug block a WARNing messages seems appropriate Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* gr-blocks: Fix control loop set_frequency() bounds check.David Pi2021-02-121-2/+2
| | | | Signed-off-by: David Pi <david.pinho@gmail.com>
* gr-blocks: tuntap_pdu: change char array size to fix warning on strncpyJeff Long2021-02-111-4/+6
| | | | Signed-off-by: Jeff Long <willcode4@gmail.com>
* Remove unneeded boost includes and avoid boost depreciated warningsVolker Schroer2021-02-071-1/+0
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* Removing unused <cerrno> (and includes found on the way)Marcus Müller2021-01-283-18/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-1937-48/+42
| | | | | | | | | | | | | | | | | | | | 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>
* File Source: handle EOF for non-seekable filesJeff Long2021-01-151-6/+15
| | | | | | Based on original PR by esqt. Signed-off-by: Jeff Long <willcode4@gmail.com>
* blocks: Use templates more efficiently in add_blkJohannes Demel2021-01-141-22/+35
| | | | | | | Compare recent changes in the moving_average block with those templatized `volk_add` functions instead of whole work functions being templatized. It should now be easier to add further templates for other block types.
* peak_detector2: (Hopefully) correct fix for #3345rear10192021-01-112-10/+22
|
* peak_detector2: bug fix and add a test caseCallyan2021-01-111-1/+2
|
* peak_detector2: Return correct number of consumed itemsrear10192021-01-111-1/+1
| | | | This fixes #3345.
* gr-blocks: Check fseek() for failureZackery Spytz2021-01-111-3/+9
| | | | | | Some fseek() calls were not being checked for failure. Signed-off-by: Zackery Spytz <zspytz@gmail.com>
* C++14: Use std::make_unique instead of boost::make_uniqueMarcus Müller2021-01-043-8/+8
| | | | | | Also, clean up includes Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gr-blocks: Fix file source block large file handling for Windows.Ron Economos2020-12-181-2/+2
|
* build: Remove clang override warnings.Ron Economos2020-12-076-22/+22
|
* build: Remove clang unused variable warnings.Ron Economos2020-12-071-4/+0
|
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-03108-316/+322
|
* Add `override` for common virtual function overridesThomas Habets2020-11-03143-169/+165
| | | | | | | | | | 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.
* blocks: use posix_fadvise to tell OS about sequential access and prefetchMarcus Müller2020-10-281-1/+28
|
* blocks: improvements to the message_debug blockJacob Gilbert2020-10-242-36/+62
| | | | aggregates the data to be printed into a stringstream so that it is printed at the same time reducing debug information becoming muddled between competing cout statements. this change also provides an argument to this block to disable the printing of PDU uniform vectors which are often not needed for debug purposes