[Nut-upsdev] new variable

Stuart D Gathman stuart at bmsi.com
Mon Oct 5 12:51:29 UTC 2009


Kiss Gabor (Bitman) wrote:
> On Thu, 1 Oct 2009, Stuart D. Gathman wrote:
>   
>> keep simulation parameters in a separate config file from driver parameters.
>>     
>
> Meanwhile file docs/developers.txt writes (watch the third sentence):
> | Note: this does not apply to drivers.  Driver authors should use the
> | upsdrv_makevartable() scheme to pick up values from ups.conf.  Drivers
> | should not have their own config files.
> | 
> | Drivers may have their own data files, such as lists of hardware,
> | mapping tables, or similar.  The difference between a data file and a
> | config file is that users should never be expected to edit a data file
> | under normal circumstances.  This technique might be used to add more
> | hardware support to a driver without recompiling.
>
> Now what? :-)
>
> It is hard to decide if "charging current of an imaginary UPS" or
> "the maximal charge time" is a hardware description or
> simulation data.
I agree it is a tricky decision.  But I still think that the "charging 
current" (and other simulated properties) is a "hardware description" 
rather than a driver config.  Think about it this way, if some magic 
could make your simulated UPS real, what would be in the driver config?  
The description of the UPS that will be magically synthesized goes in 
your simulation parameters.  The configuration for using one of your 
magically manufactured UPSes goes in the driver config. 

Did you know that a hologram of a configuration of lenses and mirrors 
behaves just like real lenses and mirrors (for laser light)?  And this 
also goes for CGI holograms of lenses and mirrors that could not be 
actually made of any known material - and this is commonly used in laser 
printers and scanners.



More information about the Nut-upsdev mailing list