4 * Public header file for the APC Smart protocol driver
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General
10 * Public License as published by the Free Software Foundation.
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 GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public
18 * License along with this program; if not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26 /* Private data structure */
27 typedef struct s_smart_data
{
28 struct termios oldtio
;
29 struct termios newtio
;
37 extern int apcsmart_ups_get_capabilities(UPSINFO
*ups
);
38 extern int apcsmart_ups_read_volatile_data(UPSINFO
*ups
);
39 extern int apcsmart_ups_read_static_data(UPSINFO
*ups
);
40 extern int apcsmart_ups_kill_power(UPSINFO
*ups
);
41 extern int apcsmart_ups_shutdown(UPSINFO
*ups
);
42 extern int apcsmart_ups_check_state(UPSINFO
*ups
);
43 extern int apcsmart_ups_open(UPSINFO
*ups
);
44 extern int apcsmart_ups_close(UPSINFO
*ups
);
45 extern int apcsmart_ups_setup(UPSINFO
*ups
);
46 extern int apcsmart_ups_program_eeprom(UPSINFO
*ups
, int command
, const char *data
);
47 extern int apcsmart_ups_entry_point(UPSINFO
*ups
, int command
, void *data
);
49 extern int apcsmart_ups_shutdown_with_delay(UPSINFO
*ups
, int shutdown_delay
);
50 extern int apcsmart_ups_get_shutdown_delay(UPSINFO
*ups
);
51 extern void apcsmart_ups_warn_shutdown(UPSINFO
*ups
, int shutdown_delay
);
53 #endif /* _APCSMART_H */