Posted Mar 20, 2011 18:36 UTC (Sun) by knan (subscriber, #3940)
In reply to: APIs for sensors by giraffedata
Parent article: APIs for sensors
>>They provide samples at specific times,
>That definition should be made clear in any discussion of a sensor >subsystem or API, because there are lots of other ways to understand >sensors. The things I use that I call sensors provide samples only when I >ask for them, and if there is any periodic sampling, the periodicity is >provided way above any device driver.
A sensor may sample something a million times/second in a high energy physics experiment, for example. Polling one value at a time doesn't scale well in that case. So those bits are PCI cards that do the sampling at x megasamples/second, batch them and do DMA to the computer proper.
A sensor measures something. I think that's the only thing they have in common ;)
Posted Mar 20, 2011 20:45 UTC (Sun) by giraffedata (subscriber, #1954)
[Link]
A sensor measures something. I think that's the only thing they have in common ;)
You may have missed my point. If this is all sensors have in common, then it doesn't make any sense to have a sensor subsystem or a sensor API.
On the other hand, if "sensor" means something that produces samples at a high speed stream like your physics experiment example, a subsystem or API might make sense. In that case, though, one has to make it clear that is what "sensor" means (and really, one should use a different name, like maybe "streaming sensor").