[英]Can I have multiple inputs in a Embedded Python Block?
I'd like to know If I could have an Embedded Python Block with multiples inputs?我想知道我是否可以拥有一个具有多个输入的嵌入式 Python 块? If the answer is yes, How could I get it?如果答案是肯定的,我怎么能得到它? Thank you谢谢
To have multiple inputs you need to add more elements to the in_sig
parameter.要拥有多个输入,您需要向in_sig
参数添加更多元素。 For example to have two complex inputs you need in_sig=[np.complex64, np.complex64]
例如,要拥有两个复杂的输入,您需要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.另见3.2.3。 Modifying the Python Block File . 修改 Python 块文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.