discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Specifying parameter type in .xml where parameter is


From: Manu T S
Subject: [Discuss-gnuradio] Specifying parameter type in .xml where parameter is a class defined in python
Date: Wed, 17 Jul 2013 12:03:04 +0530

Hello,

I have a block "ldpc_encoder", which takes as parameter an object of the class "ldpc_parity".The block "ldpc_encoder" and the class "ldpc_parity" are defined in python. The parameter is passed as a variable LDPC_Parity into the __init__() method. I have successfully installed this block using cmake tools.

Now I want to edit .xml file corresponding to this block. The automatically generated(using mod_tool) .xml file is given below.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<block>
  <name>ldpc_encoder</name>
  <key>ldpc_ldpc_encoder</key>
  <category>ldpc</category>
  <import>import ldpc</import>
  <make>ldpc.ldpc_encoder($LDPC_Parity)</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>...</name>
    <key>...</key>
    <type>...</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><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></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><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></type>
  </source>
</block>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
>From what I understand,  I have to edit the parameter declaration to define $LDPC_Parity as a parameter.
How do I specify the type in this case? Can I use import statements?

--
Manu T S

reply via email to

[Prev in Thread] Current Thread [Next in Thread]