[Top][All Lists]

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

Re: [Discuss-gnuradio] GRC Block XML Tags

From: Josh Blum
Subject: Re: [Discuss-gnuradio] GRC Block XML Tags
Date: Sat, 20 Aug 2011 21:53:30 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11

On 08/19/2011 02:11 PM, Jordan Otomo wrote:
> Hi,
> I'm having issues creating a GRC block in an "out-of-tree-project"
> that will generate a few lines of python code and update a python
> variable (similar to the "variable_function_probe").  In my project,
> the <var_make> and <make> tags do not seem to behave as they do in
> the "variable_function_probe."  GRC does not appear to be recognizing
> <var_make>, and <make> generates "self.my_block_0 = " (as expected).
> Are there any limitations preventing me from using the <var_make>
> tag?  Also, how can I get <make> to not generate "self.my_block_0 = "
> as it does for the "variable_function_probe"?

GRC will recognize a block as a variable if it passes the regexp
"_variable_matcher = re.compile('^(variable\w*)$')", in other words, if
the key starts with the string "variable"

If grc recognizes the block as a variable, it will eval the var_make,
#for $var in $variables
#end for

> I've tried copying 'variable_function_probe.xml' and 'variable.xml'
> into my project and they do not behave as they do when they're in the
> gnuradio directory.  Thus, I'm wondering if I need to designate my
> block as being a special "Variable" type block.  Any help would be
> greatly appreciated.

There is nothing special about the directory an xml file is in. As long
as grc is told to import it. If you actually copied the file and it was
imported twice, grc would print an error



reply via email to

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