[Nut-upsdev] recent and planned changes
Peter Selinger
selinger at mathstat.dal.ca
Fri Sep 16 02:03:15 UTC 2005
* I committed into CVS the gendb patch that I sent to the mailing list
on September 12. Arnaud, I hope you approve of this patch; it is
more reliable than the previous method in tracking the correct
dependencies.
* This, together with some other minor recent changes on the
Development branch, is between the "before_PSE_3" and "after_PSE_3"
tags. Arnaud: if you approve these changes, it is probably a good
idea to remove the extra tags at some point.
* The regular expression matching module on the regex_branch is now
complete. It works great for me. Give it a try. With "-D -D", you'll see
sufficient debug messages to see what's being opened and what is
being matched. Please let me know when I should go ahead and merge
these changes into the main Development branch.
This also improves the logic of device opening and reopening. The
newly added "matcher" callback interface is documented in comments
in libhid.h and libhid.c.
My next projects are:
* clean up the newhidups code structure so that headers go in .h
files, and code goes in .c files. This also involves correcting
attributes such as "static", "extern" etc, where necessary.
* separate the Vendor-specific code from the core newhidups driver.
This primarily involves replacing the various "switch (Vendor)"
statements by a more general method, so that new Vendors can be
added more easily in the future. My plan is that each vendor module
supplies a set of callback functions for performing vendor-specific
tasks, including: - deciding whether a given device is supported by
the module or not, - custom-formatting the human-readable UPS
description, - supplying custom Usages etc. All this goes in the
<vendor>-hid.c source file. The newhidups.c core driver will only
get a list of available vendor modules, and will delegate any
vendor-specific tasks to the above-mentioned callback functions.
-- Peter
More information about the Nut-upsdev
mailing list