discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr.prefs


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] gr.prefs
Date: Thu, 29 Apr 2010 08:56:54 -0700
User-agent: Mutt/1.5.20 (2009-08-17)

On Thu, Apr 29, 2010 at 03:01:51PM +0200, Martin DvH wrote:
> On Wed, 2010-04-28 at 15:28 -0400, Marcus D. Leech wrote:
> > Is there any kind of guide as to how gr.prefs is supposed to be used? 
> > Is this functionality going
> >   to be deprecated at any point, is there any kind of plan as to how it
> > will be used?
> > 
> There is not much documentation but I found out the hard way a few
> thinks you should know.
> 
> The format of the prefs configartion files:
> 
> -Never ever put a comment on the same line as a setting.
> 
> For example:
> GOOD:
> # default fft_rate=15
> fft_rate=8
> 
> BAD
> fft_rate=8 # default fft_rate=15
> 
> This results in a parse error for the line, and consequently the default
> being used (in this case 15) in stead of your value (in this case 8).
> 
> Comments should be on their own line, starting with a # with no
> whitespace in front of the #.
> 
> -Don't have backups of conf files (or other files) laying around in 
> (/usr/local)/etc/gnuradio/conf.d
> 
> All files in (/usr/local)/etc/gnuradio/conf.d will be parsed.
> 
> If you have gr-wxgui.conf and gr-wxgui.conf~ and gr-wxgui.conf.bak and
> README.txt then all will be parsed in unknown order.
> The last value parsed will be used.

Martin, We could probably change that to only loading *.conf without
breaking anything that matters.  Feel free to fix it :-)

Marcus, there's no plan to deprecate this.  It's used in quite a few
places such configuring the audio subsystem.

One thing to know about it, is that it's currently dependent on python
to implement the real functionality.  Thus it won't work in C++ only
apps (unless somebody recodes the python to C++).  There's a pretty
much empty C++ class with virtual methods that's overridden in python
using SWIG director magic.

Martin, the place to filter the list of files in
gnuradio-core/src/python/gnuradio/gr/prefs.py, line 72.


Eric




reply via email to

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