[Nut-upsdev] Fwd: RE New xanto driver for NUT

Carlos Rodrigues cefrodrigues at mail.telepac.pt
Tue Nov 15 19:52:55 UTC 2005


On 11/15/05, Arnaud Quette <aquette.dev at gmail.com> wrote:
> Unfortunately, I do belive it is necessary.
> The megatec protocol is used, but with some modifications of some
> commands.
> As there is absolutely no way of asking the UPS about manufacturer or
> model data, adding these models to the generic megatec driver would result
> in introducing special cases just for these models.
>
> I think, this is rather a nuissance.

Hmmm, can you give some examples of commands that behave differently
between "megatec" and "xanto"?

If it is sufficiently different I guess it cound be a separate driver.
This protocol is used by many manufacturers, and most of them (beyond
the low-end models) introduce variations of some sort, so there are
going to be some special cases...

The real question is: how does the current "megatec" driver handle it
now? Does it barely work or doesn't it work at all (or behaves
unacceptably wrong)?

If it does work but shows wrong values for the battery charge, and
other informational stuff, depending on how far the variations go (as
I said above), some special cases could be implemented by passing an
argument to the driver specifying the hardware (currently it doesn't
have one, because it is only at the "eliminate redundant drivers"
stage).

The bottom line is seeing if the code sharing gains really are dwarfed
by the special cases losses.

BTW, are you starting from scratch or did you fork an existing driver?

--
Carlos Rodrigues (megatec)



More information about the Nut-upsdev mailing list