Forum: GNU Radio Hierarchical Blocks with GrExtras message I/O

Posted by Roy Thompson (Guest)
on 2012-11-20 17:09
(Received via mailing list)
Is it possible to create hierarchical blocks that have GrExtras
messages as the inputs or outputs?  The standard pad source and sink
blocks don't appear to provide a way to do this.

Thanks,
Roy
Posted by John Malsbury (Guest)
on 2012-11-20 18:45
(Received via mailing list)
Trying using 'bytes' as the data type for the pad source/sinks.  This
seemed to work for me.

-John
Posted by Josh Blum (Guest)
on 2012-11-20 20:01
(Received via mailing list)
On 11/20/2012 08:08 AM, Roy Thompson wrote:
> Is it possible to create hierarchical blocks that have GrExtras
> messages as the inputs or outputs?  The standard pad source and sink
> blocks don't appear to provide a way to do this.

Not sure if this is in a release yet, but the pad source/sink have a
wildcard option for the port IO type. You can use this.

-josh
Posted by Roy Thompson (Guest)
on 2012-11-20 23:14
(Received via mailing list)
Thanks, I updated to pull in all of the latest changes and the pad
source/sink now have the wildcard option as you suggested.  So I tried
to create a simple hierarchical block that has one message input and
one message output using wildcard pads.  Everything works great with
generating the block in companion and importing it into another
flowgraph, but when I try to run it, I'm getting the error below.  Any
ideas?

Traceback (most recent call last):
  File "/root/mockup_test.py", line 118, in <module>
    tb = mockup_test()
  File "/root/mockup_test.py", line 47, in __init__
    self.gui_wrapper_0 = gui_wrapper()
  File "/root/.grc_gnuradio/gui_wrapper.py", line 16, in __init__
    gr.io_signature(1, 1, 0*1),
  File 
"/usr/lib64/python2.6/site-packages/gnuradio/gr/gnuradio_core_runtime.py",
line 217, in io_signature
    return _gnuradio_core_runtime.io_signature(*args, **kwargs)
RuntimeError: gr_io_signature(3)

Thanks,
Roy
Posted by Josh Blum (Guest)
on 2012-11-21 09:22
(Received via mailing list)
On 11/20/2012 02:13 PM, Roy Thompson wrote:
> Thanks, I updated to pull in all of the latest changes and the pad
> source/sink now have the wildcard option as you suggested.  So I tried
> to create a simple hierarchical block that has one message input and
> one message output using wildcard pads.  Everything works great with
> generating the block in companion and importing it into another
> flowgraph, but when I try to run it, I'm getting the error below.  Any
> ideas?
>

I guess it needs more work. The underlying scheduler doesnt support that
(even though grc is happy).

Try the size == 1 byte solution. See:
https://github.com/buoyboy/pre-cog/blob/master/exa...

-josh
Posted by Roy Thompson (Guest)
on 2012-11-21 17:49
(Received via mailing list)
That seems to work, I didn't realize that grc would allow connecting a
message port to a byte port.

Thanks for your help.

-Roy
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.