-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Richard,
I'm currently working on something quite similar. [1] shows an example fur a dummy. Basically what I do: I wrapped my flowgraph into another Python thread which runs the flowgraph and generates statistics and everything else I want for my simulation infrastructure. I fixed some problems in the block 'ber_bf' to shut down the flowgraph correctly when that limit is exceeded. And not shut down before any errors occured. After your flowgraph is done, just get the number of bit errors with tb.<ber_bf_block_name>.total_errors(). I know it'll break encapsulation. tb.<ber_bf_block_name>.nitems_read(0) will return the number of bytes. Be careful with the bit vs. byte issue. But that also depends on your input data. My flowgraphs are capped by the FEC decoder, all the other blocks mostly wait for it. So I just spawn a couple of them in parallel and delete a flowgraph once it finished and I got all the results. My assumption is that flowgraph instantiation is really fast compared to the simulation. Worst case setup time < 2s and simulation time may exceed 1000s. Also, you don't have to worry about incomplete resets for your flowgraph. I hope I could show a different approach here. Also, I use 'no GUI' flowgraphs. Cheers Johannes [1] http://imgur.com/wDOPqHL On 22.10.2015 23:26, Richard Bell wrote: > I removed the qt app.exec_() line and that seemed to fix it > > On Thu, Oct 22, 2015 at 2:16 PM, Richard Bell > <richard.be...@gmail.com> wrote: > >> Thanks. >> >> I'm running into a problem getting tb.stop() to trigger. I tried >> putting a head block in the flow graph thinking it triggers >> WORK_DONE which I thought would lead to tb.stop(), but it >> doesn't. The flowgraph window just sits there frozen. How do I >> get a running flow graph to trigger tb.stop(), so the next >> iteration can start? >> >> Rich >> >> On Thu, Oct 22, 2015 at 1:21 PM, West, Nathan >> <n...@ostatemail.okstate.edu >>> wrote: >> >>> >>> >>> On Thu, Oct 22, 2015 at 3:58 PM, Richard Bell >>> <richard.be...@gmail.com> wrote: >>> >>>> Or is this the correct stategy: >>>> >>>> if __name__ == '__main__': >>>> >>>> tb1 = my_flowgraph( paramter_set_1 ) tb.start() tb.wait() >>>> tb.stop() >>>> >>>> tb2 = my_flowgraph( paramter_set_2 ) tb.start() tb.wait() >>>> tb.stop() >>>> >>>> tb3 = my_flowgraph( paramter_set_3 ) tb.start() tb.wait() >>>> tb.stop() >>>> >>>> etc.. >>>> >>> >>> That's what I would do, except create a list of your parameter >>> values and loop over the list. >>> >>> >> > > > > _______________________________________________ Discuss-gnuradio > mailing list Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWKgF8AAoJEO7fmkDsqywMTOsQAJZ8IjGtMDkwWAlF4MjOM4AS 35bhaekAVcym3l02mV04aaAVdfBMeifrbAGuCKFVWnYNFLlZZhNGNi8scC+fkhWZ 3QR3ZC+yA1FgurL7fheCdQru8Z5oF3nb0/6LzbSEd69z4w/tfNBD5fdwV91S6YNm qJv+cOs/oJSxBWEjT2xY96DeMpKABXeI0KnadLtts9P7v8Kk940orS6OQtMk0TbR x603stUh52LJhAJdGOi/KG8BgioL/4Vr2KcqHprIs0IJ2iF382nPgl9cc+ybh3w9 yZEAWpg6Y2zD3k0g75zeuviN5sZnaKvqUEvOq4/yoTwbh635sYyqVFJtP8rtijOj EOnlTjlA89ugUzDoBkrL8jJaqDicUpzNIFoYbN+NVhd4n/9UuaVSi9P6Qa25dTgB fWEcY19J5DDvMfJw5l60RYj2Oh4y816olTDF25t/jjHGOmPBwuCUtL1oi9j82eL1 bi8sREOXtNn63nDq7pyv5dYf1D5+6aHPsxajwGb4rdUI5AVHC6aQiBMQemaGG/5V ooNckXruFBDzR/CiveRkAvLeHr7Gs5L89ge7xgVTXq+evbr+bid6CYcOqcwfrX65 u1uaEXlEpmWOjPHhKUVFG1Zd3EPIwyeOx34DQaEXIHNFmNj1xCErlQ2SuFGFDH3n HSRDwtl2iSixOROI3r7f =ez4I -----END PGP SIGNATURE----- _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio