Thursday, April 29, 2010

Re: [Discuss-gnuradio] gr.prefs

Seems boost has something c++ based;
http://www.boost.org/doc/libs/1_42_0/doc/html/program_options/overview.html#id1419894

On 04/29/2010 08:56 AM, Eric Blossom wrote:
> 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
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment