From GNU Radio
Revision as of 08:40, 10 July 2019 by Notou (talk | contribs) (Example Flowgraph)
Jump to: navigation, search

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.


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

In this setup, both Time sinks will stop after the Head has reach the specified number of items. The Upstream time sink may see more items than the downstream one, depending on the size of the buffer between the source and the head.


Source Files

C++ file