[Nut-upsdev] [nut-commits] svn commit r1210 - in trunk: . drivers

Charles Lepple clepple at gmail.com
Thu Jan 3 14:34:09 UTC 2008

On Jan 3, 2008 6:20 AM, Arjen de Korte <nut+devel at de-korte.org> wrote:
> > I agree with the rest of your logic about complexity, but they are
> > less like placeholders, and more like bugs in the parser. A common
> > idiom in HID report descriptors is to have an array of bytes or
> > bitstrings, and the hidparser code tends to show the first array
> > element properly, then it prints several duplicates of the first
> > element with 0x00000000 instead of the last usage ID.
> Question is, is this worth to be fixed? Even if it used the last usage ID,
> this would mean that we'll have a one (HID path) to many (values) mapping.
> Correct me if I'm wrong, but it doesn't make a whole lot of difference if
> we have

For accessing a PDC UPS, no, it probably doesn't need to be fixed. (I
don't think the PDC specification uses arrays like this.)

However, if we ever wanted to use the hidparser in a more generic way
to look at a descriptor and say that it has an array of 5 bytes in and
8 bytes out (for instance; as some of the serial-to-USB-HID chips do),
we shouldn't cover over the problem.

It's getting to the point where we probably need to have some test
cases to make sure that we still have access to the critical variables
(without having to test on an UPS each time).

- Charles Lepple

More information about the Nut-upsdev mailing list