NetBSD/sys/dev/sysmon
xtraeme 1b3709ecde Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.
ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$
2007-09-02 19:36:59 +00:00
..
files.sysmon Remove unused (and inexistent) flag. 2007-09-02 00:28:28 +00:00
swwdog.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
sysmon_envsys_events.c sme_event_register: don't forget to add the object in dictionary when 2007-09-01 12:46:04 +00:00
sysmon_envsys_util.c Some fixes for kern/36673 by yamt@: 2007-07-21 12:11:27 +00:00
sysmon_envsys.c Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING. 2007-09-02 19:36:59 +00:00
sysmon_envsysvar.h - sme_unregister_all: there's no need to use a struct sysmon_envsys as 2007-08-31 22:44:39 +00:00
sysmon_power.c Add missing #include <prop/proplib.h>, should fix build failure reported 2007-08-17 16:52:52 +00:00
sysmon_taskq.c Convert sysmon_taskqueue to use mutex(9) and condvar(9) and initialize 2007-07-21 23:15:16 +00:00
sysmon_taskq.h Convert sysmon_taskqueue to use mutex(9) and condvar(9) and initialize 2007-07-21 23:15:16 +00:00
sysmon_wdog.c Add <sys/mutex.h> rather than <sys/lock.h>. 2007-09-02 00:44:07 +00:00
sysmon.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
sysmonconf.h * Add a generic power management event API, defined in <sys/power.h>. 2003-04-18 01:31:34 +00:00
sysmonvar.h Convert the sysmon watchdog framework to use mutex(9) rather than 2007-09-02 00:41:24 +00:00