discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Flowgraph Control


From: Johannes Demel
Subject: Re: [Discuss-gnuradio] Flowgraph Control
Date: Mon, 26 Oct 2015 10:50:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Richard,

I cut out the more specific parts. Thus, now there's an example for a
dummy flowgraph. Dummy in terms of dummy encoder/decoder in GR. Now
there's an archive attached to this mail. I dared to attach it to this
mailing list post because of its tiny size. I hope that's fine with
everyone.

Some parts may be done differently at first glance. But those files
still accumulate quite a lot of trial and error with some lengthy
simulations.

I hope it helps.

Cheers
Johannes


On 23.10.2015 18:44, Richard Bell wrote:
> Thank Johannes. Would you be willing to share your python code so I
> could learn from it?
> 
> I'm still trying to get the simulation working with GUIs. I've
> still got issues getting the GUI window from one run to close
> properly, without generating errors in terminal. But your approach
> will help me understand the non-GUI related matters better.
> 
> Appreciated, Rich
> 
> On Fri, Oct 23, 2015 at 2:44 AM, Johannes Demel
> <address@hidden> wrote:
> 
> 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 
>>>> <address@hidden> 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 
>>>>> <address@hidden
>>>>>> wrote:
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Thu, Oct 22, 2015 at 3:58 PM, Richard Bell 
>>>>>> <address@hidden> 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 address@hidden 
>>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>> 
>> 
>> _______________________________________________ Discuss-gnuradio
>> mailing list address@hidden 
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJWLfeCAAoJEO7fmkDsqywMhhUP/3tSylqbQmLRBa8Al2PiaIYq
z2yaeqbW729dW0IbIub1Q3eY+gYNG1o7W+7aCDPwfCt1JKOtyPiW63ikPrNuh5h+
Yzq6VuxRG3lJBJqxvEzTIBlBgMDNF5oWVhoeNW5dpXvJHwI3zmdFh0vuhuIbQ1t2
Lo1q7G0Rz0UJZUD4RQXJsxX2FacohZoh0fzWhulVfIHxZIEOs/t9xn9BdflIA9n3
rbK3ohDcrpDGGPFfKQZWheUARbhdJRpA3Qp43JnN95OCkT3Y3QTgLxJWD/Db8Wgl
EaeoxbF7n5VSGq4OzMj7Dr/8SkEqwGZrCq2vXK1jWqFfgt/F6LXYeYD/61t9qKF0
W1z6+9zUEzCoycmtI0o8NiSUpS4ztD4zlgI6LiY0SNV7unTvYu7YkDF5QJ7i7Wqw
LkJfOGw2qdJWjjW3Oecuj/Mx4jd1bLSGY5p5riywRcDv4ch1QxXnCTgPnzYC35xM
q2rPK2eKDRQd47uOyui9ichY45bY5xY4377tOy/K+yrNWE8p6xLVLc7GNutmK4Dh
QSi8yaQTdfVhoqdySGOWQ7QWruG89LfhWArEECxL65xwWrcMnQAqVOXME5rzzhLx
podXXeQTg+WsF9hXB2ScRRFqVr/2ONqQ9bwF9XgUm+CDS5ZbzFMd7D7mhzeDOmJh
oOpQeeh4aT7MMkJoOfx2
=P7DP
-----END PGP SIGNATURE-----

Attachment: simulation_example.tar.gz
Description: application/gzip

Attachment: simulation_example.tar.gz.sig
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]