| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This includes the first edit of a block, so that it's easy to review.
A following commit changes this globally.
|
|\
| |
| |
| |
| |
| | |
Goodbye, and thanks for all the fish, SWIG.
Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Make sure, code is properly formatted everywhere.`
|
| |
| |
| |
| |
| | |
With this commit, all calls to `set_msg_handler` in `gr-blocks` use
lambdas. This helps to use `std::function` instead of `boost::function`.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This improves performance of moving average for me by about 4-5x.
My test is
[here](https://github.com/ThomasHabets/radiostuff/blob/master/amateur/listen_70cm.grc),
which processes 10MHz to find the strongest signal.
Without this PR I see `moving_average` in `top` taking about 89.4-94%
CPU. With this patch it's ~20.4-23.7%. Since without this patch it's
that high, I don't know that it's not even better.
Test measured on a Libremv2 with Intel Core i7-6500U @ 2.5GHz.
The memory access pattern is probably worse with this patch, but at
least on my hardware on my workload this seems to be dwarfed by the
gain of using volk. It can be hard to reason about memory access
patterns, so benchmarks overrule theory.
The test only actually uses float averaging.
More benchmarking may be required.
Possible improvements:
* Add template specialization for `uint16` and `uint32`?
* Refactor for non-volk fallback to use only one loop, with
(presumably) better memory access pattern)
|
|/
|
|
|
|
|
|
| |
The XMLRPC Client block is currently broken because it tries to import
the Python 2 XMLRPC module, and because the "addr" and "callback"
parameters are inserted as quoted strings. To fix these problems, I've
switched to the Python 3 version of the XMLRPC module, and changed the
data types of the problematic parameters to "raw".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code fixes two issues:
1. The code used `::min()` in one place, and "minus infinity" in
another, for the same purpose.
2. It used minus infinity on integer types, which is undefined
behavior.
(1) seems to have been accidentally left out of
9d9ea63c45b5f314eb344a69340ef49e8edafdfa.
(2)
Section 4.9:
> The behavior is undefined if the truncated value cannot be
> represented in the destination type.
And trunc() on infinity is still infinity, which can't be represented
in integer types.
|
| |
|
| |
|
|
|
|
| |
Add append option to grc file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The example test_16bit_1chunk.wav was invalid even if the tests passed.
This file caused errors in ffprobe (from ffmpeg) and wave (from python
standard lib).
This is what changed:
- LIST chunk corrected, according to spec. Previously `ffprobe` complained:
[wav @ 0x5653f92d6dc0] too short LIST tag
- File size corrected. Previously the test assumed that the resulting
headers to be identical, this is now taken into account.
Because of this, python's `wave` did not work. This is added to the test.
Parser is updated to check file size.
- Tests that did not close opened files were corrected.
References:
[1] https://sites.google.com/site/musicgapi/technical-documents/wav-file-format
[2] http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that data passed to the file sink is written to the disk when
the flowgraph is stopped. Before this change this only happened
implicitly due to a fclose() in the base class destructor. This in turn
means that data was written delayed after stopping the flowgraph [1].
This fixes #2590.
[1] https://github.com/gnuradio/gnuradio/issues/2590
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the volk/ submodule pointer and updates the CMake to detect
VOLK like any other dependency. The VOLK_MIN_VERSION CMake variable is
added (and set to 2.1.0).
The GR_VOLK_LIB variable is replaced with Volk::volk everywhere.
The VOLK_INSTALL_LIBRARY_DIR and VOLK_INSTALL_INCLUDE_DIR variables
weren't used and were removed.
CMake will now fail if VOLK cannot be detected. Therefore, ENABLE_VOLK
was also removed as a variable; all in-tree components may assume the
existence of VOLK.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This is made by opening the grc file in gnuradio-companion and saving a
copy as on the same file.
Fixes #3282
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR is to create a new gr-network structure that includes
the grnet TCP and UDP source/sink blocks for inclusion into GNU Radio.
This includes new modes (TCP source/sink can act as either a TCP
server/listener or a client), and UDP supports multiple new header
options for dropped packet detection and integration with external
sources such as the Allen Telescope Array. The UDP blocks have a
number of important performance and tuning comments in the block
documentation to help ensure success with the blocks, and examples
for each scenario are included. This PR also deprecates the old
TCP/UDP blocks but keeps them in place. The new blocks and new
functionality resulted in not a 1:1 drop-in replacement for the
old blocks so the old blocks were moved to the deprecated UI
group to avoid breaking flowgraphs going to GR 3.9.
Some of the new features included in these blocks are:
1. The only TCP block is a sink that listens for inbound connections.
This inherently limits the ability to transmit data to another 3rd
party application listening for data in TCP server mode. A source
block is included here as well.
2. The TCP sink block supports both TCP client and server modes.
3. All blocks (TCP and UDP) support IPv6.
4. UDP blocks now include a variety of header options: None, a 64-bit
sequence number that can be used to track dropped packets, CHDR,
and the Allen Telescope Array header format for GR-native ATA
integration.
5. UDP blocks paired with headers can now notify if any data is lost
in transit.
6. UDP blocks now have the option to source 0's (no signal) to allow
the flowgraph to run if no incoming data is available.
7. UDP blocks now include a buffering mechanism to ensure data is
not lost between different timing domains (network packets and
GNU Radio scheduler).
8. Block documentation has been added to help guide users through
how to properly configure addresses for IPv6 or dual-stack
operations, and tuning / testing before using UDP blocks in a
production environment.
9. TCP sink has enhanced work logic to remain running and continue
to listen for reconnections if a client disconnects.
|
|
|
|
|
|
|
| |
These updates add the ability to set the block delay value with
an asynchronous message. In this manner, blocks doing calculations
such as those for DoA or antenna arrays can provide delay updates
only when needed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This fixes a logical bug introduced in
88a9e1f9332d54c1743d062adfaf48aa6d3040ff, where error conditions were
AND'ed together instead of OR'ed.
|