I have a custom block with a message port (with a fixed port name)
and some stream ports which include a … definition.
The whole thing works fine as long as I have a fixed number of ports.
Each declared separately. But as soon as I use a nport statement GRC
won’t display this block correctly [1]. Even worse if I enter values
which affect the number of ports, the whole flowgraph will disappear.
Just a grey flowgraph page.
To make things easier for me (and to not create a well known kind of
artwork) I use hier blocks. This works fine as long as I have fixed size
vector ports. But adding a parameter block, say vlen, for vector size to
dynamically change the hier block doesn’t work. The python generator
does not generate the hier block python file with vlen as vector size.
Instead it puts in the default value. A parameter block without default
value results in an error. A hard coded vector size is not exactly
helpful in this case.
I didn’t have time to dig into it yet. Thus I thought I share my
experience with you. Maybe I am not the only one with this problem and
someone already knows how to fix it.
I’ll confirm that #2 is either a bug or merely unexpected behavior. I
work
around it by prototyping hier blocks as custom GRC blocks, then using
that
to build an OOT module block that actually works. Being unable to enter
parameters at run time is severely limiting.
I’ve not experienced #1, that functionality seems to work once I get the
python file and the GRC file matching. I was getting the same errors
for a
while until I found the right idiom.
I’ll confirm that #2 is either a bug or merely unexpected behavior. I
work around it by prototyping hier blocks as custom GRC blocks, then
using that to build an OOT module block that actually works. Being
unable to enter parameters at run time is severely limiting.
For now this is the solution of choice. But in my opinion a graphical
representation helps to understand a flowgraph and I want to create
everything as self-explanatory as possible.
I’ve not experienced #1, that functionality seems to work once I get the
python file and the GRC file matching. I was getting the same errors
for a while until I found the right idiom.
Can you share your setup? Or point to a repository? That would be very
helpful.
My guess is that the problem is a bit more tricky.
The XML block definition works fine as long as the message port is not
present. I can use nports as shown in stream_to_streams.
It also works fine as long as the nports statement is not used and a
message port is defined. This means copy and paste the stream port
definition for every port. Assign a port name manually etc.
Nevertheless the combination using nports and message ports in one XML
definition fails. I hope that clarifies my problem description.
I work around it by prototyping hier blocks as custom GRC blocks,
<mailto:[email protected]>> wrote:
ports.
vector ports. But adding a parameter block, say vlen, for vector
experience with you. Maybe I am not the only one with this
<optional>1</optional>
Discuss-gnuradio mailing list
–
Dipl.-Inform. Bastian B.
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-53288 / Fax: -53079 http://ccs.uibk.ac.at/~bloessl/