1 /* explore-hid.c - this is a "stub" subdriver used to collect data
2 * about HID UPS systems that are not yet supported.
4 * This subdriver will match any UPS, but only if the "-x explore" option
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "usbhid-ups.h"
26 #include "explore-hid.h"
28 #define EXPLORE_HID_VERSION "EXPLORE HID 0.1"
30 static usage_tables_t explore_utab
[] = {
35 /* --------------------------------------------------------------- */
36 /* Data lookup table (HID <-> NUT) */
37 /* --------------------------------------------------------------- */
39 static hid_info_t explore_hid2nut
[] =
41 /* end of structure. */
42 { NULL
, 0, 0, NULL
, NULL
, NULL
, 0, NULL
}
45 static const char *explore_format_model(HIDDevice_t
*hd
) {
49 static const char *explore_format_mfr(HIDDevice_t
*hd
) {
53 static const char *explore_format_serial(HIDDevice_t
*hd
) {
57 /* this function allows the subdriver to "claim" a device: return 1 if
58 * the device is supported by this subdriver, else 0. */
59 static int explore_claim(HIDDevice_t
*hd
) {
60 if (testvar("explore")) {
67 subdriver_t explore_subdriver
= {
74 explore_format_serial
,