![]() ![]() ![]() However, this will take some time from the measurement and is not an ideal solution. I am able to resume the communication only by closing and re-opening the communication with the device using CloseHandle and CreateFile. There is no thread exit after the timeout occurs and there is no cancel of any read or write operation. SAMSUNGs double-rotor compressor has the upper and lower rotors designed. The I/O operation has been aborted because of either a thread exit or an application request. If you dont use the rated parts and tools, it can cause trouble with the air. When I try to continue the measurement, by sending a new command will WriteFile sometimes (roughly 50% of the time) fail and GetLastError() returns the error code 995 which is described in MSDN as: Sometimes while reading the measured value from the device will the measurement fail with a timeout (GetLastError() returns error code 121), due to a synchronization error inside the measurement device itself - which is ok and expected. ![]() A mutex is used to guarantee that no two threads try to read or write from the device at the same time.Ĭommands are sent to the device using WriteFile and the responses and measured values are read using ReadFile - both operations are done synchronously. The program is multithreaded and several threads will communicate with the device. I am writing a program in C++ which communicates with a measurement device connected through USB. I have searched stackoverflow and googled thoroughly for this problem but not been able to find a clue to why this problem is happening. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |