I'd like to know If I could have an Embedded Python Block with multiples inputs? If the answer is yes, How could I get it? Thank you
Asked
Active
Viewed 1,167 times
1 Answers
2
To have multiple inputs you need to add more elements to the in_sig
parameter. For example to have two complex inputs you need in_sig=[np.complex64, np.complex64]
class blk(gr.sync_block): # other base classes are basic_block, decim_block, interp_block
"""Embedded Python Block example - a simple multiply const"""
def __init__(self, example_param=1.0): # only default arguments here
"""arguments to this function show up as parameters in GRC"""
gr.sync_block.__init__(
self,
name='Embedded Python Block', # will show up in GRC
in_sig=[np.complex64, np.complex64],
out_sig=[np.complex64]
)
See also 3.2.3. Modifying the Python Block File.

Vasil Velichkov
- 1,236
- 11
- 17