discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Re: Proper way to implement flowgraph programming


From: Kevin Reid
Subject: Re: Re: Proper way to implement flowgraph programming
Date: Thu, 28 Nov 2019 16:04:45 -0800

On Thu, Nov 28, 2019 at 12:35 PM Lukas Haase <address@hidden> wrote:
Is there a way to deal with the editing/overwriting in this approach?
Once I edit the file (as in the tutorial) I cannot use GRC anymore because my changes will be overwritten.
Since I have complex flow diagrams I would prefer still being able to handle them in GRC.

If you have custom Python code you can no longer edit it in GRC since GRC does not know how to parse Python and wouldn't know what to do with the modifications. However, you have two options based on using hierarchical blocks to structure your application:

1. You can define part of your flow graph as a hierarchical block in GRC, and let the custom Python create the top block and import that hierarchical block.

2. Or, you can define a hierarchical block in Python (or C++) and use it from within GRC.

In your case, since your desire is for high-level control logic, option 1 most likely makes sense (but you can use both in any combination that suits you). Use GRC to define your signal processing subsystems, and use custom Python to connect them together and control them. Any “variable” in GRC becomes a pair of setter/getter methods in the generated Python, which you can use to control the block just like if you were defining a GUI in GRC, except from code.

reply via email to

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