Bulk stream: reading old data
Marcel Houben <[email protected]> Tue, 10 Feb 2015 13:57:23 +0000
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
Dear Sir/Madam, I am using LibUsbK to read chunks of Bulk stream data (not all data is supposed to be read), sent from a USB 3.0 device. The USB device obtains and passes live data to the PC at 10 MHz, without caching/buffering. Program works as follows: 1) Initialize USB 2) Clear pipe 3) Get overlap 4) Read variable amount of data (in KB) 5) Wait and release 6) Process 7) Optional restart for new data, from step 2) onwards During testing with this program I encountered an issue whereby old data is obtained for the first ~64 KB of every read. Only after reading more than 64 KB the actual live data is obtained. I made a workaround by obtaining 64 KB + requested amount data and removing the first 64 KB, but I am looking for a better solution. Physically disconnecting and reconnecting the device clears this buffer (while the device remains powered and the program is still active). Could anyone shed some light on this issue? Is there perhaps some kind of buffering going on in the driver? Can this buffer be cleared before the read? Best regards, Marcel ________________________________ The information sent with this e-mail is exclusively intended for the addressee. If anyone has received this e-mail in error, the receiver is requested to indicate this to the sender and to destroy the e-mail completely without taking notice of the contents in any way or saving it. Publication, copying, distribution and/or disclosure of the contents to third parties are not permitted. NTS-Group is not liable for the correct and complete dispatch of the contents, nor for the prompt receipt of this e-mail. If this e-mail contains so-called computer viruses, NTS-Group is not liable for any damage occurring as a consequence. ________________________________ ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Libusb-win32-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel