当我在 gnuradio 中制作 OOT 块时
class mod(gr.sync_block):
"""
docstring for block mod
"""
def __init__(self):
gr.sync_block.__init__(self,
name="mod",
in_sig=[np.byte],
out_sig=[np.complex64])
def work(self, input_items, output_items):
in0 = input_items[0]
out = output_items[0]
result=do(....)
out[:]=result
return len(output_items[0])
我得到:
ValueError: could not broadcast input array from shape (122879) into shape (4096)
我该如何解决?
GRC 如下:
selector :input index 和 output index 由 WX GUI Chooser block 控制
FSK4 MOD: 调制 fsk4 信号并将数据写入 raw.bin
FSK4 DEMOD : 从 raw.bin 读取数据并解调
file source -> /////// -> FSK4 MOD -> FSK4 DEMOD -> NULL SINK
selector
file source -> ////// -> GMKS MOD -> GMSK DEMOD ->NULL SINK
当输入索引或输出索引发生变化时,整个流程图将没有响应。