summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
Commit message (Collapse)AuthorAgeFilesLines
* blocks: Add XMLRPC examplesmuaddib19842021-10-252-7/+7
| | | Signed-off-by: Paul Atreides <maud.dib1984@gmail.com>
* gr-blocks: Fix cpp support for unpacked to packedSolomon Tan2021-09-241-1/+3
| | | | | | | | | In commit 612c650, cpp support was added to the unpacked_to_packed block. However, the cpp flag was not added. Neither was the endianness option set correctly. This commit fixes it using packed_to_unpacked as reference. Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
* c++ generation: escape "." in translationsJeff Long2021-07-274-4/+4
| | | | | | | Translations are a regex, so "." needs to be escaped. Fix the remaining unescaped strings. Signed-off-by: Jeff Long <willcode4@gmail.com>
* digital/throttle: Make GRC output port optionalMarcus Müller2021-07-191-0/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* blocks: add matrix interleaver blockJaredD2021-07-192-0/+64
| | | | | | | | | | | | | | | | | | | | | | * blocks: add matrix interleaver block Matrix interleaver including qa test and example The matrix interleaver is a hierarchical block that pairs a base deinterleave block that effectively writes samples into "rows" (1 block of samples per output) and a base interleave block that outputs samples iteratively from each input like "columns". Signed-off-by: Jared Dulmage <jared.dulmage@caliola.com> Add grc file and update blocks.tree.yml. Fix module for matrix interleaver example Signed-off-by: Jared Dulmage <jared.dulmage@caliola.com> * Update py file docs and license block Co-authored-by: Jared Dulmage <jared.dulmage@caliola.com>
* blocks: zero-output, zero-copy Head modeMarcus Müller2021-06-281-0/+1
| | | | | | | | | 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>
* gr-blocks: Standardize Vector parameter nameSolomon Tan2021-05-1971-74/+74
| | | | | | | | Addresses point 1 of Issue #4615. Replaces all label instances of "Vec Length" to "Vector Length". Also replaces "Vec Rate" to "Vector Rate" for standardization. Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
* blocks: remove deprecated network blocksJosh Morman2021-04-214-174/+0
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* blocks: Add msg port to set rotator's phase incIgor Freire2021-04-171-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gr-blocks: remove pdu blocksJacob Gilbert2021-03-189-325/+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: remove indexing in file source cpp templatekarel2021-02-231-1/+1
| | | | | | file[1:-1] results in file name becoming NotImplemented Signed-off-by: karel <5636152+karel@users.noreply.github.com>
* gr-blocks: fix default length with list in Stream Mux and Demux ymlAdrien Michel2021-01-112-2/+2
| | | | Signed-off-by: Adrien Michel <adriengit@users.noreply.github.com>
* blocks: improvements to the message_debug blockJacob Gilbert2020-10-241-1/+11
| | | | 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
* blocks: New block 'Stream Demux'David Pi2020-09-252-0/+55
| | | | | | | | | | | | | | | | 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, ...]
* gr-blocks: More graceful error handling of missing sndfile dependency.Ron Economos2020-09-201-0/+7
|
* gr-blocks: Transition the WAV sink and source blocks to libsndfile.Ron Economos2020-09-011-5/+100
| | | | Compressed input and output with FLAC and Ogg Vorbis now supported.
* Move from SWIG to Pybind11Marcus Müller2020-06-195-5/+5
|\ | | | | | | | | | | Goodbye, and thanks for all the fish, SWIG. Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
| * blocks: remap enums in yml from int to raw for pybind compatibilityJosh Morman2020-06-044-4/+4
| |
| * pybind: repack_bits change int to enum in ymlJosh Morman2020-06-041-1/+1
| |
* | blocks: Fix XMLRPC Client block templatesClayton Smith2020-06-111-4/+4
|/ | | | | | | | 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".
* blocks: default value for file_meta_sink in ymlJosh Morman2020-05-211-1/+1
|
* blocks: wav: add missing changesjapm482020-04-191-2/+11
| | | | Add append option to grc file.
* gr-blocks: Add Phase Shift Block with Msg Capabilitiesghostop142020-03-302-0/+41
| | | | | | | | | | | | 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.
* gr-network: Add grnet networking blocks to GNU Radioghostop142020-03-294-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gr-blocks: Add Msg Port to Delay Blockghostop142020-03-291-0/+3
| | | | | | | 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.
* gr-blocks: Add scaling option to Complex to/from ishort and icharghostop142020-02-204-4/+71
| | | | | | | | | | | | | | | 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.
* grc: Fix C++ code generationTerry May2020-02-183-4/+7
| | | | | | | | | | | | | | | | | | | | | | | - Added support for C++ std::map<> from python dict - Fixed default initialization of parameters in main() - Added missing include for realtime scheduling - Added default CMake option for std=c++11 as this is required for gnuradio >= 3.8 - Fixed mako template to add initialization to parameter declarations in main() - Fixed C++ constructor initialization list generation - Fixed parameter type determination when an lvalue is used in an rvalue expression - Improved determining type of C++ variables - Added C++ support for gr_complex parameters - Fixed C++ generation of nested container types - Added C++ support for virtual source/sink - Moved cmake CMAKE_CXX_STANDARD 11 option from options.yml to CMakeLists.txt.mako - Fixed qtqui_sink to allow multiple instances - Revised virtual connection processing in cpp_top_block.py Reviewed-By: Håkon Vagsether <hauk142@gmail.com>
* Blocks: Add DC Spike Removal and IQ Swap Native Blocksghostop142020-02-155-0/+150
| | | | | | | | | | | | 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-blocks Add Msg to Var and Var to Msg Conversion Blocksghostop142020-02-154-0/+79
| | | | | | | | | | | | | | | | These 3 new blocks provide the missing glue to move between messages and variables in the same flowgraph. There are 3 variants here: 1. Monitor a variable and produce a user-specified message (pair) when the variable changes. Useful bridging standard GUI controls to message-based blocks. 2. When an inbound message (pair) is received, update a specified variable. 3. When an inbound message (dict) is received, extract a single dictionary entry and produce a message pair (useful if you have a multi-value dictionary but you just want to pull off a single attribute such as frequency or gain without modifying the upstream block. This can be paired with (2) if necessary to move from a dictionary item to a variable.
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* blocks: Add show_id flag to Probe Signal VectorHåkon Vågsether2020-01-261-1/+1
|
* blocks: Add show_id flag to Probe SignalHåkon Vågsether2020-01-261-1/+1
|
* Rotator-based Freq Shift Convenience Wrapperghostop142020-01-251-0/+34
| | | | | | | | | | | | This yml adds a convenience-wrapper block to provide volk-accelerated frequency shifting based on the rotator block that doesn't require the user to "import math" and code the "2Pifreq/samp_rate" as the phase increment. I don't think newbies know a rotator with a phase increment results in a frequency shift (I didn't for the longest time) and may be relying on less CPU-efficient means such as a signal source/multiply or a frequency xlating fir filter (the latter one-sample-at-a-time rotates as it decimates rather than leveraging volk to do a block).
* Added in/out selector msg portsghostop142020-01-241-0/+8
| | | | Input and output port selection can now be controlled by messages.
* SimpleXMLRPCServer was moved in Python3Johannes K Becker2020-01-041-2/+2
|
* digital/blocks: Remove broken/unnecessary C++ sizeof translationTerry May2020-01-0237-68/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several components use the following translation in cpp_templates: ``` translations: gr.sizeof_: 'sizeof(' ``` The problem is the generated code is missing a closing parens i.e.: this->blocks_delay_0 = blocks::delay::make(sizeof(gr_complex*1, 0); This could be fixed by adding a closing parens in the make template, but it looks awkward to have an unmatched closing parens. And only a few blocks currently have this closing parens added. Most of them produce erroneous code like that above. However, this sizeof translation is not even needed in the YAML file because cpp_top_block.py explicitly adds the proper sizeof translation. ``` translations.update( {r"gr\.sizeof_([\w_]+)": r"sizeof(\1)"} ) ``` So removing this translation all together produces correct code for blocks that use gr.sizeof_X.
* blocks: transcendental: Default to complex_float in GRC bindingsMartin Braun2019-11-011-1/+1
| | | | | The default is complex_double, or float. The former is rarely used in GNU Radio, hence, it is not a good default.
* Fix for misc. documentation + trivial typosluz.paz2019-07-172-2/+2
| | | | | | | | | | | | | 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-171-1/+1
| | | | | | | | | | | | | | | | 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
* grc: add busports back into 3.8Josh Morman2019-07-152-2/+2
| | | | | | | | Bus ports had not been added back in since the refactor of grc Hopefully this fully enables busports though there are still some issues with the gr-fec flowgraphs Fixes #2277
* grc: introduce flag 'show_id' to show block idBastian Bloessl2019-06-291-1/+1
| | | | useful for variable and parameter blocks, but maybe others too
* perf-monitor: better yaml dtypeBastian Bloessl2019-06-191-2/+2
|
* runtime: port ctrlport monitor to 3.8 and qt5Bastian Bloessl2019-06-191-2/+2
|
* QtGui: fix 'Show Msg Port' sliderPaul Boven2019-06-181-4/+2
|
* blocks: replace blks2_selector with new implementationJosh Morman2019-06-152-0/+94
| | | | | | | | 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
* blocks: add byte option to add_const_v in GRCAndrej Rode2019-05-171-4/+4
| | | | | | | The previous GRC yml description did not contain an entry for operation on bytes. Closes #2461, Closes #2354
* blocks/grc: fix null_source C++ generationNicholas Corgan2019-05-111-1/+1
|
* blocks: Convert GRC examples/metadata to YAML formatJohannes Demel2019-01-211-1/+1
| | | | | | | | | This commit converts the examples in `gr-blocks` to the new YAML format. This conversion is tracked in #2285. Change `Extra Dict.` dtype in `File Meta Sink` to `raw`. Also, put `pmt.make_dict()` as argument. Otherwise these flowgraphs fail due to a type error.
* blocks: Convert GRC examples to YAML formatJohannes Demel2019-01-211-1/+1
| | | | | | | | | | This commit converts the examples in `gr-blocks` to the new YAML format. This conversion is tracked in #2285. The assertion in `grc/blocks_multiply_matrix_xx.block.yml` to check if the selected tag propagation policy and the given matrix are compatible is disabled. This might be an issue with `dtype: enum` and its resolution in Mako.
* blocks: Fix remaining interleaved type convertersHåkon Vågsether2019-01-143-6/+3
|