On 10/08/2012 04:12 PM, sumitstop wrote:
> Q-1
> 
> In the gr_top_block.h the start function has been defined as follows :
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> void start(int max_noutput_items=100000);
> 
>   /*!
>    * Stop the running flowgraph.  Notifies each thread created by the
>    * scheduler to shutdown, then returns to caller. Calling stop() on
>    * a top_block that is already stopped IS NOT an error.
>    */
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I am getting confused because its saying that it "Stop the running flow
> graph ........... Notifies each thread created by the scheduler to shutdown
> ................ then returns to caller" So what does start means here. 
> 

start() -> spawns threads, begins flow graph execution
stop() -> non blocking, interrupts threads, see boost thread interrupts
wait() -> blocking join of threads, ie waits for completion

run is a convenience call for finite flowgraph processing. run() means
start() + wait(). There is no stop because the flowgraph should shut
itself down by use of blocks like gr.head(). Essentially, this is for
testing purposes almost exclusively.

> Q-2
> 
> Also its mentioned that run() method has maximum number of outputs is
> 1000000 but I was able to collect 2000000 samples using uhd_rx_cfile with
> the tb.run() method ? Where I am wrong ?? 
> 

start/run with the number of items parameter are just convenience calls
to set the max buffer size + start/run the flow graph.

Thats an internal buffer size limit. It shouldn't effect the functional
correctness of a flowgraph.

-josh

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to