[Nut-upsdev] [nut-commits] svn commit r1043 - in trunk: . docs drivers
Arjen de Korte
nut+devel at de-korte.org
Sun Aug 12 07:28:33 UTC 2007
>> + * drivers/apc-hid.c:
>> + - Commented out the 'fullycharged' status. If anyone can explain the
>> + use of this, please step forward.
>
> This flag is defined on p.36 of the "Universal Serial Bus Usage Tables
> for HID Power Devices", Release 1.0 November 1, 1997, a USB standards
> document available on the web.
I have that document, which is nice source for information regarding the
use of parameters that can be read from/written to the UPS.
> The document defines this flag to mean "Fully Charged". I assume that
> this means that the battery is fully charged, which would presumably
> happen after charging has finished, and before discharging begins. Its
> meaning should be similar to a battery.charge of 100%, except that it
> is a boolean flag, and that for whatever reason, some UPS might
> consider itself fully charged at less than 100%.
That is also what I expected here. But then, why does a client/user need
to know that? What action could possibly be triggered by seeing that the
batteries are fully charged?
> FullyCharged is not precisely an "alarm", as it is not a condition to
> be worried about. It is a kind of status. The standard actually
> defines four related codes defined: "Charging", "Discharging",
> "FullyCharged", and "FullyDischarged". Although some UPS simply
> pretend to be "charging" all the time, this is often confusing to
> users, who expect that their battery must be full at some point.
*sigh!*
People who have no clue about how batteries work, should not worry about
this. Unfortunately, that's not under our control, so I agree we'd better
work around these 'bugs'. :-)
> It would make sense to me to map all four related codes to status
> flags. In fact, precisely one of the four should be true at any given
> time for any given connected battery, although the standard does not
> specify this.
I'm very reluctant to add all sorts of status flags to 'ups.status' (in
fact, I still doubt if we should have CHRG and DISCHRG in there). Where
would we stop? I propose that we map 'FullyCharged=1' to '!chrg' and
'FullyDischarged=1' to '!dischrg'. By putting these at the end of the list
of 'ups.status' info elements, they would clear the Charging and
Discharging status, without setting these. So 'FullyCharged=0' would not
mean the UPS is charging, nor would 'FullyDischarged=0' mean that it is
discharging.
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsdev
mailing list