streaming buffer question

Hi,

  I have a few newbie questions on comedi...if someone
has the time to answer...i would greatly appreciate
it...as it would it save me the time of having 
to figure these things out by looking at the 
comedi driver code and experimenting.

I want to set up code for continuous 
data acquisition (obviously a quite common endever)...
including storing the data to disk. An early test
will be to see how high of a rate my current hardware  
will support.

I'm looking into using the comedi streaming buffer
for at least some of this.

I'm thinking that the streaming buffer is an comedi
internal buffer. comedi_get_max_buffer_size 
returns 2^16...so i'm guessing that that really
is a maximum size...without changing some index
counter to more than 16 bits.

I'm guessing that the streaming buffer
gets filled in kernel space as the board does 
its sampling and filling of its
onboard FIFO...in cmd->stop_src = TRIG_NONE mode.
Indeed i can see the number of bytes available increase
with comedi_get_buffer_contents.

Is the streaming buffer a circular buffer?

If i read say the first 500 bytes and then mark that
read as read with comedi_mark_buffer_read...will
those 500 bytes then be the next ones to be filled
after the streaming buffer fills?

The comedi_get_buffer_offset seems to just increment
by the values used in comedi_mark_buffer_read...right
past the size of the streaming buffer...so its 
value is not giving me a clue as to if the streaming buffer
is circular.
  
If the streaming buffer is just a linear buffer...then
i guess i need to write a kernel module
that runs frequent enough that it can copy
any accumulated data to user-land and finish by the
time it is next called. 

If it is a linear buffer...does marking the whole
buffer as read suffice for telling the kernel-land
code to start filling it at the begining...when the next
ADC conversion happens? 

Thanks for any comments.

Jim

Received on 2002-11-12Z21:31:40