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 _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio