User: Password:
Subscribe / Log in / New account

APIs for sensors

APIs for sensors

Posted Mar 21, 2011 5:14 UTC (Mon) by dlang (subscriber, #313)
In reply to: APIs for sensors by BenHutchings
Parent article: APIs for sensors

sensors gather data, but from there things branch out

some sensors generate data on a periodic basis and send it in, the kernel need to do _something_ with the data.

that something can be to add it to a circular buffer (note the possibility of a size 1 buffer that only keeps the last report) so that if some application cares about the data it can ask for it (including asking for historical data in some cases)

that something can be to invoke some processing with the data

some sensors generate data only when asked

many sensors have initialization that's required, and sometimes that initialization can determine if the sensor is gathering data all the time, or only when requested (along with tweaking many other things about the data gathered)

a great sensor framework would encapsulate the sensor configuration and initialization so that even if the sensor only generates data when asked, the application could tell the framework that it wants that data gathered every X ms, and what it wants done with that data when it is gathered.

by hiding the capabilities of the sensor from the application, it would make it more likely that a new sensor could be used with an existing application

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds