|
From: | Marcus Müller |
Subject: | [Discuss-gnuradio] Dealing with GRC variables and GRC callbacks (was: GNU Radio Companion Extensions: Output C++ Code) |
Date: | Fri, 31 Mar 2017 17:09:45 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
Hi Sebastian, (Håkon, this is half-related to your proposal; there's questions
arising from this, but I think I'd like to raise them later, if at
all, after Sebastian has enlightened me :) ) you're touching a very delicate subject here: I personally think
that GRC variables should have been for instantiation-time
variability only, but through the fact that they are actually
Python variables, we've enabled (which is a great thing) people to
use them as dynamic things at run time. (think: changing the gain
using a GUI slider that calls the generated variable setter,
rather than e.g. sending a PMT message). As far as I can tell, that cannot really work out in C++, unless we really come up with automatic wrapping of block methods with something like a message passing interface. We already have that message passing, we don't have the C++ method-to-message-handler wrapping (which somehow reminds me of a feature PR that I made quite a while ago...). But if we demand that we can use variables at runtime, we would first have to implement that inside the GR runtime – basically, the servicification that Johnathan is dreaming of.+ So, we could only do this at instantiation, or, to be honest, at code creation time – in which case a simple "eval()" might be the best option (as little as I like that). But that's really a rather personal, maybe not very well-backed view on this. I'd love to hear your opinion on that; I'm biased, I'd rather lose the ability to use raw Python in block parameters and convert the GRC variable concept to "automatically generated subscribers and publishers", but I know that would be a complete paradigm change, and that's what I don't like about my idea. Cheers, On 31.03.2017 16:32, Koslowski,
Sebastian (CEL) wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |