[Nut-upsdev] upsdrv_updateinfo() in newhidups.c
Alfred Ganz
alfred-ganz+nut at agci.com
Sat Aug 13 01:22:43 UTC 2005
Gentlemen,
I assume this is really for Arnaud:
I am looking at the code in upsdrv_updateinfo() where it is processing a
HID notification, i.e. it is not doing a full update:
Question one, is it implicitely assumed that ups.status related items
will always require a translation (i.e. item->hid2info != NULL) in order
to be effective? I haven't seen any place where that is enforced, but
there are no ups.status type updates for the no translation case. I think
this may always be the case, but then it should be somehow enforced.
Question two, in the same code, if an item doesn't require a translation
(i.e. item->hid2info == NULL), why are non-status items not updated, while
they are updated in the translation case, provided there is a new value?
The reason I ask the second question is because in my case the UPS burps
RunTimeToEmpty and RemainingCapacity, and they might as well be updated
when they come.
Thanks, AG
--
----------------------------------------------------------------------
Alfred Ganz alfred-ganz at agci.com
AG Consulting, Inc. (203) 624-9667
440 Prospect Street # 11
New Haven, CT 06511
----------------------------------------------------------------------
More information about the Nut-upsdev
mailing list