Forum: GNU Radio How to use gr_hier_block2 with multi output

Posted by Luong Tan Phong (Guest)
on 2012-09-28 05:22
(Received via mailing list)
Hi Lists,

I've used gr_hier_block2 class with 1 output stream and it's OK but I 
can't
use gr_hier_block2 with 2 output streams. Could you help me, please?

Thanks.

Phong
Posted by Tom Rondeau (Guest)
on 2012-10-01 23:35
(Received via mailing list)
On Thu, Sep 27, 2012 at 11:21 PM, Luong Tan Phong <phonglt03@gmail.com> 
wrote:
> Hi Lists,
>
> I've used gr_hier_block2 class with 1 output stream and it's OK but I can't
> use gr_hier_block2 with 2 output streams. Could you help me, please?
>
> Thanks.
>
> Phong

Yes, you should be able to set up an io_signature just like any other
block. You should then be able to use self.connect(block0, (self,0))
and self.connect(block1, (self,1)) to connect them up. Or the
appropriate C++ version for this.

The main restriction is that you cannot have a variable number of
streams. So if you use 2 output streams, you must use io_signature(2,
2, sizeof(...)) and then make sure both streams are connected in your
graph.

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