| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* Changed count_bits64 input parameter type to uint64_t
Signed-off-by: Nicholas Corgan <n.corgan@gmail.com>
|
|
|
|
| |
Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Fix various typos
Found via `codespell v2.0.dev`
`codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stream demuxing block to demultiplex one stream into N output streams.
Demuxes a stream producing N outputs streams that contains n_0 items in
the first stream, n_1 items in the second, etc. and repeats. Number of
items of each output stream is specified using the 'lengths' parameter
like so [n_0, n_1, ..., n_N-1].
Example:
lengths = [2, 3, 4]
input stream: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]
output_streams: [0, 1, 9, 10, ...]
[2, 3, 4, 11, ...]
[5, 6, 7, 8, ...]
|
| |
|
| |
|
|
|
|
| |
Compressed input and output with FLAC and Ogg Vorbis now supported.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was not standards-compliant (assert(0) in constexpr)
Only used in packed_to_unpacked to get the log2(number of bits(type)) in
packed_to_unpacked<type>.
Was not wrapped to python nor public API.
To little surprise, a static method compiles faster, and gets
compile-time-calculated by a modern compiler, too.
|
|
|
|
|
|
|
|
| |
The bin_statistics_f block relies on the SWIG director functionality and
therefore will need to be rewritten in the transition to pybind11.
Additionally it does not appear documented in any way and there are no
example flowgraphs, so it is questionable whether anyone is using it at
this point
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue #1569.
Implement an option in wavfile_sink that allows appending
sound samples at the end of an existing file.
For this, a target WAV file must meet these requirements:
- the file must exist (will not be created if it does not).
- the last chunk in the file must be DATA.
- file params must match the configured ones (i.e. sample_rate, nchan
and bits_per_sample).
|
|
|
|
|
|
|
|
| |
This includes the following:
- WAV header parameters are now stored in a struct.
- do not assume fixed position of data chunk (useful for appending).
- use INT{8,18}T_MAX/MIN.
- 0|NULL -> nullptr.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of this code is automated code changes:
```
set -e
SUB="s/dummy/dummy/"
for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do
SUB="$SUB;s/boost::$i/std::$i/g"
done
SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g"
SUB="$SUB;s^namespace boost^namespace std^g"
find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB"
```
Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add
`#include <algorithm>`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new block provides a native ability to phase shift signals
for solutions such as DoA and array-based projects. The block
supports both variable and message based updates such that
other blocks can provide the appropriate calculations for shifting
and only send message-based updates when necessary. Based on a
block configuration parameter, shift can be specified either
in radians or degrees. his block functions like a multiply const,
but with the const limited to abs() == 1 to provide a constant
phase shift.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* no speed advantage of GR_M_TWOPI: every compiler pre-computes
constants, so that (2 * GR_M_PI) is just as fast
* rest of constants not even used
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
The block uses fseek and ftell, which don't apply to named pipes
and character/block devices.
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For some reason, the block accepts serialized PMT from in-GNU Radio,
then unserializes it, then serializes it back.
All possible uses probably will prefer just passing the PMT itself.
Changing the API inherently fixes the Py3-migration related std::string
handling ambiguity.
|
| |
| |
| |
| | |
milliseconds.
|