[Nut-upsdev] Dynamic HID driver mappings, Tripplite-hid.c

Thomas Charron twaffle at gmail.com
Fri Oct 7 19:48:33 UTC 2011

  I think I'm going to have the slightly rejigger the tripplite-hid.c
driver to 'properly' support all of the data I know about it's

  A given UPS may have 'n' output loads.  I could have 5, I could have
10, I won't know until I actually ask the UPS.  But in order to use
the hid to nut struct, I'm actually going to have to modify that
struct dynamically, or in actuality, create a new struct, copy the old
struct, add stuff to the end, then change the struct in
tripplite_subdriver to point to the new, 'for this particular UPS' hid
to nut table.

  This is due to Tripplite's HID use of a bitmask to provide some of
this information.  For example, on our units, we have 3 switchable
outlets.  This should map to outlet.1, outlet.2, and outlet.3.
However, they could have another UPS with outlets 1-8.

  Suggestions?  Better ways to do this?    Anyone who is more familiar
with the code want to do the logical changes, and I can help with the
hid entries that matter and how they work.

-- Thomas

More information about the Nut-upsdev mailing list