[Nut-upsdev] Re: Serial Ports (Was Re: Common Power Management : NUT and HAL (stage 1))

Arnaud Quette aquette.dev at gmail.com
Wed Sep 13 11:15:57 UTC 2006


2006/9/11, David Zeuthen <david at fubar.dk>:
>
> Hi,
>
> So if I understand correctly, this is the interaction we want
>
>  1. User wants to configure serial port

right

>  2. User selects UPS from list of device types

right.

>  3. We use print-ups-list to get a list of drivers, each entry
>     contains:
>     - driver name
>     - some text blob explaining what the driver supports
>     - a list of knobs, e.g. type, name and description of the
>       knob, e.g. a list
>     - e.g. a data structure like this
>       {string driver_name,
>        string driver_desc,
>        array {string option_type,
>               string option_name,
>               string option_description} driver_options;
>       }

right, or about.
currently, the print-ups-list tools generate various output format
depending upon the param used (--fdi-hal, --udev-rules,
--hotplug-usermap, ...).
Your above mentionned format would better match the current
drivers.list format [1] as it's the same info. If we really need
different info, we might add a new param to print-ups-list to well
format things.

>  4. User selects the driver and options. These are stored as
>     HAL properties and will persist between HAL restarts.

this is the point where we have to make a choice:
1) store as HAL props (needs persistance)
2) use nut libupsconfig and store as NUT config. Store only the device
section as HAL props.
As a side note, NUT drivers *will* have to read nut config mode to
know, if these are launched by HAL, if they are allowed to start
(mode={none,pm}) or not. This allow to integrate and enable the HAL
bridge by default, while keeping the capacity to disable it if one
want to switch to nut "classic" mode.

>  5. We now launch the NUT addon, it reads the properties and
>     starts.
>
> Does this sound correct?

yeh, with the few comments above, and the config storage location ;-)
we're getting closer.

Arnaud
--
[1] http://svn.debian.org/wsvn/nut/trunk/data/driver.list?op=file&rev=0&sc=0
-- 
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list