|
From: | Richard Mcallister |
Subject: | [Discuss-gnuradio] Using io_signatures in Python Sync Blocks |
Date: | Tue, 24 Jan 2017 13:33:14 -0500 |
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.syncblock.init_ such as for this:
gr.syncblock.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
[Prev in Thread] | Current Thread | [Next in Thread] |