Hello,
thank you all for this input. I m struggling, that my buffer is getting very large. I try to figure out, how to add to each line in the buffer a timestamp.
Is it possible to find out, when the message is send by the device via serial communication.
I used your code:
function buf = readserialline(h)
tmpbuf = emptystr();
while tmpbuf == emptystr()
//TCL_EvalStr("gets " + h + " ttybuf"); Todo: Had some issues, if queue of serialstatus == 75
//
https://stackoverflow.com/questions/54935990/read-the-latest-line-of-a-serial-port
// Todo: read last line of buffer and add timestamp
TCL_EvalStr("binary scan [gets "+h+"] cu* ttybuf");
//tmpbuf = TCL_GetVar("ttybuf");
tmpbuf = ascii(evstr(TCL_GetVar("ttybuf")));
end
buf = tmpbuf;
endfunction
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)