summaryrefslogtreecommitdiff
path: root/gr-blocks/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* gr-blocks: Add scaling option to Complex to/from ishort and icharghostop142020-02-2011-88/+73
| | | | | | | | | | | | | | | The existing block combinations of complex-to-ichar/ichar-to-complex and complex-to-ishort/ishort-to-complex was not exposing a scale factor to the UI (it was hard-coded at 1.0) which prevented the blocks from being used with voltage-based inputs and outputs, for example a -127 to 127 byte input would be mapped directly to the same value as a float. The same was true in reverse and there were notes in the code about FIX clipping. Adding the scale factor provides a mechanism for the user to appropriately fix the clipping and scale the conversion correctly. Additional documentation was added to the block yml to provide guidance to users on how to appropriately select the scale factor for their use case, and the default value was set to 1.0 for backward compatibility.
* blocks: support saving of all tags on tag debugIgor Freire2020-02-182-9/+34
| | | | | | | | | | For testing, it is often useful to check all tags ever received, rather than solely the tags from the last call to the Tag Debug's work function. This patch adds this option and a public method for activating it. This is more appropriate for controlled test environments, where the vector of tags is known not to grown indefinitely. Hence, the option is not exposed as a block parameter.
* Blocks: Add DC Spike Removal and IQ Swap Native Blocksghostop142020-02-159-0/+738
| | | | | | | | | | | | This block incorporates the OOT modules in correctiq that provide 3 different techniques to remove the DC spike inherent in IQ sampling. The first technique mirrors SDR GUI receivers with an IIR filter approach, the second provides a time-limited IIR approach where after a user-configurable number of seconds locks into a basic offset correction to eliminate the effect of the filter on the signal while maintaining the correction, and the last is manual I and Q configurable offsets. The Swap IQ block is a drop-in block to help correct for inverted spectrums and just swaps I<->Q.
* gr-digital: Improve Performance of Costas Loopghostop142020-02-141-22/+0
| | | | | | | | | | | | | This update is focused on improving the throughput of the Costas loop, however some changes are more global performance enhancements as this PR has evolved. Updates include an ENABLE_NATIVE added to CMake, which is off by default but enables native compiling (including FMA support) if desired; sincos was inlined in sincos.h and sincos.cc was removed from the appropriate CMake to improve sincos speed, some constants were added to math.h, inlined functions in costas loop and nco.h, used switch instead of function pointer (much faster), and used fast complex multiply to get around all the range checking in the standard complex.h complex multiply function on all builds.
* runtime: release the flattened flowgraph after stoppingClayton Smith2020-02-081-0/+30
|
* gr-blocks: copy samples before sleeping in throttleClayton Smith2020-02-041-5/+6
|
* gr-blocks: use monotonic clock for throttleClayton Smith2020-02-042-17/+17
| | | | | | To ensure that the throttle block operates normally even if the system clock changes, I've switched it to use std::chrono::steady_clock, which is a monotonic clock.
* Update license header to SPDX formatdevnulling2020-01-27324-4212/+324
|
* Added in/out selector msg portsghostop142020-01-242-1/+46
| | | | Input and output port selection can now be controlled by messages.
* blocks/file_source: Check for fseek() failingThomas Habets2020-01-201-3/+9
| | | | | | Found by coverity. CID: * 1395913 * 1395940
* blocks/tagged_file_sink: Add const and enum type safetyThomas Habets2020-01-202-13/+14
| | | | Found by coverity. CID 1043276
* Fix all formatting issuesMartin Braun2020-01-105-10/+6
| | | | | This fixes every leftover file in the GNU Radio source tree to match our clang-format definition.
* gr-blocks/unpacked_to_packed: Remove needless castThomas Habets2020-01-061-1/+1
|
* Change some ints to unsigned intThomas Habets2020-01-061-1/+1
|
* gr-blocks: More constThomas Habets2020-01-0610-17/+17
|
* gr-blocks/packed&unpacked: More constexprThomas Habets2020-01-062-3/+3
|
* gr-blocks/packed&unpacked: Add constThomas Habets2020-01-064-15/+15
|
* gr-blocks: Make d_vlen constThomas Habets2020-01-0634-34/+34
|
* gr-blocks: VOLKize add_const_ff implementationGrant Cox2020-01-044-30/+30
| | | | | | | | | | | | - Use volk_32fc_x2_add_32fc to volk add constants to the input vector of the block - use volk::vector in add_const_ff_impl: Rather than using float* for variable length vector addition in volk, use volk::vector<float> for easier resizing. - Use scoped_lock when modifying private data members in add_const_ff_impl.cc. Remove getter functions for the d_k_copy vector. Cast with static_cast rather than typical cast. Use vector.data() rather than &vector[0].
* Replace many `const` variables with `constexpr`Thomas Habets2020-01-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constexpr is like const but (for variables) guarantees evaluation at compile time (as opposed to runtime). Likely this change will do nothing on its own (though it could, since it gives the compiler more information). But it still has benefits. It allows programmer to know that initialization is not expensive (it was done at compile time), and reduces risk of a refactoring regressing the compiletimeness. Runtime initialization can be nonobvious in larger codebases. E.g.: struct S { static int foo(); }; const int bar = S::foo(); // Called and initialized at *runtime*. int S::foo() { return 10; } With constexpr: struct S { static constexpr int foo(); }; constexpr int bar = S::foo(); // Error: used before definition. constexpr int S::foo() { return 10; } Initializing at runtime is not just startup costs, but also can save memory since it'll end up in a R/O section of a binary and therefore doesn't need to be swapped out, but can be shared (in the mmap() sense of the word).
* message_strobe_random: replace boost::random with C++11Marcus Müller2020-01-022-60/+38
|
* message_strobe_random: inexplicable includes removedMarcus Müller2020-01-021-8/+0
|
* random_pdu: random facilities use C++11 (minus boost)Marcus Müller2020-01-022-10/+7
|
* gr-blocks/file.*: Remove needless memory managementThomas Habets2020-01-023-13/+9
|
* gr-blocks/pack&unpack: Remove needless memory managementThomas Habets2020-01-024-14/+8
|
* Remove newlines from exception messagesThomas Habets2020-01-014-12/+12
|
* Use C++11 ranged for and ranged insert instead of manual loopsThomas Habets2019-12-0412-46/+27
|
* Use 'const' on more member variablesThomas Habets2019-12-043-3/+3
|
* put back checks for io.h in cmake files #2874Grant Cox2019-11-071-0/+1
|
* Remove circular_file.cc from codebase, cmake, qa, and ConfigChecks #2874Grant Cox2019-11-071-1/+0
|
* Fix memset clearing non-trivial type gr_complex warnings in gcc-8Anders Kalør2019-08-221-2/+3
| | | | | | | | Using memset with gr_complex is not a problem since the underlying representation of gr_complex is guaranteed to be two floats in adjacent memory locations without padding or additional memory. Fixes #2743
* clang-tidy in gnuradio-runtime: use empty() instead of size()!=0Marcus Müller2019-08-2210-14/+14
|
* Use emplace_back(params) instead of push_back(type(params))Marcus Müller2019-08-228-51/+50
| | | | | | | | | | | | | | | | | | | This is C++11: you can convert std::vector<complextype> vec; vec.push_back(complextype(foo, bar, baz)); by std::vector<complextype> vec; vec.emplace_back(foo, bar, baz); which saves one unnecessary copy. This mostly happened in rpc code. The automated clang-tidy check failed miserably, so most of this was done by hand.
* clang-format: Ordering all the includesMarcus Müller2019-08-0985-150/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format: ordering includes in gnuradio-runtime clang-format: ordering includes in gr-filter clang-format: ordering includes in gr-fft clang-format: ordering includes in gr-audio clang-format: ordering includes in gr-analog clang-format: ordering includes in gr-fec clang-format: ordering includes in gr-wavelet clang-format: ordering includes in gr-zeromq clang-format: ordering includes in gr-vocoder clang-format: ordering includes in gr-video-sdl clang-format: ordering includes in gr-trellis clang-format: ordering includes in gr-blocks clang-format: ordering includes in gr-digital clang-format: ordering includes in gr-uhd clang-format: ordering includes in gr-dtv clang-format: ordering includes in gr-channels clang-format: ordering includes in gr-qtgui clang_format.py: re-enable include reordering
* Tree: clang-format without the include sortingMarcus Müller2019-08-09319-13798/+13407
|
* blocks: fix multiply matrix complex set_AJosh Morman2019-08-051-1/+1
| | | | | | The multiply_matrix_cc block was converting the values from the set matrix to double when new_A matrix was expecting complex. Convert the PMT to complex instead
* blocks: Remove "@" symbol from sub_ff block nameJohannes Schmitz2019-07-231-1/+1
|
* Fix sign-compare warning in pdu_t_tagged_stream_impl.krk2019-07-211-1/+1
|
* Fix for misc. documentation + trivial typosluz.paz2019-07-171-1/+1
| | | | | | | | | | | | | 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/
* blocks: random_pdu mask parameter fails under python3Josh Morman2019-07-172-4/+4
| | | | | | | | | | | | | | | | The use of chr() in the grc file for the mask creates an invalid input to the random_pdu make function 1) Change the inputs to unsigned char since this is a mask 2) Remove the chr() from the grc yml I'm not entirely sure what the purpose of the chr(mask) in the make function was, but it created invalid input Instead just pass the bitmask directly fixes #2557
* blocks: Fix 8-bit WAV file readinggmazilla2019-06-191-1/+1
| | | | | | 'Wav File Source' block in gnuradio reads PCM 8bit wav files incorrectly. It adds random huge DC component. Caused by garbage in high byte of buf_16bit.
* blocks: replace blks2_selector with new implementationJosh Morman2019-06-153-0/+217
| | | | | | | | blks2_selector was deprecated and finally removed This block implements the same functionality but in a way more similar to the Copy block fixes #2460
* gr-blocks: added fstat macros for msvcgnieboer2019-06-061-1/+4
|
* blocks: simple fix for Boost 1.70.0 in socket_pduMichael Dickens2019-05-281-1/+5
| | | | | | NOTE: There have been multiple fixes proposed, such as https://github.com/gnuradio/gnuradio/pull/2451 . This one is the simplest and most compatible.
* blocks: Modify File Source block to work with named pipes and devices.Ron Economos2019-03-312-33/+66
| | | | | The block uses fseek and ftell, which don't apply to named pipes and character/block devices.
* cmake: Update to modern CMake usageAndrej Rode2019-03-041-78/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes using target based setting of includes and link libraries. This will transitively add the includes and linking flags to dependent targets. This is still a work in progress since only the dynamic libraries have been touched and not all of include_directories directives are gone yet. cmake: remove GR_INCLUDE_SUBDIRECTORY macro Previously this macro was used to inject subdirectories in the current CMake namespace. This is generally undesired and pollutes the current context. previously GNU Radio CMake had a non-default option ENABLE_STATIC_LIBS to build both, shared libraries and static libraries. This seems to be a construction taken over from autotools and serves no purpuose in CMake and complicates the library building. cmake: remove GR_LIBTOOL and la generation support This looks like it was primarily used to support projects using autotools, but comments state that the generated .la files aren't compatible with autotools anyway. cmake: Bump required CMake version to 3.8 UseSWIG cmake uses syntax which requires at least CMake 3.8 and is non-trivial to change
* blocks: Fix file_source offset/length to properly access large files.Ron Economos2019-02-143-45/+29
|
* blocks: Suppress warnings for 32-bit ARM architecturesRon Economos2019-01-141-4/+4
| | | | | add_const_ii_impl was using floating point maximum ranges, probably a leftover part of the removal of gengen. Now, max ranges are ints.
* includes: use quotes for local includesAndrej Rode2019-01-0718-18/+18
|
* blocks: Fix tcp_server_sink_impl alloc-dealloc-mismatchDan Robertson2018-12-181-1/+1
| | | | | The d_buf member of tcp_server_sink_impl is currently typed as a shared pointer to a uint8_t but should be a shared pointer to a uint8_t[].