Head: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


If the flowgraph options are set to "No GUI" and "Run until completion", then as long as there is only one branch in the flowgraph, this block will cause the flowgraph to finish when N samples are reached.
If the flowgraph options are set to "No GUI" and "Run until completion", then as long as there is only one branch in the flowgraph, this block will cause the flowgraph to finish when N samples are reached.
When branching, may block others branches: samples are not consumed and fill upstream buffers.
== Parameters ==
; Num Items
: Number of samples to copy
; Vec Length
: Size of the input and output vector (May not handle anything different from 1)
== Example Flowgraph ==
== Source Files ==
[https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/head_impl.cc C++ file]

Revision as of 15:23, 9 July 2019

Copies the first N items to the output then signals done. Very useful for limiting how many samples get saved to a file when using the File Sink.

If the flowgraph options are set to "No GUI" and "Run until completion", then as long as there is only one branch in the flowgraph, this block will cause the flowgraph to finish when N samples are reached.

When branching, may block others branches: samples are not consumed and fill upstream buffers.

Parameters

Num Items
Number of samples to copy
Vec Length
Size of the input and output vector (May not handle anything different from 1)

Example Flowgraph

Source Files

C++ file