Extend on the concept of the termchar to include a multicharacter termination string for VISA reads.
Ideally, the termination string could be defined as a regex.
When I establish a connection with a linux based Device Under Test using a terminal server or TCP socket, the device ready prompt is the typical username@hostname:#
I currently read the VISA session in a tight loop a byte at a time and buffer the characters to compare to a regex of \n%s@.+?:[~|(/(\w)+)]+?#
The time required depends on the length of the response from the device under test, so I have to keep track of the total time myself; I can't use the VISA timeout.
If NI-VISA supported a regex based multicharacter termination string, I could set my VISA session to look and wait for the prompt.
In the old days when VISA was first designed, I'm guessing that this sort of functionality would have been taxing on the memory and CPU. With today's 64 bit GHz multicore processors, abundant RAM and common regex libs, I don't hink this would affect timing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.