|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Change value of a Variable defined in the flowgraph from a block |
Date: | Sat, 1 Jul 2017 09:39:10 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
Hi Cristian, So, that's an architectural problem: These variables are really just that: Python variables in the
generated python program. Setting things when that variable
changes works, because if your block defined a <callback>
element in the GRC XML, then that method will be called whenever
you change the Qt Range's value manually. This only works because
the Qt Range is not actually a block or so, it's just Python code
that gets inserted into the generated Python. We do not consider that to be "clean design", because it's damn near impossible to do the same from within a block (especially if that block lives in C++ land). What would be much easier is to give all the blocks that you need to change at runtime a message port input and handlers for messages, and then connect them to a "controller" block centrally. Best regards, Marcus On 01.07.2017 06:39, Cristian Rodríguez
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |