Forum: GNU Radio GRC problems

5e623cc1b53ddefb15c9bad4245986a1?d=identicon&s=25 Johannes Demel (Guest)
on 2013-10-12 19:18
(Received via mailing list)
Hi list,

I discovered 2 problems with GRC recently.

1. I have a custom block with a message port (with a fixed port name)
and some stream ports which include a <nports>...</nports> 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.

2. 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.

Happy hacking
Johannes

[1]
<sink>
  <name>msg</name>
  <type>message</type>
  <optional>1</optional>
</sink>

<sink>
  <name>in</name>
  <type>complex</type>
  <vlen>$vlen</vlen>
  <nports>$ports</nports>
</sink>
2afeb8a9881ac56b32da9d5089bd1078?d=identicon&s=25 Jared Clements (Guest)
on 2013-10-12 19:59
(Received via mailing list)
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.

Jared
3c2c8407d19f3488e9cd2a28a9732bde?d=identicon&s=25 West, Nathan (Guest)
on 2013-10-12 22:44
(Received via mailing list)
Re: #1, if the block's xml is malformed then GRC will basically show
nothing (that grey flowgraph page you describe). Are you defining $ports
in
the make node? Compare to a similar block to make sure everything is
defined properly.
https://github.com/gnuradio/gnuradio/blob/master/g...

I'm not sure of a way to debug what section might be wrong, so compare
against other blocks with message ports too.



On Sat, Oct 12, 2013 at 12:58 PM, Jared Clements
5e623cc1b53ddefb15c9bad4245986a1?d=identicon&s=25 Johannes Demel (Guest)
on 2013-10-13 16:01
(Received via mailing list)
On 12.10.2013 10:58, Jared Clements wrote:
> 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.

Johannes
5e623cc1b53ddefb15c9bad4245986a1?d=identicon&s=25 Johannes Demel (Guest)
on 2013-10-13 16:02
(Received via mailing list)
Hi Nathan,

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.

Johannes
2afeb8a9881ac56b32da9d5089bd1078?d=identicon&s=25 Jared Clements (Guest)
on 2013-10-13 16:39
(Received via mailing list)
Check the order, there's apparently only one tag order that works.  I
brought it up last week and was told it was known behavior.

Jared
5198317011bab6bfffa1535322b118a8?d=identicon&s=25 Bastian Bloessl (Guest)
on 2013-10-13 20:04
(Received via mailing list)
Hi Johannes,

I think this is the same problem that I had in

http://comments.gmane.org/gmane.comp.gnu.radio.general/44365

maybe you can try this patch

https://github.com/bastibl/gnuradio/commit/09d5058...

Bastian

On 10/12/2013 10:58 PM, Johannes Demel wrote:
>
>>
https://github.com/gnuradio/gnuradio/blob/master/g...
>>      I work around it by prototyping hier blocks as custom GRC blocks,
>>      <mailto:ufcsy@student.kit.edu>> 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
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>


--
Dipl.-Inform. Bastian Bloessl
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-53288 / Fax: -53079
http://ccs.uibk.ac.at/~bloessl/
D401989dfd9df14a33b4c5dd6ce2c275?d=identicon&s=25 Sebastian Koslowski (Guest)
on 2013-10-14 19:29
(Received via mailing list)
Attachment: signature.asc (900 Bytes)
Hi Johannes,

try this for #2:
https://github.com/skoslowski/gnuradio/commit/a79d...

Sebastian
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.