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. 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 ?? -- View this message in context: http://gnuradio.4.n7.nabble.com/Reg-start-method-i... Sent from the GnuRadio mailing list archive at Nabble.com.
on 2012-10-09 01:13
on 2012-10-09 01:24
On 10/08/2012 04:12 PM, sumitstop wrote: > * 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
on 2012-10-09 02:03
Got it perfectly **Just observed that in uhd_rx_cfile tb.run() has been used. When we leave the number of samples blank i.e. infinity the script keeps collecting data because of tb.run() but when we choose the no of samples option, a separate gr.head is block is created with specified no of samples and it stops after collecting the same. -- View this message in context: http://gnuradio.4.n7.nabble.com/Reg-start-method-i... Sent from the GnuRadio mailing list archive at Nabble.com.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.