如何创建一个参数输出,就像C++ OOT块中的滑块一样?

huangapple go评论141阅读模式
英文:

How to create a parameter output like a slider does from a c++ OOT block?

问题

我想计算调谐频率而不使用滑块。我如何配置一个用C++编写的OOT,使其具有类似QT GUI范围块的参数输出?

英文:

I would like to compute the tune-to frequency rather than use a slider. How do I configure an OOT (written in c++) to have a parameter output like the QT GUI Range block?

答案1

得分: 0

"Parameters" 是一个在GNU Radio 中不存在的概念,它仅存在于GNU Radio Companion (GRC) 生成的Python流图中。

相反,你可以使用一个具有消息端口输出的块,然后在该输出上发出一个包含指示调谐到正确频率的字典的消息。然后,将该消息块连接到你正在使用的硬件接口块(例如UHD USRP Source或Soapy Source)的消息输入。

英文:

You can't.

"Parameters" are a concept that doesn't exist in GNU Radio – it only exists in the Python flowgraphs that GRC generates.

Instead, you would simply have a block with a message port output, and on that output, you'd emit a message containing a dictionary that contains the instruction to tune to the right frequency. You'd then connect that message block to the message input of whatever Hardware-interfacing block (UHD USRP Source? Soapy Source?) you're using.

huangapple
  • 本文由 发表于 2023年3月23日 08:38:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75818379.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定