Getting the latest samples

I am working on integrating comedi into an application that acquires 
data from a mobile radar system.  Sensors on the vehicle are supposed to 
give tilt, acceleration, and heading information from a particular 
period of time during which the radar system is being polled.  My 
problem is the 'particular period of time' part.  When I read from the 
card (it's an Advantech PCI-1710) what I really need for it to do is get 
the *latest* N samples.  For example:

    Say (I'm making this up) the size of my fifo is 2k (in samples). 
 Data is buffered on the card and an interrupt is processed when the 
card has 1k samples on it.  1k samples are transferred to a buffer.  My 
application now wants to read 512 samples.  Will those be the first or 
the last 512 samples in the buffer?

I think that I may be able to trigger the start of the sequence 
externally.  If I do this do I have to issue the comedi command again 
before restarting the sequence?

Thanks,
Brent

Received on 2003-05-27Z17:16:43