Subject: Re: apmd battery/line script names
To: None <current-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang+gnus@wsrcc.com>
List: current-users
Date: 11/20/1998 10:59:34
> In that case, "external power" and "battery power" spring to my mind.

Names like "external power" "battery power" imply something thats true
whenever "on battery" or "on external".  The script only gets called
when transitioning "from external to battery" and "from battery to
external".  A better name would be something that implies its
edge-triggered not level-triggered (eg. toBattery, external2battery
etc).

This is a distinction that hacking with the UPS code has drummed into
my mind.  There are two transitions and two states of interest.  One
pair can of course be derived from the other pair, but having the two
pairs be named well saves a lot of head scratching in the long run.

   transitions:
	external_to_battery
	battery_to_external

   states:
	on_battery
	on_external
		
-wolfgang
-- 
       Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
		    http://www.wsrcc.com/wolfgang/
    I do hit delete for spam.  It's just that my delete key isn't
	       bound to what you probably think it is.