discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GRC: gee it sure would be nice if...


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] GRC: gee it sure would be nice if...
Date: Mon, 26 Apr 2010 22:48:22 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 04/26/2010 09:05 PM, Josh Blum wrote:
> It would be nice. Though you can get away without the ability to embed
> custom functions. Actually, the import was the answer to that.
>
> With the current framework, I usually suggest encapsulating logic into
> python modules or hier2_blocks, that grc will call into. Post
> processing the output is a bad idea.
>
> Id love to see multi-line editable parameters. And to go with that a
> function block of some sort. Howabout a block that imports arbitrary
> python code from a file and writes it into the generated code?
> Although thats only one step away from the above mentioned method.
>
> Thanks,
> -Josh
>
Abandoned the timer idea.

My goal was to be able to save the values of the GUI parameters in a
file whenever they changed.  But
   realized that the GRC "engine" already has dependency graph logic
wired in. So I defined a variable,
   that relied on the output of a "save the variables" function,
imported from a custom module.  This
   function takes flowgraph variables as parameters, and saves 'em.

The appropriate "set" functions within the flow-graph end up calling my
"saver" function, and when
  the starter shell script comes up, it checks to see if there's a
"saved variables" file, and if so,
  passes those values on the command line to the python flowgraph.  Easy
as pie.

Still would like to know what the "official" way to get an interval
timer is from a GRC flowgraph, though.
  The gr.timer class doesn't appear to have a corresponding python class.


-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org






reply via email to

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