[lcdproc] Hashes and config file. ;-) (and dynamic load)
Tue, 27 Mar 2001 13:22:28 +0200
>From: Andre Breiler [mailto:firstname.lastname@example.org]
>On Mon, 26 Mar 2001, Joris Robijn wrote:
>> > > Maybe we could have a (argv,argc) kind of argument (list of string).
>> This way we can use the same format for command line, config file and
>> widget language. Cool.
>Yes sure. When you define a EOL char than you can put the complete config
>file on the command line :) (LCDd -c 'globaloption1=yyy\n[driver]\n...)
Ok, I feel it, you don't like long command line. ;-)
Obviously if LCDd is run at startup we want a short command line
and yet another config file in /etc(?).
>> Or read and store the values, and let the drivers request them by key.
>> Better encapsulation. The example that I used a short while back was:
>> value = get_parameter_int( "key", defaultvalue );
>Nice. Should this only available while the config is read or over the
>complete lifetime of the server ?
I guess over the complete lifetime of the driver,
but most driver will only read this at init time. ;-)
>In the latter case we should use a hash to store config in the LCDd.
I have been suggestion hash for that,
then someone said we only need it the protocol,
now you tell me we need it again for config file... ;-)
[Side note, for protocol we can build a perfect hash function...
but for the config file, we might not know the keywords used
by each driver. So an unperfect hashing with a more dynamic
table need to be used. However remember that hash table are
most of the time of fixed size, this introduce limitation
and/or waste of memory.]
Is the config file suppose to be read only at startup,
or re-read later (for dynamic loading) when we get a signal (or ?)?
If it has to be re-read and that some config of some LCD is change
(baud rate? size? ...) should we reset and reinitialise the driver?
How do we detect changes, how do we tell the driver?
What do we do with current client?
To unsubscribe from this list send a blank message to