首页 > 解决方案 > gnuradio OOT 模块 xml 文件有解析错误

问题描述

我按照维基https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_Python#3.2.1._Using_gr_modtool生成 OOT 模块并安装它。这一步没有问题。但是,我在运行 gnuradio-companion 时遇到了问题。我收到以下错误。

pradmc$ gnuradio-companion 

(process:64731): Gtk-WARNING **: 14:21:34.591: Locale not supported by C library.   Using the fallback 'C' locale. <<< Welcome to GNU Radio Companion 3.7.13.4 >>>

Block paths:    /usr/local/share/gnuradio/grc   /opt/local/share/gnuradio/grc/blocks

Loading: "/Users/pradmc/gnuradio/serial/serial.grc"
>>> Done

Loading: "/Users/pradmc/gnuradio/serial_test.grc"
>>> Done

XML parser: Found 1 erroneous XML file while loading the block tree (see "Help/Parser errors" for details)

它说有一个错误的 XML 文件。我确认这是因为我的模块。没有我的模块,我看不到错误。我的模块的 xml 非常简单,只有一个源和一个接收器。

<?xml version="1.0"?>
<block>
  <name>constant_gen_ii</name>
  <key>constant_gen_ii_constant_gen_ii</key>
  <category>Misc</category>
  <import>import constant_gen_ii</import>
  <make>constant_gen_ii.constant_gen_ii($max)</make>
  <!-- Make one 'param' node for every Parameter you want settable from the GUI.
       Sub-nodes:
       * name
       * key (makes the value accessible as $keyname, e.g. in the make node)
       * type -->
  <param>
    <name>max</name>
    <key>max</key>
    <type>int</type>
  </param>

  <--- Make one 'sink' node per input. Sub-nodes:
       * name (an identifier for the GUI)
       * type
       * vlen
       * optional (set to 1 for optional inputs) -->
  <sink>
    <name>in</name>
    <type>int</type>
  </sink>

  <!-- Make one 'source' node per output. Sub-nodes:
       * name (an identifier for the GUI)
       * type
       * vlen
       * optional (set to 1 for optional inputs) -->
  <source>
    <name>out</name>
    <type>int</type>
  </source>
</block>

我怎么知道解析器错误是什么?我不确定上述 XML 有什么问题。

问候, Pradeep MC

标签: xmlgnuradio

解决方案


推荐阅读