|
From: | Manu T S |
Subject: | Re: [Discuss-gnuradio] Specifying parameter type in .xml where parameter is a class defined in python |
Date: | Wed, 17 Jul 2013 12:24:03 +0530 |
How do I specify the type in this case? Can I use import statements?Now I want to edit .xml file corresponding to this block. The automatically generated(using mod_tool) .xml file is given below.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.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
<?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.
--
Manu T S
[Prev in Thread] | Current Thread | [Next in Thread] |