On Tue, Mar 18, 2014 at 9:27 AM, Michael Dilmore <[email protected]> wrote: > Hello all, > > I'm new to GNU Radio and have a question that I hope more experienced users > will find straightforward. > > I've successfully managed to create a flow graph that accepts an infinite > stream of complex samples from an RTL-SDR source block. However, I only > require 32,768 samples in total. Once the required number of samples have > been received, the flow graph should write these samples (and only this > number of samples, no more, no less) to a binary file. > > Is there an easy way to restrict the number of samples received in this way? > I've looked at the documentation for the Message Passing and Stream Tagging > APIs, but I'm not sure if they can be used to achieve the desired behaviour. > As mentioned above, I'm using the RTL-SDR source block, but I'm guessing the > same could be applied to any source block? > > Thanks in advance for you help! > > Michael Dilmore
You can use the Head block to stop the flowgraph after N samples. http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1head.html Tom
