- From: Herman Bruyninckx <Herman.Bruyninckx_at_mech.kuleuven.ac.be>
- Date: Wed, 29 Jan 2003 08:19:10 +0100 (CET)
On Tue, 28 Jan 2003, Frank Mori Hess wrote: [...] > > So, what we want to achieve is to always have the six most recent > > samples in the software buffer, always at the same place, _and_ the > > hardware buffer has to be emptied as soon as the 6th sample has been > > reached. (And not when the buffer is half full or so...) > > > > We are having a problem with Comedi to do this, because the currently > > offered functionality is somewhere in between the semantics we need: > > I don't see that any change in comedi's api is necessary. All you need is > for end of scan events to be fixed in the driver. Your callback function can > get woken up at the end of every scan, and decide to do something when there > are 6 samples available. Yes. But this doesn't scale nicely: if somebody wants to have a similar behaviour, but with buffers of 100K of samples, it seems overkill to have to process 100K interrupts, isn't it? What you suggest is indeed feasible for our particular application, and for the time being this is (one of the differents ways) how we adapted the driver. But I would _not_ like to have to maintain a non-standard Comedi driver, hence I'm asking what you prefer. What you suggests doesn't need adaptation, but it is not optimal at all. > It can also trivially copy the 6 samples wherever you want them. True. Thanks! Herman -- K.U.Leuven, Mechanical Engineering, Robotics Research Group <http://people.mech.kuleuven.ac.be/~bruyninc> Tel: +32 16 322480
Received on 2003-01-29Z07:19:10