I'd like to write a fast routine that gets input from the COM port, parses it for various strings, and not add >0.5s second delays to the responses to dialog events.
ASPECT doesn't seem to have the ability to index into a 'string'. If true, I'm wondering how to get partial strings from the COM port using the built-in string functions and not waste so much time with system calls that the COM port's buffer overflows OR add delays to the responses to dialog events.
It appears that I could use 'comgetc' to intermittently move characters from the COM port into an integer array with an index. This would allow interruptions from polling the COM port to poll the dialog box for events. If I do this, how do I reduce the overhead of converting the integer array into a string array? Would it be faster to parse the integer array (with other integer arrays) using two indexes and a compare, than converting the integer array into a string array integer-by-integer (using 'itoa' and 'strcat' on each integer in the array) and performing the parsing using ASPECTS built-in string functions?
The COM port will be running at 9600 BAUD. This could probably be lowered, but I'd prefer tighter code.
Thanks,
Tom
ASPECT doesn't seem to have the ability to index into a 'string'. If true, I'm wondering how to get partial strings from the COM port using the built-in string functions and not waste so much time with system calls that the COM port's buffer overflows OR add delays to the responses to dialog events.
It appears that I could use 'comgetc' to intermittently move characters from the COM port into an integer array with an index. This would allow interruptions from polling the COM port to poll the dialog box for events. If I do this, how do I reduce the overhead of converting the integer array into a string array? Would it be faster to parse the integer array (with other integer arrays) using two indexes and a compare, than converting the integer array into a string array integer-by-integer (using 'itoa' and 'strcat' on each integer in the array) and performing the parsing using ASPECTS built-in string functions?
The COM port will be running at 9600 BAUD. This could probably be lowered, but I'd prefer tighter code.
Thanks,
Tom