Roger Clary
2012-01-03 20:54:42 UTC
I am attempting to read from a UART device connected to a USB port (Mac and Win). To communicate with the device, I write a short string (5-8 chars) and then read a string returned from the device up to 127 chars. but of varying lengths. The problem I am having is that the DataAvailable event of the serial control, running asynchronously, may not contain the complete return string when it fires. I am currently jumping through many hoops trying to check the validity of the returned string, but hoping there is a way I can delay by even half a second data appearing in the dataAvailable event so that I can be assured that the complete string is there when I parse it.
If I can figure out how to wait even 500 m/s to check the dataAvailable event after doing a "write" to the serial control, I think the whole string will be there. So far, I can't get this to work.
Suggestions gratefully accepted.
Roger Clary
Class One Software
http://www.classonesoftware.com
Educational Software for Lifelong Learning
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
If I can figure out how to wait even 500 m/s to check the dataAvailable event after doing a "write" to the serial control, I think the whole string will be there. So far, I can't get this to work.
Suggestions gratefully accepted.
Roger Clary
Class One Software
http://www.classonesoftware.com
Educational Software for Lifelong Learning
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>