- From: bryan cole <bryan.cole_at_teraview.co.uk>
- Date: 06 Aug 2002 17:07:11 +0100
I made a bit of progress. I think I miss understood the
comedi_get_buffer_offset() function:
It seems that this returns the "read position" in the streaming buffer.
If you don't read any data (or mark it as read), it will never change.
To get the "new" end of the buffer-data, you must add this to the return
value of comedi_get_buffer_contents()
I.e. a = comedi_get_buffer_offset()
b = comedi_get_buffer_contents()
most_recent_data_offset = (a + b) & (buffer_size - 1)
I do not understand how the mmap.c example program is intended to
function. Can any one explain this to me? As it stands it will always
hang while waiting for comedi_get_buffer_offset() to return something
other than zero.
I've noticed in the comedi_examples.tgz file the mmap.c file is
different to that in the current distribution. In the version of mmap.c
found in this tar-ball, the function comedi_get_front_count() is used in
place of comedi_get_buffer_offset(). Is the comedi_get_front_count()
function still part of the comedi API?
Bryan
Received on 2002-08-06Z15:07:11