|
From: | Steffen Kiel |
Subject: | Sv: Accessing top_block from an embedded python block? |
Date: | Sat, 7 Mar 2020 19:07:07 +0000 |
Hi Derek, thanks a lot for your reply.
That kinda makes sense to me, but im not sure about the tutorial, it doesn't seem to be very explanatory.
You say that i can pass the buttons ID to the python block, but i cant seem to figure out how i would do that, as variables don't have outputs that i can connect to the block?
//Steffen
Fra: Derek Kozel <address@hidden>
Sendt: 5. marts 2020 16:34 Til: Steffen Kiel <address@hidden>; address@hidden <address@hidden> Emne: Re: Accessing top_block from an embedded python block? Hi Steffen,
You're missing that the embedded Python Block should work just like any other block. If you want to read a button state or accept a message then you'll need to add a parameter to the Python block and pass in the button's ID (variable) to it or add a message port to the block. The Embedded Python Block tutorial does a good job covering the message side and adding a parameter is part of the default Python Block template. https://wiki.gnuradio.org/index.php/Embedded_Python_Block As a related note, in the very latest maint-3.8 and master codebases there are now Python Snippets for injecting Python code directly into the generated program. It's useful for a variety of situations, but the ones you're describing here are already usually handled well by the existing features. Cheers, Derek On 05/03/2020 13:13, Steffen Kiel wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |