Subject: Re: PROPOSAL: API for environmental sensors
To: None <tech-kern@netbsd.org>
From: Bill Squier <groo@cs.stevens-tech.edu>
List: tech-kern
Date: 11/11/1999 15:04:00
> Any chance we can select() on the device node and read from it instead of
> having to (blegh) poll it with ioctl's?

This has come up, and I'm not opposed to it.  With a no-frills API like ENVSYS 
1.0, it seems easy to accomplish with a union type over envsys_*_data with a 
type field for polymorphism.  One downside is that a change to the data 
structures which mandates an increase in the size of the union would require a 
re-compile of userland apps.

One could retain the ioctl() interface to set device characteristics 
(envsys_*_info), which seems consistent with what ioctl() was designed for.

-- 
Bill Squier (groo@cs.stevens-tech.edu)
http://www.cs.stevens-tech.edu/~groo
Ph: (201)216-5486   Fax: (201)216-8249