我用 C++ 在 GNU Radio 中开发了一个 Out of tree 块。我正在使用通过 <zmq.hpp> 库实现的 ZMQ 套接字通过两个线程传递数据。
当我尝试在 GNU Radio 伴侣中执行我的 OOT 块(pthread 块)时,它出现的是:AttributeError: 'module' object has no attribute 'pthread'。
Traceback (most recent call last): File "/home/itupac/workarea-gnuradio/Labs/pthread/top_block.py", line 161, in <module> main() File "/home/itupac/workarea-gnuradio/Labs/pthread/top_block.py", line 149, in main tb = top_block_cls() File "/home/itupac/workarea-gnuradio/Labs/pthread/top_block.py", line 116, in __init__ self.pthread_pthread_0 = pthread.pthread() AttributeError: 'module' object has no attribute 'pthread'
这些天我一直在尝试解决这个错误......我在 CMakeLists.txt 顶部的这一行中添加了 ZEROQM 一词:set(GR_REQUIRED_COMPONENTS RUNTIME ZEROMQ),但它仍然不起作用。
我在 github 中有我的块的 OOT 代码:https ://github.com/isaactd92/gr-pthread.git 。
我非常感谢在这个问题上的任何帮助。问候艾萨克。