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

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
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 


_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to