[Nut-upsdev] Re: Differences between newhidups (MGE tables) in 2.0.4 and svn trunk

Arnaud Quette aquette.dev at gmail.com
Tue Jan 9 10:03:46 CET 2007


2007/1/9, Charles Lepple <clepple at gmail.com>:
> I was looking at how other drivers deal with outlet collections, and I
> noticed some differences between newhidups in 2.0.4 (from Debian's
> 2.0.4-2.3) and the SVN trunk (rev 723) on an Evolution. Full diff is
> below, but here are the highlights:
>
>  * MGE HID 0.9 vs 1.0
>  * outlet.#.switch seems to have moved to the commands outlet.#.load.{on,off}
>
> Then I found this in the ChangeLog:
>
>    * fix outlet.X.delay.{shutdown,start} and add temporary
>      commands (to be discussed) outlet.X.load.{on,off}. This
>      last would better be addressed through parameters of the
>      load.{on,off} command.
>
> For the on/off commands, couldn't we just use the upsrw-style
> variables and the existing names? It seems that optiups and mge-shut.h
> still use the outlet.#.switch variables.

I've needed to switch to the command style since there are 2 HID data:
1 for the off and 1 for the on. Not addressable easily with the upsrw
style, since in this mode, we have 1 (HID) data mapped to 1 nut
variable, with multiple values.

> Also, the older drivers seem to use 0/1 for the on/off values. We
> should probably stick with 0/1 for simplicity, or implement a "boolean
> parser" that maps "1", "on", "true", etc to 1, and others to 0.
> Thoughts?

the simplicity vs user experience problem.
I've made this improvement considering the later, and it was long overdue...
since the data value lookup already exists, why not using it?

> ...

now, since there is a growing interest for the outlet collection, we
might start a thread. Remember that when I've started this, this
feature was only known on MGE hardware... So things might need to
evolve a bit.

Arnaud
-- 
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