[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using io_signatures in Python Sync Blocks
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] Using io_signatures in Python Sync Blocks |
Date: |
Thu, 26 Jan 2017 15:11:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
hier_block should be fine, since it maps directly to the C++ API.
-- M
On 01/26/2017 02:11 PM, Richard Mcallister wrote:
> Thanks! I was kinda assuming at this point it wasn't supported, because
> of a lack of examples, but I wanted to check since the documentation
> didn't say one way or the other. I never thought to check the gateway.
>
> I'm assuming this means it wouldn't work with a hier_block either?
>
> On Thu, Jan 26, 2017 at 5:44 AM, Martin Braun <address@hidden
> <mailto:address@hidden>> wrote:
>
> Richard,
>
> looks like the Python gateway assumes a fixed list of ports:
>
>
> https://github.com/gnuradio/gnuradio/blob/6225e5d4d1edd67c896c6c43bdc584a078480a8d/gnuradio-runtime/python/gnuradio/gr/gateway.py#L98-L103
>
> <https://github.com/gnuradio/gnuradio/blob/6225e5d4d1edd67c896c6c43bdc584a078480a8d/gnuradio-runtime/python/gnuradio/gr/gateway.py#L98-L103>
>
> Seems what you're trying is not supported :/
>
> -- M
>
> On 01/24/2017 07:33 PM, Richard Mcallister wrote:
> > So I've done the tutorials in the past and have created my own OOT
> > modules before. I know that for the standard sync, decim, and interp
> > blocks you simply declare the input and output ports in
> > gr.sync/block.//init/_ such as for this:
> >
> > gr.sync/block.//init/_(self,name='example', in_sig=[...], out_sig=[])
> >
> > My question is how do you do you deal with blocks with a variable amount
> > of ports? When coding in a C++, you can just use
> > gr_signature(<Min>,<Max>, size) in the code. Is it possible to pass
> > arguments to the gr_signature from the Python, or if I wanted this,
> > would I have to code this in C++. the only examples I've seen that call
> > gr_signature in Python are for hier_blocks, but since I'm using custom
> > blocks, wouldn't I end up back at square one? (Since the block I'm
> > updating has a fixed number of ports, even if the hier block did not,
> > the block inside would crash with too many inputs).
> >
> > Also, the block itself I want has no max number of ports, so for the
> > io_signature, I believe I put -1 as the argument for max?
> >
> >
> > -Richard McAllister
> >
> >
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden <mailto:address@hidden>
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
> >
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden <mailto:address@hidden>
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>
>