Subject: Re: envsys version 2 API
To: Jason Thorpe <thorpej@shagadelic.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 04/24/2007 23:48:00
On Tue, 24 Apr 2007 14:40:39 -0700
Jason Thorpe <thorpej@shagadelic.org> wrote:

> 
> On Apr 24, 2007, at 1:26 PM, Juan RP wrote:
> 
> > I've converted aiboost(4), if you are interested in the XML output
> > that envstat(8) will parse:
> >
> > http://www.xtrarom.org/~juan/envsys2/output.txt
> 
> Couple of comments:
> 
> 1- Overall, looks pretty good!
> 
> 2- Are all the keys in the "aiboost0" dictionary "sensor0" ..  
> "sensorN"?  And will all of the drivers report them this way?  If so,  
> then it is probably best for that object to be an array, e.g.:

Yeah, Macallan suggested to create a dictionary per-sensor with
all properties on it and I liked it...

> 	<key>aiboost0</key>
> 	<array>
> 		<dict>
> 			<key>cur-value</key>
> 			<integer>313150000</integer>
> 			.
> 			.
> 			.
> 		</dict>
> 		.
> 		.
> 		.
> 	</array>

Why an extra array is better than what I'm using right now?
(just curiosity).

> 3- Eliminate the leading and trailing whitespace in your descriptions,  
> e.g.:
> 
> 	<key>description</key>
> 	<string> +3.3 Voltage</string>

This is the string that aiboost(4) reports back to sysmon_envsys, I could
fix the driver...

> should be:
> 
> 	<key>description</key>
> 	<string>+3.3 Voltage</string>
> 
> 4- Why do we have the driver name that provides the sendors at the top- 
> level?  The idea is for sysmon to be the one place where all that  
> information is gathered, rending the driver that provides it largely  
> irrelevant, from the user's perspective.

I choose that way because I thought that might be simpler for
sysmon_envsys_unregister, to destroy the device dictionary.

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish