[Nut-upsdev] [RFC apcsmart V3 02/18] drivers/apcsmart.h: add compat hardware, add commands

Michal Soltys soltys at ziu.info
Sat Mar 5 10:38:19 UTC 2011


- add few APC models to compatibility table
- add shutdown.return.grace corresponding to '@'
- add ups.firmware.old corresponding to 'V'
- update table version

Signed-off-by: Michal Soltys <soltys at ziu.info>
---
 drivers/apcsmart.h |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h
index 706bbad..4cd0ad5 100644
--- a/drivers/apcsmart.h
+++ b/drivers/apcsmart.h
@@ -23,7 +23,7 @@
 #include "serial.h"
 #include "timehead.h"
 
-#define APC_TABLE_VERSION	"version 2.1"
+#define APC_TABLE_VERSION	"version 2.2"
 
 /* Basic UPS reply line structure */
 #define ENDCHAR 10		/* APC ends responses with LF */
@@ -109,15 +109,11 @@ typedef struct {
 
 apc_vartab_t	apc_vartab[] = {
 
+	{ "ups.firmware.old",  	0,			'V' },
 	{ "ups.firmware",  	0,			'b' },
 	{ "ups.firmware.aux",	0,			'v' },
 	{ "ups.model",		0,			0x01 },
 
-/* FUTURE: depends on variable naming scheme */
-#if 0
-	{ "ups.model.code",	0,			'V' },
-#endif
-
 	{ "ups.serial",		0,			'n' },
 	{ "ups.mfr.date", 	0,			'm' },
 
@@ -207,6 +203,7 @@ apc_vartab_t	apc_vartab[] = {
 #define APC_CMD_CALTOGGLE	'D'
 #define APC_CMD_SHUTDOWN	'K'
 #define APC_CMD_SOFTDOWN	'S'
+#define APC_CMD_GRACEDOWN	'@'
 #define APC_CMD_SIMPWF		'U'
 #define APC_CMD_BTESTTOGGLE	'W'
 #define APC_CMD_OFF		'Z'
@@ -232,6 +229,8 @@ apc_cmdtab_t	apc_cmdtab[] =
 	{ "test.battery.start",	0,			APC_CMD_BTESTTOGGLE },
 	{ "test.battery.stop",	0,			APC_CMD_BTESTTOGGLE },
 
+	{ "shutdown.return.grace",
+				APC_NASTY,		APC_CMD_GRACEDOWN  },
 	{ "shutdown.return",	APC_NASTY,		APC_CMD_SOFTDOWN  },
 	{ "shutdown.stayoff",	APC_NASTY|APC_REPEAT,	APC_CMD_SHUTDOWN  },
 
@@ -268,7 +267,12 @@ struct {
 	{ "7QI",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
 	{ "7TD",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
 	{ "7TI",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
-	/* SmartUPS 1250. */
+	/* SmartUPS 900I */
+	{ "7II",	"79ABCEFGKLMNOPQSUVWXYZcfg", 0 },
+	/* SmartUPS 2000I */
+	{ "9II",	"79ABCEFGKLMNOPQSUVWXYZcfg", 0 },
+	{ "9GI",	"79ABCEFGKLMNOPQSUVWXYZcfg", 0 },
+	/* SmartUPS 1250 */
 	{ "8QD",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
 	{ "8QI",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
 	{ "8TD",	"79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
-- 
1.7.2.1




More information about the Nut-upsdev mailing list