Hello Marcus,
alright, i will look into this whole "message" thing instead then.

 thanks for your quick reply.

BR,
Steffen


________________________________
Fra: Müller, Marcus (CEL)
Sendt: Onsdag 25 Marts 2020 16:05
Til: steffenk...@outlook.dk; discuss-gnuradio@gnu.org
Emne: Re: Change Variable value from an python block or module?

Yes, but no!

So, GRC Variables are really a GRC concept, and you'd need to break
multiple layers of encapsulation from within a Python block just to
alter them. Really, that's possible with a simple callback function,
but please don't.

Instead, the appropriate way of dealing with this would be giving the
signal source a message port, on which it accepts new values via
message.

Then, from your Python or C++ block, just send a message.

Best regards,
Marcus

On Wed, 2020-03-25 at 14:57 +0000, Steffen Kiel wrote:
> Hello!
>
> I have a signal source whose frequency input is referenced to a variable.
> Is it possible to access this variables value and set it from a python block 
> or python module?
>
> BR,
> Steffen

Reply via email to