Desc: Commands sent to the UPS modules
File: commands.txt
Date: 7 Febuary 2002
Auth: Russell Kroll <rkroll@exploits.org>

upsd can call drivers to store values in read/write variables and to kick
off instant commands.  This is how you register handlers for those events.

upscommon has a structure called upsh.  You should populate it with
function pointers in your upsdrv_initinfo() function.  Right now, there
are only two possibilities:

	- setvar  = setting UPS variables (SET protocol command)
	- instcmd = instant UPS commands (INSTCMD protocol command)

If your module's function for handling variable set events is called 
my_ups_set(), then you'd do this to add the pointer:

	upsh.setvar = my_ups_set;

my_ups_set() will receive three parameters:

	int   - the type being set, see shared.h for the values
	int   - data length
	*char - pointer to the actual value that should be set

If you configure a handler for instcmd, it will receive the instant
command type (CMD_*) in the first int.  The other two variables are
not currently used for instant commands, and any values found in them
should be ignored.

Responses
---------

Drivers will eventually be expected to send responses to commands.
Right now, there is no channel to get these back through upsd to
the client, so this is not implemented.

This will probably be implemented with a polling scheme in the clients.
