Throttle: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>


; Param 1 (''R'')
; Sample rate(''R'')
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
: Maximum average sample rate desired.


; Param 2
; Ignore rx_rate tag
: blah blah blah
: If set to False, the block will set its sample rate to the value of recieved tags with the key rx_rate. It will ignore other tags.


== Example Flowgraph ==
== Example Flowgraph ==
Line 24: Line 24:


; C++ files
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/throttle_impl.cc Here]


; Header files
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/throttle_impl.h Here]


; Public header files
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/throttle.h Here]


; Block definition
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_throttle.block.yml Yaml]

Revision as of 15:27, 22 July 2019

Throttle flow of samples such that the average rate does not exceed the specific rate (in samples per second).

A throttle block should be used if and only if your flowgraph includes no rate limiting block, which is typically hardware (e.g., an SDR, speaker, microphone). It is not intended nor effective at precisely controlling the rate of samples. That should be controlled by a source or sink tied to sample clock. E.g., a USRP or audio card.

The Throttle Block is typically attached directly to the output of a non-hardware source block (e.g. Signal Source), in order to limit the rate at which that source block creates samples.

Parameters

(R): Run-time adjustable

Sample rate(R)
Maximum average sample rate desired.
Ignore rx_rate tag
If set to False, the block will set its sample rate to the value of recieved tags with the key rx_rate. It will ignore other tags.

Example Flowgraph

In this example flowgraph, if you remove the Throttle block, the output will look the same, but your CPU will be at 100% and GNU Radio might crash.

Signal-source-ex.png

Source Files

C++ files
Here
Header files
Here
Public header files
Here
Block definition
Yaml