discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: GRC port type assignment in Python Block


From: Marcus D. Leech
Subject: Re: GRC port type assignment in Python Block
Date: Mon, 26 Jul 2021 07:59:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 07/26/2021 07:32 AM, Josh Morman wrote:
Hi Jerrid,

Your attempt at using structures to map to a complex type is sensible, but it appears that GRC doesn't parse this very well for at least the embedded python blocks. The UHD blocks are c++ based which just uses the io_signature object in the constructor which specifies a size, not a type.

You may want to try just using non-vectored int16's as an interleaved stream and deinterleave in your python block

Josh

The embedded python blocks (at least in 3.7) don't handle vectors very well if their length isn't known until runtime, and for "very well" read "not at all". My own approach was to take in samples as scalars, and handle the "shaping" inside the work function of the block, using run-time parameters to
  determine the shape.   It's a pain, but it works.





reply via email to

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