non blocking read

Hi,

I would like to read the content of a streaming buffer while this one
is beeing filled. Roughly I'm doing:

	fcntl(comedi_fileno(dev),F_SETFL,O_NONBLOCK)
	comedi_command(...)
	while(...)
	{
  	 n_scan_toread = comedi_get_front_count(...)
	 read(comedi_fileno(dev),buf,n_scan_toread)
 	}

I'm observing that comedi_get_front_count() return 0 bytes while the
acquisition is taking place.When this one is finished then 
comedi_get_front_count() return the full acquisition size in bytes.

I put also a call to comedi_poll(...) before calling comedi_get_front_count()
but without change in the behavior.

Perhaps I haven't understood the Comedi structure.
Any suggestions?

	manuel

Received on 2002-06-19Z13:19:55