discuss-gnuradio
[Top][All Lists]
Advanced

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

Sv: Change Variable value from an python block or module?


From: Steffen Kiel
Subject: Sv: Change Variable value from an python block or module?
Date: Wed, 25 Mar 2020 15:13:08 +0000

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: address@hidden; address@hidden
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

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