[Nut-upsdev] Some questions on driver implementation and variable
Peter Selinger
selinger at mathstat.dal.ca
Sun Feb 25 18:55:42 CET 2007
Arjen,
how do you propose that a client should compute the battery runtime?
That seems device specific to me. -- Peter
Arjen de Korte wrote:
>
> Carlos Rodrigues wrote:
>
> > Well, there's no need to limit the output to values directly obtained
> > from the UPS.
>
> There is. Keep in mind that every change in the state of the driver will
> be pushed to all clients connected to it through the server. Even if
> they don't need it (upsmon for instance will only look at ups.status and
> nothing else). The more variables you add, the more verbose the driver
> will be and the more traffic you'll be generating. And the bigger the
> problems we'll have with growing state trees.
>
> > The driver can calculate some stuff, like the battery
> > runtime, the battery charge (percentage) and so on.
>
> Clients can do exactly the same, with the benefit that this will work
> for all drivers supporting the input variables needed, instead of just one.
>
> > Basically, the driver should calculate values that may be useful for
> > the user, as long at they're somewhat dependent on the particular
> > UPS it is driving.
>
> Name an example. None of the examples you mentioned are very device
> specific.
>
> > Basically, a driver should calculate stuff so that the hardware looks
> > fancier than it actually is, but it should not implement features that
> > are better off in some layer above the driver.
>
> That it really the worst reason I can think of... :-)
>
> Best regards, Arjen
>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>
More information about the Nut-upsdev
mailing list