[英]Can I have multiple inputs in a Embedded Python Block?
我想知道我是否可以擁有一個具有多個輸入的嵌入式 Python 塊? 如果答案是肯定的,我怎么能得到它? 謝謝
要擁有多個輸入,您需要向in_sig
參數添加更多元素。 例如,要擁有兩個復雜的輸入,您需要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]
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.